diff --git a/README.md b/README.md index 627e2b373..c28390ea2 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,10 @@ go-netbox [![GoDoc](http://godoc.org/github.com/netbox-community/go-netbox?status.svg)](http://godoc.org/github.com/netbox-community/go-netbox) [![Build Status](https://github.com/netbox-community/go-netbox/workflows/main/badge.svg?branch=master)](https://github.com/netbox-community/go-netbox/actions) [![Report Card](https://goreportcard.com/badge/github.com/netbox-community/go-netbox)](https://goreportcard.com/report/github.com/netbox-community/go-netbox) -Package `netbox` provides an API 2.0 client for [netbox-community's NetBox](https://github.com/netbox-community/netbox) +Package `netbox` provides an API 3.0 client for [netbox-community's NetBox](https://github.com/netbox-community/netbox) IPAM and DCIM service. -This package assumes you are using NetBox 2.0, as the NetBox 1.0 API no longer exists. +This package assumes you are using NetBox 3.0, as the NetBox 1.0 API no longer exists. It wasn't tested on NetBox 2.0 but given the minor changes to the API between 2.0 and 3.0 it still might work. If you need Netbox 2.0 support (e.g. for 2.11) you can still `go get github.com/netbox-community/go-netbox@netbox_v2.11`. Using the client ================ diff --git a/go.sum b/go.sum index 5bfa60cc5..6da33e2ac 100644 --- a/go.sum +++ b/go.sum @@ -12,6 +12,8 @@ github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:o github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef h1:46PFijGLmAjMPwCCCo7Jf0W6f9slllCkkv7vyc1yOSg= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= +github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -31,6 +33,8 @@ github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgT github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= github.com/go-openapi/analysis v0.20.0 h1:UN09o0kNhleunxW7LR+KnltD0YrJ8FF03pSqvAN3Vro= github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/analysis v0.20.1 h1:zdVbw8yoD4SWZeq+cWdGgquaB0W4VrsJvDJHJND/Ktc= +github.com/go-openapi/analysis v0.20.1/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= @@ -53,6 +57,8 @@ github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwoh github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= @@ -117,6 +123,8 @@ github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZ github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= +github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= @@ -174,6 +182,8 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= @@ -182,6 +192,8 @@ github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo= +github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -233,6 +245,8 @@ go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4S go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= go.mongodb.org/mongo-driver v1.5.1 h1:9nOVLGDfOaZ9R0tBumx/BcuqkbFpyTCU2r/Po7A2azI= go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= +go.mongodb.org/mongo-driver v1.7.2 h1:pFttQyIiJUHEn50YfZgC9ECjITMT44oiN36uArf/OFg= +go.mongodb.org/mongo-driver v1.7.2/go.mod h1:Q4oFMbo1+MSNqICAdYMlC/zSTrwCogR4R8NzkI+yfU8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -256,6 +270,9 @@ golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= +golang.org/x/net v0.0.0-20210916014120-12bc252f5db8 h1:/6y1LfuqNuQdHAm0jjtPtgRcxIxjVZgm5OTu8/QhZvk= +golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -272,6 +289,8 @@ golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -279,6 +298,9 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/netbox/client/circuits/circuits_client.go b/netbox/client/circuits/circuits_client.go index b39f801f4..c8aafc80e 100644 --- a/netbox/client/circuits/circuits_client.go +++ b/netbox/client/circuits/circuits_client.go @@ -336,7 +336,7 @@ func (a *Client) CircuitsCircuitTerminationsDelete(params *CircuitsCircuitTermin } /* - CircuitsCircuitTerminationsList circuits circuit terminations list API + CircuitsCircuitTerminationsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) CircuitsCircuitTerminationsList(params *CircuitsCircuitTerminationsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CircuitsCircuitTerminationsListOK, error) { // TODO: Validate the params before sending @@ -726,7 +726,7 @@ func (a *Client) CircuitsCircuitTypesDelete(params *CircuitsCircuitTypesDeletePa } /* - CircuitsCircuitTypesList circuits circuit types list API + CircuitsCircuitTypesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) CircuitsCircuitTypesList(params *CircuitsCircuitTypesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CircuitsCircuitTypesListOK, error) { // TODO: Validate the params before sending @@ -1077,7 +1077,7 @@ func (a *Client) CircuitsCircuitsDelete(params *CircuitsCircuitsDeleteParams, au } /* - CircuitsCircuitsList circuits circuits list API + CircuitsCircuitsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) CircuitsCircuitsList(params *CircuitsCircuitsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CircuitsCircuitsListOK, error) { // TODO: Validate the params before sending @@ -1428,7 +1428,7 @@ func (a *Client) CircuitsProviderNetworksDelete(params *CircuitsProviderNetworks } /* - CircuitsProviderNetworksList circuits provider networks list API + CircuitsProviderNetworksList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) CircuitsProviderNetworksList(params *CircuitsProviderNetworksListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CircuitsProviderNetworksListOK, error) { // TODO: Validate the params before sending @@ -1779,7 +1779,7 @@ func (a *Client) CircuitsProvidersDelete(params *CircuitsProvidersDeleteParams, } /* - CircuitsProvidersList circuits providers list API + CircuitsProvidersList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) CircuitsProvidersList(params *CircuitsProvidersListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CircuitsProvidersListOK, error) { // TODO: Validate the params before sending diff --git a/netbox/client/dcim/dcim_client.go b/netbox/client/dcim/dcim_client.go index a09f34549..90b493574 100644 --- a/netbox/client/dcim/dcim_client.go +++ b/netbox/client/dcim/dcim_client.go @@ -65,8 +65,6 @@ type ClientService interface { DcimConnectedDeviceList(params *DcimConnectedDeviceListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimConnectedDeviceListOK, error) - DcimConsoleConnectionsList(params *DcimConsoleConnectionsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimConsoleConnectionsListOK, error) - DcimConsolePortTemplatesBulkDelete(params *DcimConsolePortTemplatesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimConsolePortTemplatesBulkDeleteNoContent, error) DcimConsolePortTemplatesBulkPartialUpdate(params *DcimConsolePortTemplatesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimConsolePortTemplatesBulkPartialUpdateOK, error) @@ -273,8 +271,6 @@ type ClientService interface { DcimFrontPortsUpdate(params *DcimFrontPortsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimFrontPortsUpdateOK, error) - DcimInterfaceConnectionsList(params *DcimInterfaceConnectionsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInterfaceConnectionsListOK, error) - DcimInterfaceTemplatesBulkDelete(params *DcimInterfaceTemplatesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInterfaceTemplatesBulkDeleteNoContent, error) DcimInterfaceTemplatesBulkPartialUpdate(params *DcimInterfaceTemplatesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInterfaceTemplatesBulkPartialUpdateOK, error) @@ -385,8 +381,6 @@ type ClientService interface { DcimPlatformsUpdate(params *DcimPlatformsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPlatformsUpdateOK, error) - DcimPowerConnectionsList(params *DcimPowerConnectionsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerConnectionsListOK, error) - DcimPowerFeedsBulkDelete(params *DcimPowerFeedsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerFeedsBulkDeleteNoContent, error) DcimPowerFeedsBulkPartialUpdate(params *DcimPowerFeedsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerFeedsBulkPartialUpdateOK, error) @@ -866,7 +860,7 @@ func (a *Client) DcimCablesDelete(params *DcimCablesDeleteParams, authInfo runti } /* - DcimCablesList dcim cables list API + DcimCablesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimCablesList(params *DcimCablesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCablesListOK, error) { // TODO: Validate the params before sending @@ -1065,45 +1059,6 @@ func (a *Client) DcimConnectedDeviceList(params *DcimConnectedDeviceListParams, panic(msg) } -/* - DcimConsoleConnectionsList dcim console connections list API -*/ -func (a *Client) DcimConsoleConnectionsList(params *DcimConsoleConnectionsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimConsoleConnectionsListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDcimConsoleConnectionsListParams() - } - op := &runtime.ClientOperation{ - ID: "dcim_console-connections_list", - Method: "GET", - PathPattern: "/dcim/console-connections/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DcimConsoleConnectionsListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DcimConsoleConnectionsListOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_console-connections_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DcimConsolePortTemplatesBulkDelete dcim console port templates bulk delete API */ @@ -1300,7 +1255,7 @@ func (a *Client) DcimConsolePortTemplatesDelete(params *DcimConsolePortTemplates } /* - DcimConsolePortTemplatesList dcim console port templates list API + DcimConsolePortTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimConsolePortTemplatesList(params *DcimConsolePortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimConsolePortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -1651,7 +1606,7 @@ func (a *Client) DcimConsolePortsDelete(params *DcimConsolePortsDeleteParams, au } /* - DcimConsolePortsList dcim console ports list API + DcimConsolePortsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimConsolePortsList(params *DcimConsolePortsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimConsolePortsListOK, error) { // TODO: Validate the params before sending @@ -2041,7 +1996,7 @@ func (a *Client) DcimConsoleServerPortTemplatesDelete(params *DcimConsoleServerP } /* - DcimConsoleServerPortTemplatesList dcim console server port templates list API + DcimConsoleServerPortTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimConsoleServerPortTemplatesList(params *DcimConsoleServerPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimConsoleServerPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -2392,7 +2347,7 @@ func (a *Client) DcimConsoleServerPortsDelete(params *DcimConsoleServerPortsDele } /* - DcimConsoleServerPortsList dcim console server ports list API + DcimConsoleServerPortsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimConsoleServerPortsList(params *DcimConsoleServerPortsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimConsoleServerPortsListOK, error) { // TODO: Validate the params before sending @@ -2782,7 +2737,7 @@ func (a *Client) DcimDeviceBayTemplatesDelete(params *DcimDeviceBayTemplatesDele } /* - DcimDeviceBayTemplatesList dcim device bay templates list API + DcimDeviceBayTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimDeviceBayTemplatesList(params *DcimDeviceBayTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimDeviceBayTemplatesListOK, error) { // TODO: Validate the params before sending @@ -3133,7 +3088,7 @@ func (a *Client) DcimDeviceBaysDelete(params *DcimDeviceBaysDeleteParams, authIn } /* - DcimDeviceBaysList dcim device bays list API + DcimDeviceBaysList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimDeviceBaysList(params *DcimDeviceBaysListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimDeviceBaysListOK, error) { // TODO: Validate the params before sending @@ -3484,7 +3439,7 @@ func (a *Client) DcimDeviceRolesDelete(params *DcimDeviceRolesDeleteParams, auth } /* - DcimDeviceRolesList dcim device roles list API + DcimDeviceRolesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimDeviceRolesList(params *DcimDeviceRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimDeviceRolesListOK, error) { // TODO: Validate the params before sending @@ -3835,7 +3790,7 @@ func (a *Client) DcimDeviceTypesDelete(params *DcimDeviceTypesDeleteParams, auth } /* - DcimDeviceTypesList dcim device types list API + DcimDeviceTypesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimDeviceTypesList(params *DcimDeviceTypesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimDeviceTypesListOK, error) { // TODO: Validate the params before sending @@ -4186,7 +4141,7 @@ func (a *Client) DcimDevicesDelete(params *DcimDevicesDeleteParams, authInfo run } /* - DcimDevicesList dcim devices list API + DcimDevicesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimDevicesList(params *DcimDevicesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimDevicesListOK, error) { // TODO: Validate the params before sending @@ -4576,7 +4531,7 @@ func (a *Client) DcimFrontPortTemplatesDelete(params *DcimFrontPortTemplatesDele } /* - DcimFrontPortTemplatesList dcim front port templates list API + DcimFrontPortTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimFrontPortTemplatesList(params *DcimFrontPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimFrontPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -4927,7 +4882,7 @@ func (a *Client) DcimFrontPortsDelete(params *DcimFrontPortsDeleteParams, authIn } /* - DcimFrontPortsList dcim front ports list API + DcimFrontPortsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimFrontPortsList(params *DcimFrontPortsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimFrontPortsListOK, error) { // TODO: Validate the params before sending @@ -5121,45 +5076,6 @@ func (a *Client) DcimFrontPortsUpdate(params *DcimFrontPortsUpdateParams, authIn panic(msg) } -/* - DcimInterfaceConnectionsList dcim interface connections list API -*/ -func (a *Client) DcimInterfaceConnectionsList(params *DcimInterfaceConnectionsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInterfaceConnectionsListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDcimInterfaceConnectionsListParams() - } - op := &runtime.ClientOperation{ - ID: "dcim_interface-connections_list", - Method: "GET", - PathPattern: "/dcim/interface-connections/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DcimInterfaceConnectionsListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DcimInterfaceConnectionsListOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_interface-connections_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DcimInterfaceTemplatesBulkDelete dcim interface templates bulk delete API */ @@ -5356,7 +5272,7 @@ func (a *Client) DcimInterfaceTemplatesDelete(params *DcimInterfaceTemplatesDele } /* - DcimInterfaceTemplatesList dcim interface templates list API + DcimInterfaceTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimInterfaceTemplatesList(params *DcimInterfaceTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInterfaceTemplatesListOK, error) { // TODO: Validate the params before sending @@ -5707,7 +5623,7 @@ func (a *Client) DcimInterfacesDelete(params *DcimInterfacesDeleteParams, authIn } /* - DcimInterfacesList dcim interfaces list API + DcimInterfacesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimInterfacesList(params *DcimInterfacesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInterfacesListOK, error) { // TODO: Validate the params before sending @@ -6097,7 +6013,7 @@ func (a *Client) DcimInventoryItemsDelete(params *DcimInventoryItemsDeleteParams } /* - DcimInventoryItemsList dcim inventory items list API + DcimInventoryItemsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimInventoryItemsList(params *DcimInventoryItemsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsListOK, error) { // TODO: Validate the params before sending @@ -6448,7 +6364,7 @@ func (a *Client) DcimLocationsDelete(params *DcimLocationsDeleteParams, authInfo } /* - DcimLocationsList dcim locations list API + DcimLocationsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimLocationsList(params *DcimLocationsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsListOK, error) { // TODO: Validate the params before sending @@ -6799,7 +6715,7 @@ func (a *Client) DcimManufacturersDelete(params *DcimManufacturersDeleteParams, } /* - DcimManufacturersList dcim manufacturers list API + DcimManufacturersList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimManufacturersList(params *DcimManufacturersListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersListOK, error) { // TODO: Validate the params before sending @@ -7150,7 +7066,7 @@ func (a *Client) DcimPlatformsDelete(params *DcimPlatformsDeleteParams, authInfo } /* - DcimPlatformsList dcim platforms list API + DcimPlatformsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimPlatformsList(params *DcimPlatformsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPlatformsListOK, error) { // TODO: Validate the params before sending @@ -7305,45 +7221,6 @@ func (a *Client) DcimPlatformsUpdate(params *DcimPlatformsUpdateParams, authInfo panic(msg) } -/* - DcimPowerConnectionsList dcim power connections list API -*/ -func (a *Client) DcimPowerConnectionsList(params *DcimPowerConnectionsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerConnectionsListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDcimPowerConnectionsListParams() - } - op := &runtime.ClientOperation{ - ID: "dcim_power-connections_list", - Method: "GET", - PathPattern: "/dcim/power-connections/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DcimPowerConnectionsListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DcimPowerConnectionsListOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-connections_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DcimPowerFeedsBulkDelete dcim power feeds bulk delete API */ @@ -7540,7 +7417,7 @@ func (a *Client) DcimPowerFeedsDelete(params *DcimPowerFeedsDeleteParams, authIn } /* - DcimPowerFeedsList dcim power feeds list API + DcimPowerFeedsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimPowerFeedsList(params *DcimPowerFeedsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerFeedsListOK, error) { // TODO: Validate the params before sending @@ -7930,7 +7807,7 @@ func (a *Client) DcimPowerOutletTemplatesDelete(params *DcimPowerOutletTemplates } /* - DcimPowerOutletTemplatesList dcim power outlet templates list API + DcimPowerOutletTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimPowerOutletTemplatesList(params *DcimPowerOutletTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerOutletTemplatesListOK, error) { // TODO: Validate the params before sending @@ -8281,7 +8158,7 @@ func (a *Client) DcimPowerOutletsDelete(params *DcimPowerOutletsDeleteParams, au } /* - DcimPowerOutletsList dcim power outlets list API + DcimPowerOutletsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimPowerOutletsList(params *DcimPowerOutletsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerOutletsListOK, error) { // TODO: Validate the params before sending @@ -8671,7 +8548,7 @@ func (a *Client) DcimPowerPanelsDelete(params *DcimPowerPanelsDeleteParams, auth } /* - DcimPowerPanelsList dcim power panels list API + DcimPowerPanelsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimPowerPanelsList(params *DcimPowerPanelsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerPanelsListOK, error) { // TODO: Validate the params before sending @@ -9022,7 +8899,7 @@ func (a *Client) DcimPowerPortTemplatesDelete(params *DcimPowerPortTemplatesDele } /* - DcimPowerPortTemplatesList dcim power port templates list API + DcimPowerPortTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimPowerPortTemplatesList(params *DcimPowerPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -9373,7 +9250,7 @@ func (a *Client) DcimPowerPortsDelete(params *DcimPowerPortsDeleteParams, authIn } /* - DcimPowerPortsList dcim power ports list API + DcimPowerPortsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimPowerPortsList(params *DcimPowerPortsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerPortsListOK, error) { // TODO: Validate the params before sending @@ -9763,7 +9640,7 @@ func (a *Client) DcimRackReservationsDelete(params *DcimRackReservationsDeletePa } /* - DcimRackReservationsList dcim rack reservations list API + DcimRackReservationsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimRackReservationsList(params *DcimRackReservationsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimRackReservationsListOK, error) { // TODO: Validate the params before sending @@ -10114,7 +9991,7 @@ func (a *Client) DcimRackRolesDelete(params *DcimRackRolesDeleteParams, authInfo } /* - DcimRackRolesList dcim rack roles list API + DcimRackRolesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimRackRolesList(params *DcimRackRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimRackRolesListOK, error) { // TODO: Validate the params before sending @@ -10504,7 +10381,7 @@ func (a *Client) DcimRacksElevation(params *DcimRacksElevationParams, authInfo r } /* - DcimRacksList dcim racks list API + DcimRacksList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimRacksList(params *DcimRacksListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimRacksListOK, error) { // TODO: Validate the params before sending @@ -10855,7 +10732,7 @@ func (a *Client) DcimRearPortTemplatesDelete(params *DcimRearPortTemplatesDelete } /* - DcimRearPortTemplatesList dcim rear port templates list API + DcimRearPortTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimRearPortTemplatesList(params *DcimRearPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimRearPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -11206,7 +11083,7 @@ func (a *Client) DcimRearPortsDelete(params *DcimRearPortsDeleteParams, authInfo } /* - DcimRearPortsList dcim rear ports list API + DcimRearPortsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimRearPortsList(params *DcimRearPortsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimRearPortsListOK, error) { // TODO: Validate the params before sending @@ -11596,7 +11473,7 @@ func (a *Client) DcimRegionsDelete(params *DcimRegionsDeleteParams, authInfo run } /* - DcimRegionsList dcim regions list API + DcimRegionsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimRegionsList(params *DcimRegionsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimRegionsListOK, error) { // TODO: Validate the params before sending @@ -11947,7 +11824,7 @@ func (a *Client) DcimSiteGroupsDelete(params *DcimSiteGroupsDeleteParams, authIn } /* - DcimSiteGroupsList dcim site groups list API + DcimSiteGroupsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimSiteGroupsList(params *DcimSiteGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimSiteGroupsListOK, error) { // TODO: Validate the params before sending @@ -12298,7 +12175,7 @@ func (a *Client) DcimSitesDelete(params *DcimSitesDeleteParams, authInfo runtime } /* - DcimSitesList dcim sites list API + DcimSitesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimSitesList(params *DcimSitesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimSitesListOK, error) { // TODO: Validate the params before sending @@ -12649,7 +12526,7 @@ func (a *Client) DcimVirtualChassisDelete(params *DcimVirtualChassisDeleteParams } /* - DcimVirtualChassisList dcim virtual chassis list API + DcimVirtualChassisList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) DcimVirtualChassisList(params *DcimVirtualChassisListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimVirtualChassisListOK, error) { // TODO: Validate the params before sending diff --git a/netbox/client/dcim/dcim_console_connections_list_parameters.go b/netbox/client/dcim/dcim_console_connections_list_parameters.go deleted file mode 100644 index 258dd65ab..000000000 --- a/netbox/client/dcim/dcim_console_connections_list_parameters.go +++ /dev/null @@ -1,645 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package dcim - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewDcimConsoleConnectionsListParams creates a new DcimConsoleConnectionsListParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDcimConsoleConnectionsListParams() *DcimConsoleConnectionsListParams { - return &DcimConsoleConnectionsListParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDcimConsoleConnectionsListParamsWithTimeout creates a new DcimConsoleConnectionsListParams object -// with the ability to set a timeout on a request. -func NewDcimConsoleConnectionsListParamsWithTimeout(timeout time.Duration) *DcimConsoleConnectionsListParams { - return &DcimConsoleConnectionsListParams{ - timeout: timeout, - } -} - -// NewDcimConsoleConnectionsListParamsWithContext creates a new DcimConsoleConnectionsListParams object -// with the ability to set a context for a request. -func NewDcimConsoleConnectionsListParamsWithContext(ctx context.Context) *DcimConsoleConnectionsListParams { - return &DcimConsoleConnectionsListParams{ - Context: ctx, - } -} - -// NewDcimConsoleConnectionsListParamsWithHTTPClient creates a new DcimConsoleConnectionsListParams object -// with the ability to set a custom HTTPClient for a request. -func NewDcimConsoleConnectionsListParamsWithHTTPClient(client *http.Client) *DcimConsoleConnectionsListParams { - return &DcimConsoleConnectionsListParams{ - HTTPClient: client, - } -} - -/* DcimConsoleConnectionsListParams contains all the parameters to send to the API endpoint - for the dcim console connections list operation. - - Typically these are written to a http.Request. -*/ -type DcimConsoleConnectionsListParams struct { - - // Device. - Device *string - - // DeviceID. - DeviceID *string - - /* Limit. - - Number of results to return per page. - */ - Limit *int64 - - // Name. - Name *string - - // NameEmpty. - NameEmpty *string - - // NameIc. - NameIc *string - - // NameIe. - NameIe *string - - // NameIew. - NameIew *string - - // NameIsw. - NameIsw *string - - // Namen. - Namen *string - - // NameNic. - NameNic *string - - // NameNie. - NameNie *string - - // NameNiew. - NameNiew *string - - // NameNisw. - NameNisw *string - - /* Offset. - - The initial index from which to return the results. - */ - Offset *int64 - - // Site. - Site *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the dcim console connections list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DcimConsoleConnectionsListParams) WithDefaults() *DcimConsoleConnectionsListParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the dcim console connections list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DcimConsoleConnectionsListParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithTimeout(timeout time.Duration) *DcimConsoleConnectionsListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithContext(ctx context.Context) *DcimConsoleConnectionsListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithHTTPClient(client *http.Client) *DcimConsoleConnectionsListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDevice adds the device to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithDevice(device *string) *DcimConsoleConnectionsListParams { - o.SetDevice(device) - return o -} - -// SetDevice adds the device to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetDevice(device *string) { - o.Device = device -} - -// WithDeviceID adds the deviceID to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithDeviceID(deviceID *string) *DcimConsoleConnectionsListParams { - o.SetDeviceID(deviceID) - return o -} - -// SetDeviceID adds the deviceId to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetDeviceID(deviceID *string) { - o.DeviceID = deviceID -} - -// WithLimit adds the limit to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithLimit(limit *int64) *DcimConsoleConnectionsListParams { - o.SetLimit(limit) - return o -} - -// SetLimit adds the limit to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetLimit(limit *int64) { - o.Limit = limit -} - -// WithName adds the name to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithName(name *string) *DcimConsoleConnectionsListParams { - o.SetName(name) - return o -} - -// SetName adds the name to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetName(name *string) { - o.Name = name -} - -// WithNameEmpty adds the nameEmpty to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithNameEmpty(nameEmpty *string) *DcimConsoleConnectionsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - -// WithNameIc adds the nameIc to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithNameIc(nameIc *string) *DcimConsoleConnectionsListParams { - o.SetNameIc(nameIc) - return o -} - -// SetNameIc adds the nameIc to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetNameIc(nameIc *string) { - o.NameIc = nameIc -} - -// WithNameIe adds the nameIe to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithNameIe(nameIe *string) *DcimConsoleConnectionsListParams { - o.SetNameIe(nameIe) - return o -} - -// SetNameIe adds the nameIe to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetNameIe(nameIe *string) { - o.NameIe = nameIe -} - -// WithNameIew adds the nameIew to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithNameIew(nameIew *string) *DcimConsoleConnectionsListParams { - o.SetNameIew(nameIew) - return o -} - -// SetNameIew adds the nameIew to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetNameIew(nameIew *string) { - o.NameIew = nameIew -} - -// WithNameIsw adds the nameIsw to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithNameIsw(nameIsw *string) *DcimConsoleConnectionsListParams { - o.SetNameIsw(nameIsw) - return o -} - -// SetNameIsw adds the nameIsw to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetNameIsw(nameIsw *string) { - o.NameIsw = nameIsw -} - -// WithNamen adds the namen to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithNamen(namen *string) *DcimConsoleConnectionsListParams { - o.SetNamen(namen) - return o -} - -// SetNamen adds the nameN to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetNamen(namen *string) { - o.Namen = namen -} - -// WithNameNic adds the nameNic to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithNameNic(nameNic *string) *DcimConsoleConnectionsListParams { - o.SetNameNic(nameNic) - return o -} - -// SetNameNic adds the nameNic to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetNameNic(nameNic *string) { - o.NameNic = nameNic -} - -// WithNameNie adds the nameNie to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithNameNie(nameNie *string) *DcimConsoleConnectionsListParams { - o.SetNameNie(nameNie) - return o -} - -// SetNameNie adds the nameNie to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetNameNie(nameNie *string) { - o.NameNie = nameNie -} - -// WithNameNiew adds the nameNiew to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithNameNiew(nameNiew *string) *DcimConsoleConnectionsListParams { - o.SetNameNiew(nameNiew) - return o -} - -// SetNameNiew adds the nameNiew to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetNameNiew(nameNiew *string) { - o.NameNiew = nameNiew -} - -// WithNameNisw adds the nameNisw to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithNameNisw(nameNisw *string) *DcimConsoleConnectionsListParams { - o.SetNameNisw(nameNisw) - return o -} - -// SetNameNisw adds the nameNisw to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetNameNisw(nameNisw *string) { - o.NameNisw = nameNisw -} - -// WithOffset adds the offset to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithOffset(offset *int64) *DcimConsoleConnectionsListParams { - o.SetOffset(offset) - return o -} - -// SetOffset adds the offset to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetOffset(offset *int64) { - o.Offset = offset -} - -// WithSite adds the site to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) WithSite(site *string) *DcimConsoleConnectionsListParams { - o.SetSite(site) - return o -} - -// SetSite adds the site to the dcim console connections list params -func (o *DcimConsoleConnectionsListParams) SetSite(site *string) { - o.Site = site -} - -// WriteToRequest writes these params to a swagger request -func (o *DcimConsoleConnectionsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Device != nil { - - // query param device - var qrDevice string - - if o.Device != nil { - qrDevice = *o.Device - } - qDevice := qrDevice - if qDevice != "" { - - if err := r.SetQueryParam("device", qDevice); err != nil { - return err - } - } - } - - if o.DeviceID != nil { - - // query param device_id - var qrDeviceID string - - if o.DeviceID != nil { - qrDeviceID = *o.DeviceID - } - qDeviceID := qrDeviceID - if qDeviceID != "" { - - if err := r.SetQueryParam("device_id", qDeviceID); err != nil { - return err - } - } - } - - if o.Limit != nil { - - // query param limit - var qrLimit int64 - - if o.Limit != nil { - qrLimit = *o.Limit - } - qLimit := swag.FormatInt64(qrLimit) - if qLimit != "" { - - if err := r.SetQueryParam("limit", qLimit); err != nil { - return err - } - } - } - - if o.Name != nil { - - // query param name - var qrName string - - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - } - - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - - if o.NameIc != nil { - - // query param name__ic - var qrNameIc string - - if o.NameIc != nil { - qrNameIc = *o.NameIc - } - qNameIc := qrNameIc - if qNameIc != "" { - - if err := r.SetQueryParam("name__ic", qNameIc); err != nil { - return err - } - } - } - - if o.NameIe != nil { - - // query param name__ie - var qrNameIe string - - if o.NameIe != nil { - qrNameIe = *o.NameIe - } - qNameIe := qrNameIe - if qNameIe != "" { - - if err := r.SetQueryParam("name__ie", qNameIe); err != nil { - return err - } - } - } - - if o.NameIew != nil { - - // query param name__iew - var qrNameIew string - - if o.NameIew != nil { - qrNameIew = *o.NameIew - } - qNameIew := qrNameIew - if qNameIew != "" { - - if err := r.SetQueryParam("name__iew", qNameIew); err != nil { - return err - } - } - } - - if o.NameIsw != nil { - - // query param name__isw - var qrNameIsw string - - if o.NameIsw != nil { - qrNameIsw = *o.NameIsw - } - qNameIsw := qrNameIsw - if qNameIsw != "" { - - if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { - return err - } - } - } - - if o.Namen != nil { - - // query param name__n - var qrNamen string - - if o.Namen != nil { - qrNamen = *o.Namen - } - qNamen := qrNamen - if qNamen != "" { - - if err := r.SetQueryParam("name__n", qNamen); err != nil { - return err - } - } - } - - if o.NameNic != nil { - - // query param name__nic - var qrNameNic string - - if o.NameNic != nil { - qrNameNic = *o.NameNic - } - qNameNic := qrNameNic - if qNameNic != "" { - - if err := r.SetQueryParam("name__nic", qNameNic); err != nil { - return err - } - } - } - - if o.NameNie != nil { - - // query param name__nie - var qrNameNie string - - if o.NameNie != nil { - qrNameNie = *o.NameNie - } - qNameNie := qrNameNie - if qNameNie != "" { - - if err := r.SetQueryParam("name__nie", qNameNie); err != nil { - return err - } - } - } - - if o.NameNiew != nil { - - // query param name__niew - var qrNameNiew string - - if o.NameNiew != nil { - qrNameNiew = *o.NameNiew - } - qNameNiew := qrNameNiew - if qNameNiew != "" { - - if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { - return err - } - } - } - - if o.NameNisw != nil { - - // query param name__nisw - var qrNameNisw string - - if o.NameNisw != nil { - qrNameNisw = *o.NameNisw - } - qNameNisw := qrNameNisw - if qNameNisw != "" { - - if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { - return err - } - } - } - - if o.Offset != nil { - - // query param offset - var qrOffset int64 - - if o.Offset != nil { - qrOffset = *o.Offset - } - qOffset := swag.FormatInt64(qrOffset) - if qOffset != "" { - - if err := r.SetQueryParam("offset", qOffset); err != nil { - return err - } - } - } - - if o.Site != nil { - - // query param site - var qrSite string - - if o.Site != nil { - qrSite = *o.Site - } - qSite := qrSite - if qSite != "" { - - if err := r.SetQueryParam("site", qSite); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/dcim/dcim_console_connections_list_responses.go b/netbox/client/dcim/dcim_console_connections_list_responses.go deleted file mode 100644 index 5d672f868..000000000 --- a/netbox/client/dcim/dcim_console_connections_list_responses.go +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package dcim - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// DcimConsoleConnectionsListReader is a Reader for the DcimConsoleConnectionsList structure. -type DcimConsoleConnectionsListReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DcimConsoleConnectionsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDcimConsoleConnectionsListOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDcimConsoleConnectionsListOK creates a DcimConsoleConnectionsListOK with default headers values -func NewDcimConsoleConnectionsListOK() *DcimConsoleConnectionsListOK { - return &DcimConsoleConnectionsListOK{} -} - -/* DcimConsoleConnectionsListOK describes a response with status code 200, with default header values. - -DcimConsoleConnectionsListOK dcim console connections list o k -*/ -type DcimConsoleConnectionsListOK struct { - Payload *DcimConsoleConnectionsListOKBody -} - -func (o *DcimConsoleConnectionsListOK) Error() string { - return fmt.Sprintf("[GET /dcim/console-connections/][%d] dcimConsoleConnectionsListOK %+v", 200, o.Payload) -} -func (o *DcimConsoleConnectionsListOK) GetPayload() *DcimConsoleConnectionsListOKBody { - return o.Payload -} - -func (o *DcimConsoleConnectionsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(DcimConsoleConnectionsListOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/*DcimConsoleConnectionsListOKBody dcim console connections list o k body -swagger:model DcimConsoleConnectionsListOKBody -*/ -type DcimConsoleConnectionsListOKBody struct { - - // count - // Required: true - Count *int64 `json:"count"` - - // next - // Format: uri - Next *strfmt.URI `json:"next,omitempty"` - - // previous - // Format: uri - Previous *strfmt.URI `json:"previous,omitempty"` - - // results - // Required: true - Results []*models.ConsolePort `json:"results"` -} - -// Validate validates this dcim console connections list o k body -func (o *DcimConsoleConnectionsListOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateCount(formats); err != nil { - res = append(res, err) - } - - if err := o.validateNext(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePrevious(formats); err != nil { - res = append(res, err) - } - - if err := o.validateResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *DcimConsoleConnectionsListOKBody) validateCount(formats strfmt.Registry) error { - - if err := validate.Required("dcimConsoleConnectionsListOK"+"."+"count", "body", o.Count); err != nil { - return err - } - - return nil -} - -func (o *DcimConsoleConnectionsListOKBody) validateNext(formats strfmt.Registry) error { - if swag.IsZero(o.Next) { // not required - return nil - } - - if err := validate.FormatOf("dcimConsoleConnectionsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { - return err - } - - return nil -} - -func (o *DcimConsoleConnectionsListOKBody) validatePrevious(formats strfmt.Registry) error { - if swag.IsZero(o.Previous) { // not required - return nil - } - - if err := validate.FormatOf("dcimConsoleConnectionsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { - return err - } - - return nil -} - -func (o *DcimConsoleConnectionsListOKBody) validateResults(formats strfmt.Registry) error { - - if err := validate.Required("dcimConsoleConnectionsListOK"+"."+"results", "body", o.Results); err != nil { - return err - } - - for i := 0; i < len(o.Results); i++ { - if swag.IsZero(o.Results[i]) { // not required - continue - } - - if o.Results[i] != nil { - if err := o.Results[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dcimConsoleConnectionsListOK" + "." + "results" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this dcim console connections list o k body based on the context it is used -func (o *DcimConsoleConnectionsListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *DcimConsoleConnectionsListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(o.Results); i++ { - - if o.Results[i] != nil { - if err := o.Results[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dcimConsoleConnectionsListOK" + "." + "results" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (o *DcimConsoleConnectionsListOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *DcimConsoleConnectionsListOKBody) UnmarshalBinary(b []byte) error { - var res DcimConsoleConnectionsListOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/netbox/client/dcim/dcim_console_ports_list_parameters.go b/netbox/client/dcim/dcim_console_ports_list_parameters.go index e5d07283c..63f770cf8 100644 --- a/netbox/client/dcim/dcim_console_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_console_ports_list_parameters.go @@ -201,6 +201,18 @@ type DcimConsolePortsListParams struct { */ Limit *int64 + // Location. + Location *string + + // Locationn. + Locationn *string + + // LocationID. + LocationID *string + + // LocationIDn. + LocationIDn *string + // Name. Name *string @@ -795,6 +807,50 @@ func (o *DcimConsolePortsListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithLocation adds the location to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithLocation(location *string) *DcimConsolePortsListParams { + o.SetLocation(location) + return o +} + +// SetLocation adds the location to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetLocation(location *string) { + o.Location = location +} + +// WithLocationn adds the locationn to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithLocationn(locationn *string) *DcimConsolePortsListParams { + o.SetLocationn(locationn) + return o +} + +// SetLocationn adds the locationN to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetLocationn(locationn *string) { + o.Locationn = locationn +} + +// WithLocationID adds the locationID to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithLocationID(locationID *string) *DcimConsolePortsListParams { + o.SetLocationID(locationID) + return o +} + +// SetLocationID adds the locationId to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetLocationID(locationID *string) { + o.LocationID = locationID +} + +// WithLocationIDn adds the locationIDn to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithLocationIDn(locationIDn *string) *DcimConsolePortsListParams { + o.SetLocationIDn(locationIDn) + return o +} + +// SetLocationIDn adds the locationIdN to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetLocationIDn(locationIDn *string) { + o.LocationIDn = locationIDn +} + // WithName adds the name to the dcim console ports list params func (o *DcimConsolePortsListParams) WithName(name *string) *DcimConsolePortsListParams { o.SetName(name) @@ -1819,6 +1875,74 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Location != nil { + + // query param location + var qrLocation string + + if o.Location != nil { + qrLocation = *o.Location + } + qLocation := qrLocation + if qLocation != "" { + + if err := r.SetQueryParam("location", qLocation); err != nil { + return err + } + } + } + + if o.Locationn != nil { + + // query param location__n + var qrLocationn string + + if o.Locationn != nil { + qrLocationn = *o.Locationn + } + qLocationn := qrLocationn + if qLocationn != "" { + + if err := r.SetQueryParam("location__n", qLocationn); err != nil { + return err + } + } + } + + if o.LocationID != nil { + + // query param location_id + var qrLocationID string + + if o.LocationID != nil { + qrLocationID = *o.LocationID + } + qLocationID := qrLocationID + if qLocationID != "" { + + if err := r.SetQueryParam("location_id", qLocationID); err != nil { + return err + } + } + } + + if o.LocationIDn != nil { + + // query param location_id__n + var qrLocationIDn string + + if o.LocationIDn != nil { + qrLocationIDn = *o.LocationIDn + } + qLocationIDn := qrLocationIDn + if qLocationIDn != "" { + + if err := r.SetQueryParam("location_id__n", qLocationIDn); err != nil { + return err + } + } + } + if o.Name != nil { // query param name diff --git a/netbox/client/dcim/dcim_console_server_ports_list_parameters.go b/netbox/client/dcim/dcim_console_server_ports_list_parameters.go index c61c0618f..746cf658e 100644 --- a/netbox/client/dcim/dcim_console_server_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_console_server_ports_list_parameters.go @@ -201,6 +201,18 @@ type DcimConsoleServerPortsListParams struct { */ Limit *int64 + // Location. + Location *string + + // Locationn. + Locationn *string + + // LocationID. + LocationID *string + + // LocationIDn. + LocationIDn *string + // Name. Name *string @@ -795,6 +807,50 @@ func (o *DcimConsoleServerPortsListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithLocation adds the location to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithLocation(location *string) *DcimConsoleServerPortsListParams { + o.SetLocation(location) + return o +} + +// SetLocation adds the location to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetLocation(location *string) { + o.Location = location +} + +// WithLocationn adds the locationn to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithLocationn(locationn *string) *DcimConsoleServerPortsListParams { + o.SetLocationn(locationn) + return o +} + +// SetLocationn adds the locationN to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetLocationn(locationn *string) { + o.Locationn = locationn +} + +// WithLocationID adds the locationID to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithLocationID(locationID *string) *DcimConsoleServerPortsListParams { + o.SetLocationID(locationID) + return o +} + +// SetLocationID adds the locationId to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetLocationID(locationID *string) { + o.LocationID = locationID +} + +// WithLocationIDn adds the locationIDn to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithLocationIDn(locationIDn *string) *DcimConsoleServerPortsListParams { + o.SetLocationIDn(locationIDn) + return o +} + +// SetLocationIDn adds the locationIdN to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetLocationIDn(locationIDn *string) { + o.LocationIDn = locationIDn +} + // WithName adds the name to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithName(name *string) *DcimConsoleServerPortsListParams { o.SetName(name) @@ -1819,6 +1875,74 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } } + if o.Location != nil { + + // query param location + var qrLocation string + + if o.Location != nil { + qrLocation = *o.Location + } + qLocation := qrLocation + if qLocation != "" { + + if err := r.SetQueryParam("location", qLocation); err != nil { + return err + } + } + } + + if o.Locationn != nil { + + // query param location__n + var qrLocationn string + + if o.Locationn != nil { + qrLocationn = *o.Locationn + } + qLocationn := qrLocationn + if qLocationn != "" { + + if err := r.SetQueryParam("location__n", qLocationn); err != nil { + return err + } + } + } + + if o.LocationID != nil { + + // query param location_id + var qrLocationID string + + if o.LocationID != nil { + qrLocationID = *o.LocationID + } + qLocationID := qrLocationID + if qLocationID != "" { + + if err := r.SetQueryParam("location_id", qLocationID); err != nil { + return err + } + } + } + + if o.LocationIDn != nil { + + // query param location_id__n + var qrLocationIDn string + + if o.LocationIDn != nil { + qrLocationIDn = *o.LocationIDn + } + qLocationIDn := qrLocationIDn + if qLocationIDn != "" { + + if err := r.SetQueryParam("location_id__n", qLocationIDn); err != nil { + return err + } + } + } + if o.Name != nil { // query param name diff --git a/netbox/client/dcim/dcim_device_bays_list_parameters.go b/netbox/client/dcim/dcim_device_bays_list_parameters.go index dc72fc8d5..31a64af63 100644 --- a/netbox/client/dcim/dcim_device_bays_list_parameters.go +++ b/netbox/client/dcim/dcim_device_bays_list_parameters.go @@ -195,6 +195,18 @@ type DcimDeviceBaysListParams struct { */ Limit *int64 + // Location. + Location *string + + // Locationn. + Locationn *string + + // LocationID. + LocationID *string + + // LocationIDn. + LocationIDn *string + // Name. Name *string @@ -761,6 +773,50 @@ func (o *DcimDeviceBaysListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithLocation adds the location to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithLocation(location *string) *DcimDeviceBaysListParams { + o.SetLocation(location) + return o +} + +// SetLocation adds the location to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetLocation(location *string) { + o.Location = location +} + +// WithLocationn adds the locationn to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithLocationn(locationn *string) *DcimDeviceBaysListParams { + o.SetLocationn(locationn) + return o +} + +// SetLocationn adds the locationN to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetLocationn(locationn *string) { + o.Locationn = locationn +} + +// WithLocationID adds the locationID to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithLocationID(locationID *string) *DcimDeviceBaysListParams { + o.SetLocationID(locationID) + return o +} + +// SetLocationID adds the locationId to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetLocationID(locationID *string) { + o.LocationID = locationID +} + +// WithLocationIDn adds the locationIDn to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithLocationIDn(locationIDn *string) *DcimDeviceBaysListParams { + o.SetLocationIDn(locationIDn) + return o +} + +// SetLocationIDn adds the locationIdN to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetLocationIDn(locationIDn *string) { + o.LocationIDn = locationIDn +} + // WithName adds the name to the dcim device bays list params func (o *DcimDeviceBaysListParams) WithName(name *string) *DcimDeviceBaysListParams { o.SetName(name) @@ -1729,6 +1785,74 @@ func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Location != nil { + + // query param location + var qrLocation string + + if o.Location != nil { + qrLocation = *o.Location + } + qLocation := qrLocation + if qLocation != "" { + + if err := r.SetQueryParam("location", qLocation); err != nil { + return err + } + } + } + + if o.Locationn != nil { + + // query param location__n + var qrLocationn string + + if o.Locationn != nil { + qrLocationn = *o.Locationn + } + qLocationn := qrLocationn + if qLocationn != "" { + + if err := r.SetQueryParam("location__n", qLocationn); err != nil { + return err + } + } + } + + if o.LocationID != nil { + + // query param location_id + var qrLocationID string + + if o.LocationID != nil { + qrLocationID = *o.LocationID + } + qLocationID := qrLocationID + if qLocationID != "" { + + if err := r.SetQueryParam("location_id", qLocationID); err != nil { + return err + } + } + } + + if o.LocationIDn != nil { + + // query param location_id__n + var qrLocationIDn string + + if o.LocationIDn != nil { + qrLocationIDn = *o.LocationIDn + } + qLocationIDn := qrLocationIDn + if qLocationIDn != "" { + + if err := r.SetQueryParam("location_id__n", qLocationIDn); err != nil { + return err + } + } + } + if o.Name != nil { // query param name diff --git a/netbox/client/dcim/dcim_front_port_templates_list_parameters.go b/netbox/client/dcim/dcim_front_port_templates_list_parameters.go index a67386553..7955b8c3c 100644 --- a/netbox/client/dcim/dcim_front_port_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_front_port_templates_list_parameters.go @@ -75,6 +75,39 @@ func NewDcimFrontPortTemplatesListParamsWithHTTPClient(client *http.Client) *Dci */ type DcimFrontPortTemplatesListParams struct { + // Color. + Color *string + + // ColorEmpty. + ColorEmpty *string + + // ColorIc. + ColorIc *string + + // ColorIe. + ColorIe *string + + // ColorIew. + ColorIew *string + + // ColorIsw. + ColorIsw *string + + // Colorn. + Colorn *string + + // ColorNic. + ColorNic *string + + // ColorNie. + ColorNie *string + + // ColorNiew. + ColorNiew *string + + // ColorNisw. + ColorNisw *string + // Created. Created *string @@ -221,6 +254,127 @@ func (o *DcimFrontPortTemplatesListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithColor adds the color to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithColor(color *string) *DcimFrontPortTemplatesListParams { + o.SetColor(color) + return o +} + +// SetColor adds the color to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetColor(color *string) { + o.Color = color +} + +// WithColorEmpty adds the colorEmpty to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithColorEmpty(colorEmpty *string) *DcimFrontPortTemplatesListParams { + o.SetColorEmpty(colorEmpty) + return o +} + +// SetColorEmpty adds the colorEmpty to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetColorEmpty(colorEmpty *string) { + o.ColorEmpty = colorEmpty +} + +// WithColorIc adds the colorIc to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithColorIc(colorIc *string) *DcimFrontPortTemplatesListParams { + o.SetColorIc(colorIc) + return o +} + +// SetColorIc adds the colorIc to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetColorIc(colorIc *string) { + o.ColorIc = colorIc +} + +// WithColorIe adds the colorIe to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithColorIe(colorIe *string) *DcimFrontPortTemplatesListParams { + o.SetColorIe(colorIe) + return o +} + +// SetColorIe adds the colorIe to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetColorIe(colorIe *string) { + o.ColorIe = colorIe +} + +// WithColorIew adds the colorIew to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithColorIew(colorIew *string) *DcimFrontPortTemplatesListParams { + o.SetColorIew(colorIew) + return o +} + +// SetColorIew adds the colorIew to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetColorIew(colorIew *string) { + o.ColorIew = colorIew +} + +// WithColorIsw adds the colorIsw to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithColorIsw(colorIsw *string) *DcimFrontPortTemplatesListParams { + o.SetColorIsw(colorIsw) + return o +} + +// SetColorIsw adds the colorIsw to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetColorIsw(colorIsw *string) { + o.ColorIsw = colorIsw +} + +// WithColorn adds the colorn to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithColorn(colorn *string) *DcimFrontPortTemplatesListParams { + o.SetColorn(colorn) + return o +} + +// SetColorn adds the colorN to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetColorn(colorn *string) { + o.Colorn = colorn +} + +// WithColorNic adds the colorNic to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithColorNic(colorNic *string) *DcimFrontPortTemplatesListParams { + o.SetColorNic(colorNic) + return o +} + +// SetColorNic adds the colorNic to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetColorNic(colorNic *string) { + o.ColorNic = colorNic +} + +// WithColorNie adds the colorNie to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithColorNie(colorNie *string) *DcimFrontPortTemplatesListParams { + o.SetColorNie(colorNie) + return o +} + +// SetColorNie adds the colorNie to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetColorNie(colorNie *string) { + o.ColorNie = colorNie +} + +// WithColorNiew adds the colorNiew to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithColorNiew(colorNiew *string) *DcimFrontPortTemplatesListParams { + o.SetColorNiew(colorNiew) + return o +} + +// SetColorNiew adds the colorNiew to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetColorNiew(colorNiew *string) { + o.ColorNiew = colorNiew +} + +// WithColorNisw adds the colorNisw to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithColorNisw(colorNisw *string) *DcimFrontPortTemplatesListParams { + o.SetColorNisw(colorNisw) + return o +} + +// SetColorNisw adds the colorNisw to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetColorNisw(colorNisw *string) { + o.ColorNisw = colorNisw +} + // WithCreated adds the created to the dcim front port templates list params func (o *DcimFrontPortTemplatesListParams) WithCreated(created *string) *DcimFrontPortTemplatesListParams { o.SetCreated(created) @@ -548,6 +702,193 @@ func (o *DcimFrontPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } var res []error + if o.Color != nil { + + // query param color + var qrColor string + + if o.Color != nil { + qrColor = *o.Color + } + qColor := qrColor + if qColor != "" { + + if err := r.SetQueryParam("color", qColor); err != nil { + return err + } + } + } + + if o.ColorEmpty != nil { + + // query param color__empty + var qrColorEmpty string + + if o.ColorEmpty != nil { + qrColorEmpty = *o.ColorEmpty + } + qColorEmpty := qrColorEmpty + if qColorEmpty != "" { + + if err := r.SetQueryParam("color__empty", qColorEmpty); err != nil { + return err + } + } + } + + if o.ColorIc != nil { + + // query param color__ic + var qrColorIc string + + if o.ColorIc != nil { + qrColorIc = *o.ColorIc + } + qColorIc := qrColorIc + if qColorIc != "" { + + if err := r.SetQueryParam("color__ic", qColorIc); err != nil { + return err + } + } + } + + if o.ColorIe != nil { + + // query param color__ie + var qrColorIe string + + if o.ColorIe != nil { + qrColorIe = *o.ColorIe + } + qColorIe := qrColorIe + if qColorIe != "" { + + if err := r.SetQueryParam("color__ie", qColorIe); err != nil { + return err + } + } + } + + if o.ColorIew != nil { + + // query param color__iew + var qrColorIew string + + if o.ColorIew != nil { + qrColorIew = *o.ColorIew + } + qColorIew := qrColorIew + if qColorIew != "" { + + if err := r.SetQueryParam("color__iew", qColorIew); err != nil { + return err + } + } + } + + if o.ColorIsw != nil { + + // query param color__isw + var qrColorIsw string + + if o.ColorIsw != nil { + qrColorIsw = *o.ColorIsw + } + qColorIsw := qrColorIsw + if qColorIsw != "" { + + if err := r.SetQueryParam("color__isw", qColorIsw); err != nil { + return err + } + } + } + + if o.Colorn != nil { + + // query param color__n + var qrColorn string + + if o.Colorn != nil { + qrColorn = *o.Colorn + } + qColorn := qrColorn + if qColorn != "" { + + if err := r.SetQueryParam("color__n", qColorn); err != nil { + return err + } + } + } + + if o.ColorNic != nil { + + // query param color__nic + var qrColorNic string + + if o.ColorNic != nil { + qrColorNic = *o.ColorNic + } + qColorNic := qrColorNic + if qColorNic != "" { + + if err := r.SetQueryParam("color__nic", qColorNic); err != nil { + return err + } + } + } + + if o.ColorNie != nil { + + // query param color__nie + var qrColorNie string + + if o.ColorNie != nil { + qrColorNie = *o.ColorNie + } + qColorNie := qrColorNie + if qColorNie != "" { + + if err := r.SetQueryParam("color__nie", qColorNie); err != nil { + return err + } + } + } + + if o.ColorNiew != nil { + + // query param color__niew + var qrColorNiew string + + if o.ColorNiew != nil { + qrColorNiew = *o.ColorNiew + } + qColorNiew := qrColorNiew + if qColorNiew != "" { + + if err := r.SetQueryParam("color__niew", qColorNiew); err != nil { + return err + } + } + } + + if o.ColorNisw != nil { + + // query param color__nisw + var qrColorNisw string + + if o.ColorNisw != nil { + qrColorNisw = *o.ColorNisw + } + qColorNisw := qrColorNisw + if qColorNisw != "" { + + if err := r.SetQueryParam("color__nisw", qColorNisw); err != nil { + return err + } + } + } + if o.Created != nil { // query param created diff --git a/netbox/client/dcim/dcim_front_ports_list_parameters.go b/netbox/client/dcim/dcim_front_ports_list_parameters.go index 56a62f046..cd7f99df9 100644 --- a/netbox/client/dcim/dcim_front_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_front_ports_list_parameters.go @@ -78,6 +78,39 @@ type DcimFrontPortsListParams struct { // Cabled. Cabled *string + // Color. + Color *string + + // ColorEmpty. + ColorEmpty *string + + // ColorIc. + ColorIc *string + + // ColorIe. + ColorIe *string + + // ColorIew. + ColorIew *string + + // ColorIsw. + ColorIsw *string + + // Colorn. + Colorn *string + + // ColorNic. + ColorNic *string + + // ColorNie. + ColorNie *string + + // ColorNiew. + ColorNiew *string + + // ColorNisw. + ColorNisw *string + // Created. Created *string @@ -198,6 +231,18 @@ type DcimFrontPortsListParams struct { */ Limit *int64 + // Location. + Location *string + + // Locationn. + Locationn *string + + // LocationID. + LocationID *string + + // LocationIDn. + LocationIDn *string + // Name. Name *string @@ -352,6 +397,127 @@ func (o *DcimFrontPortsListParams) SetCabled(cabled *string) { o.Cabled = cabled } +// WithColor adds the color to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithColor(color *string) *DcimFrontPortsListParams { + o.SetColor(color) + return o +} + +// SetColor adds the color to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetColor(color *string) { + o.Color = color +} + +// WithColorEmpty adds the colorEmpty to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithColorEmpty(colorEmpty *string) *DcimFrontPortsListParams { + o.SetColorEmpty(colorEmpty) + return o +} + +// SetColorEmpty adds the colorEmpty to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetColorEmpty(colorEmpty *string) { + o.ColorEmpty = colorEmpty +} + +// WithColorIc adds the colorIc to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithColorIc(colorIc *string) *DcimFrontPortsListParams { + o.SetColorIc(colorIc) + return o +} + +// SetColorIc adds the colorIc to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetColorIc(colorIc *string) { + o.ColorIc = colorIc +} + +// WithColorIe adds the colorIe to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithColorIe(colorIe *string) *DcimFrontPortsListParams { + o.SetColorIe(colorIe) + return o +} + +// SetColorIe adds the colorIe to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetColorIe(colorIe *string) { + o.ColorIe = colorIe +} + +// WithColorIew adds the colorIew to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithColorIew(colorIew *string) *DcimFrontPortsListParams { + o.SetColorIew(colorIew) + return o +} + +// SetColorIew adds the colorIew to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetColorIew(colorIew *string) { + o.ColorIew = colorIew +} + +// WithColorIsw adds the colorIsw to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithColorIsw(colorIsw *string) *DcimFrontPortsListParams { + o.SetColorIsw(colorIsw) + return o +} + +// SetColorIsw adds the colorIsw to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetColorIsw(colorIsw *string) { + o.ColorIsw = colorIsw +} + +// WithColorn adds the colorn to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithColorn(colorn *string) *DcimFrontPortsListParams { + o.SetColorn(colorn) + return o +} + +// SetColorn adds the colorN to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetColorn(colorn *string) { + o.Colorn = colorn +} + +// WithColorNic adds the colorNic to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithColorNic(colorNic *string) *DcimFrontPortsListParams { + o.SetColorNic(colorNic) + return o +} + +// SetColorNic adds the colorNic to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetColorNic(colorNic *string) { + o.ColorNic = colorNic +} + +// WithColorNie adds the colorNie to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithColorNie(colorNie *string) *DcimFrontPortsListParams { + o.SetColorNie(colorNie) + return o +} + +// SetColorNie adds the colorNie to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetColorNie(colorNie *string) { + o.ColorNie = colorNie +} + +// WithColorNiew adds the colorNiew to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithColorNiew(colorNiew *string) *DcimFrontPortsListParams { + o.SetColorNiew(colorNiew) + return o +} + +// SetColorNiew adds the colorNiew to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetColorNiew(colorNiew *string) { + o.ColorNiew = colorNiew +} + +// WithColorNisw adds the colorNisw to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithColorNisw(colorNisw *string) *DcimFrontPortsListParams { + o.SetColorNisw(colorNisw) + return o +} + +// SetColorNisw adds the colorNisw to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetColorNisw(colorNisw *string) { + o.ColorNisw = colorNisw +} + // WithCreated adds the created to the dcim front ports list params func (o *DcimFrontPortsListParams) WithCreated(created *string) *DcimFrontPortsListParams { o.SetCreated(created) @@ -781,6 +947,50 @@ func (o *DcimFrontPortsListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithLocation adds the location to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithLocation(location *string) *DcimFrontPortsListParams { + o.SetLocation(location) + return o +} + +// SetLocation adds the location to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetLocation(location *string) { + o.Location = location +} + +// WithLocationn adds the locationn to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithLocationn(locationn *string) *DcimFrontPortsListParams { + o.SetLocationn(locationn) + return o +} + +// SetLocationn adds the locationN to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetLocationn(locationn *string) { + o.Locationn = locationn +} + +// WithLocationID adds the locationID to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithLocationID(locationID *string) *DcimFrontPortsListParams { + o.SetLocationID(locationID) + return o +} + +// SetLocationID adds the locationId to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetLocationID(locationID *string) { + o.LocationID = locationID +} + +// WithLocationIDn adds the locationIDn to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithLocationIDn(locationIDn *string) *DcimFrontPortsListParams { + o.SetLocationIDn(locationIDn) + return o +} + +// SetLocationIDn adds the locationIdN to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetLocationIDn(locationIDn *string) { + o.LocationIDn = locationIDn +} + // WithName adds the name to the dcim front ports list params func (o *DcimFrontPortsListParams) WithName(name *string) *DcimFrontPortsListParams { o.SetName(name) @@ -1125,6 +1335,193 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Color != nil { + + // query param color + var qrColor string + + if o.Color != nil { + qrColor = *o.Color + } + qColor := qrColor + if qColor != "" { + + if err := r.SetQueryParam("color", qColor); err != nil { + return err + } + } + } + + if o.ColorEmpty != nil { + + // query param color__empty + var qrColorEmpty string + + if o.ColorEmpty != nil { + qrColorEmpty = *o.ColorEmpty + } + qColorEmpty := qrColorEmpty + if qColorEmpty != "" { + + if err := r.SetQueryParam("color__empty", qColorEmpty); err != nil { + return err + } + } + } + + if o.ColorIc != nil { + + // query param color__ic + var qrColorIc string + + if o.ColorIc != nil { + qrColorIc = *o.ColorIc + } + qColorIc := qrColorIc + if qColorIc != "" { + + if err := r.SetQueryParam("color__ic", qColorIc); err != nil { + return err + } + } + } + + if o.ColorIe != nil { + + // query param color__ie + var qrColorIe string + + if o.ColorIe != nil { + qrColorIe = *o.ColorIe + } + qColorIe := qrColorIe + if qColorIe != "" { + + if err := r.SetQueryParam("color__ie", qColorIe); err != nil { + return err + } + } + } + + if o.ColorIew != nil { + + // query param color__iew + var qrColorIew string + + if o.ColorIew != nil { + qrColorIew = *o.ColorIew + } + qColorIew := qrColorIew + if qColorIew != "" { + + if err := r.SetQueryParam("color__iew", qColorIew); err != nil { + return err + } + } + } + + if o.ColorIsw != nil { + + // query param color__isw + var qrColorIsw string + + if o.ColorIsw != nil { + qrColorIsw = *o.ColorIsw + } + qColorIsw := qrColorIsw + if qColorIsw != "" { + + if err := r.SetQueryParam("color__isw", qColorIsw); err != nil { + return err + } + } + } + + if o.Colorn != nil { + + // query param color__n + var qrColorn string + + if o.Colorn != nil { + qrColorn = *o.Colorn + } + qColorn := qrColorn + if qColorn != "" { + + if err := r.SetQueryParam("color__n", qColorn); err != nil { + return err + } + } + } + + if o.ColorNic != nil { + + // query param color__nic + var qrColorNic string + + if o.ColorNic != nil { + qrColorNic = *o.ColorNic + } + qColorNic := qrColorNic + if qColorNic != "" { + + if err := r.SetQueryParam("color__nic", qColorNic); err != nil { + return err + } + } + } + + if o.ColorNie != nil { + + // query param color__nie + var qrColorNie string + + if o.ColorNie != nil { + qrColorNie = *o.ColorNie + } + qColorNie := qrColorNie + if qColorNie != "" { + + if err := r.SetQueryParam("color__nie", qColorNie); err != nil { + return err + } + } + } + + if o.ColorNiew != nil { + + // query param color__niew + var qrColorNiew string + + if o.ColorNiew != nil { + qrColorNiew = *o.ColorNiew + } + qColorNiew := qrColorNiew + if qColorNiew != "" { + + if err := r.SetQueryParam("color__niew", qColorNiew); err != nil { + return err + } + } + } + + if o.ColorNisw != nil { + + // query param color__nisw + var qrColorNisw string + + if o.ColorNisw != nil { + qrColorNisw = *o.ColorNisw + } + qColorNisw := qrColorNisw + if qColorNisw != "" { + + if err := r.SetQueryParam("color__nisw", qColorNisw); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -1788,6 +2185,74 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Location != nil { + + // query param location + var qrLocation string + + if o.Location != nil { + qrLocation = *o.Location + } + qLocation := qrLocation + if qLocation != "" { + + if err := r.SetQueryParam("location", qLocation); err != nil { + return err + } + } + } + + if o.Locationn != nil { + + // query param location__n + var qrLocationn string + + if o.Locationn != nil { + qrLocationn = *o.Locationn + } + qLocationn := qrLocationn + if qLocationn != "" { + + if err := r.SetQueryParam("location__n", qLocationn); err != nil { + return err + } + } + } + + if o.LocationID != nil { + + // query param location_id + var qrLocationID string + + if o.LocationID != nil { + qrLocationID = *o.LocationID + } + qLocationID := qrLocationID + if qLocationID != "" { + + if err := r.SetQueryParam("location_id", qLocationID); err != nil { + return err + } + } + } + + if o.LocationIDn != nil { + + // query param location_id__n + var qrLocationIDn string + + if o.LocationIDn != nil { + qrLocationIDn = *o.LocationIDn + } + qLocationIDn := qrLocationIDn + if qLocationIDn != "" { + + if err := r.SetQueryParam("location_id__n", qLocationIDn); err != nil { + return err + } + } + } + if o.Name != nil { // query param name diff --git a/netbox/client/dcim/dcim_interface_connections_list_parameters.go b/netbox/client/dcim/dcim_interface_connections_list_parameters.go deleted file mode 100644 index 4eae6ac6d..000000000 --- a/netbox/client/dcim/dcim_interface_connections_list_parameters.go +++ /dev/null @@ -1,304 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package dcim - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewDcimInterfaceConnectionsListParams creates a new DcimInterfaceConnectionsListParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDcimInterfaceConnectionsListParams() *DcimInterfaceConnectionsListParams { - return &DcimInterfaceConnectionsListParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDcimInterfaceConnectionsListParamsWithTimeout creates a new DcimInterfaceConnectionsListParams object -// with the ability to set a timeout on a request. -func NewDcimInterfaceConnectionsListParamsWithTimeout(timeout time.Duration) *DcimInterfaceConnectionsListParams { - return &DcimInterfaceConnectionsListParams{ - timeout: timeout, - } -} - -// NewDcimInterfaceConnectionsListParamsWithContext creates a new DcimInterfaceConnectionsListParams object -// with the ability to set a context for a request. -func NewDcimInterfaceConnectionsListParamsWithContext(ctx context.Context) *DcimInterfaceConnectionsListParams { - return &DcimInterfaceConnectionsListParams{ - Context: ctx, - } -} - -// NewDcimInterfaceConnectionsListParamsWithHTTPClient creates a new DcimInterfaceConnectionsListParams object -// with the ability to set a custom HTTPClient for a request. -func NewDcimInterfaceConnectionsListParamsWithHTTPClient(client *http.Client) *DcimInterfaceConnectionsListParams { - return &DcimInterfaceConnectionsListParams{ - HTTPClient: client, - } -} - -/* DcimInterfaceConnectionsListParams contains all the parameters to send to the API endpoint - for the dcim interface connections list operation. - - Typically these are written to a http.Request. -*/ -type DcimInterfaceConnectionsListParams struct { - - // Device. - Device *string - - // DeviceID. - DeviceID *string - - /* Limit. - - Number of results to return per page. - */ - Limit *int64 - - /* Offset. - - The initial index from which to return the results. - */ - Offset *int64 - - // Site. - Site *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the dcim interface connections list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DcimInterfaceConnectionsListParams) WithDefaults() *DcimInterfaceConnectionsListParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the dcim interface connections list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DcimInterfaceConnectionsListParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) WithTimeout(timeout time.Duration) *DcimInterfaceConnectionsListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) WithContext(ctx context.Context) *DcimInterfaceConnectionsListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) WithHTTPClient(client *http.Client) *DcimInterfaceConnectionsListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDevice adds the device to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) WithDevice(device *string) *DcimInterfaceConnectionsListParams { - o.SetDevice(device) - return o -} - -// SetDevice adds the device to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) SetDevice(device *string) { - o.Device = device -} - -// WithDeviceID adds the deviceID to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) WithDeviceID(deviceID *string) *DcimInterfaceConnectionsListParams { - o.SetDeviceID(deviceID) - return o -} - -// SetDeviceID adds the deviceId to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) SetDeviceID(deviceID *string) { - o.DeviceID = deviceID -} - -// WithLimit adds the limit to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) WithLimit(limit *int64) *DcimInterfaceConnectionsListParams { - o.SetLimit(limit) - return o -} - -// SetLimit adds the limit to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) SetLimit(limit *int64) { - o.Limit = limit -} - -// WithOffset adds the offset to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) WithOffset(offset *int64) *DcimInterfaceConnectionsListParams { - o.SetOffset(offset) - return o -} - -// SetOffset adds the offset to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) SetOffset(offset *int64) { - o.Offset = offset -} - -// WithSite adds the site to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) WithSite(site *string) *DcimInterfaceConnectionsListParams { - o.SetSite(site) - return o -} - -// SetSite adds the site to the dcim interface connections list params -func (o *DcimInterfaceConnectionsListParams) SetSite(site *string) { - o.Site = site -} - -// WriteToRequest writes these params to a swagger request -func (o *DcimInterfaceConnectionsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Device != nil { - - // query param device - var qrDevice string - - if o.Device != nil { - qrDevice = *o.Device - } - qDevice := qrDevice - if qDevice != "" { - - if err := r.SetQueryParam("device", qDevice); err != nil { - return err - } - } - } - - if o.DeviceID != nil { - - // query param device_id - var qrDeviceID string - - if o.DeviceID != nil { - qrDeviceID = *o.DeviceID - } - qDeviceID := qrDeviceID - if qDeviceID != "" { - - if err := r.SetQueryParam("device_id", qDeviceID); err != nil { - return err - } - } - } - - if o.Limit != nil { - - // query param limit - var qrLimit int64 - - if o.Limit != nil { - qrLimit = *o.Limit - } - qLimit := swag.FormatInt64(qrLimit) - if qLimit != "" { - - if err := r.SetQueryParam("limit", qLimit); err != nil { - return err - } - } - } - - if o.Offset != nil { - - // query param offset - var qrOffset int64 - - if o.Offset != nil { - qrOffset = *o.Offset - } - qOffset := swag.FormatInt64(qrOffset) - if qOffset != "" { - - if err := r.SetQueryParam("offset", qOffset); err != nil { - return err - } - } - } - - if o.Site != nil { - - // query param site - var qrSite string - - if o.Site != nil { - qrSite = *o.Site - } - qSite := qrSite - if qSite != "" { - - if err := r.SetQueryParam("site", qSite); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/dcim/dcim_interface_connections_list_responses.go b/netbox/client/dcim/dcim_interface_connections_list_responses.go deleted file mode 100644 index 2d163d71f..000000000 --- a/netbox/client/dcim/dcim_interface_connections_list_responses.go +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package dcim - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// DcimInterfaceConnectionsListReader is a Reader for the DcimInterfaceConnectionsList structure. -type DcimInterfaceConnectionsListReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DcimInterfaceConnectionsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDcimInterfaceConnectionsListOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDcimInterfaceConnectionsListOK creates a DcimInterfaceConnectionsListOK with default headers values -func NewDcimInterfaceConnectionsListOK() *DcimInterfaceConnectionsListOK { - return &DcimInterfaceConnectionsListOK{} -} - -/* DcimInterfaceConnectionsListOK describes a response with status code 200, with default header values. - -DcimInterfaceConnectionsListOK dcim interface connections list o k -*/ -type DcimInterfaceConnectionsListOK struct { - Payload *DcimInterfaceConnectionsListOKBody -} - -func (o *DcimInterfaceConnectionsListOK) Error() string { - return fmt.Sprintf("[GET /dcim/interface-connections/][%d] dcimInterfaceConnectionsListOK %+v", 200, o.Payload) -} -func (o *DcimInterfaceConnectionsListOK) GetPayload() *DcimInterfaceConnectionsListOKBody { - return o.Payload -} - -func (o *DcimInterfaceConnectionsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(DcimInterfaceConnectionsListOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/*DcimInterfaceConnectionsListOKBody dcim interface connections list o k body -swagger:model DcimInterfaceConnectionsListOKBody -*/ -type DcimInterfaceConnectionsListOKBody struct { - - // count - // Required: true - Count *int64 `json:"count"` - - // next - // Format: uri - Next *strfmt.URI `json:"next,omitempty"` - - // previous - // Format: uri - Previous *strfmt.URI `json:"previous,omitempty"` - - // results - // Required: true - Results []*models.InterfaceConnection `json:"results"` -} - -// Validate validates this dcim interface connections list o k body -func (o *DcimInterfaceConnectionsListOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateCount(formats); err != nil { - res = append(res, err) - } - - if err := o.validateNext(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePrevious(formats); err != nil { - res = append(res, err) - } - - if err := o.validateResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *DcimInterfaceConnectionsListOKBody) validateCount(formats strfmt.Registry) error { - - if err := validate.Required("dcimInterfaceConnectionsListOK"+"."+"count", "body", o.Count); err != nil { - return err - } - - return nil -} - -func (o *DcimInterfaceConnectionsListOKBody) validateNext(formats strfmt.Registry) error { - if swag.IsZero(o.Next) { // not required - return nil - } - - if err := validate.FormatOf("dcimInterfaceConnectionsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { - return err - } - - return nil -} - -func (o *DcimInterfaceConnectionsListOKBody) validatePrevious(formats strfmt.Registry) error { - if swag.IsZero(o.Previous) { // not required - return nil - } - - if err := validate.FormatOf("dcimInterfaceConnectionsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { - return err - } - - return nil -} - -func (o *DcimInterfaceConnectionsListOKBody) validateResults(formats strfmt.Registry) error { - - if err := validate.Required("dcimInterfaceConnectionsListOK"+"."+"results", "body", o.Results); err != nil { - return err - } - - for i := 0; i < len(o.Results); i++ { - if swag.IsZero(o.Results[i]) { // not required - continue - } - - if o.Results[i] != nil { - if err := o.Results[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dcimInterfaceConnectionsListOK" + "." + "results" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this dcim interface connections list o k body based on the context it is used -func (o *DcimInterfaceConnectionsListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *DcimInterfaceConnectionsListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(o.Results); i++ { - - if o.Results[i] != nil { - if err := o.Results[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dcimInterfaceConnectionsListOK" + "." + "results" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (o *DcimInterfaceConnectionsListOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *DcimInterfaceConnectionsListOKBody) UnmarshalBinary(b []byte) error { - var res DcimInterfaceConnectionsListOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/netbox/client/dcim/dcim_interfaces_list_parameters.go b/netbox/client/dcim/dcim_interfaces_list_parameters.go index 81c7e0f46..2506d0f7f 100644 --- a/netbox/client/dcim/dcim_interfaces_list_parameters.go +++ b/netbox/client/dcim/dcim_interfaces_list_parameters.go @@ -207,6 +207,18 @@ type DcimInterfacesListParams struct { */ Limit *int64 + // Location. + Location *string + + // Locationn. + Locationn *string + + // LocationID. + LocationID *string + + // LocationIDn. + LocationIDn *string + // MacAddress. MacAddress *string @@ -892,6 +904,50 @@ func (o *DcimInterfacesListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithLocation adds the location to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithLocation(location *string) *DcimInterfacesListParams { + o.SetLocation(location) + return o +} + +// SetLocation adds the location to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetLocation(location *string) { + o.Location = location +} + +// WithLocationn adds the locationn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithLocationn(locationn *string) *DcimInterfacesListParams { + o.SetLocationn(locationn) + return o +} + +// SetLocationn adds the locationN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetLocationn(locationn *string) { + o.Locationn = locationn +} + +// WithLocationID adds the locationID to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithLocationID(locationID *string) *DcimInterfacesListParams { + o.SetLocationID(locationID) + return o +} + +// SetLocationID adds the locationId to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetLocationID(locationID *string) { + o.LocationID = locationID +} + +// WithLocationIDn adds the locationIDn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithLocationIDn(locationIDn *string) *DcimInterfacesListParams { + o.SetLocationIDn(locationIDn) + return o +} + +// SetLocationIDn adds the locationIdN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetLocationIDn(locationIDn *string) { + o.LocationIDn = locationIDn +} + // WithMacAddress adds the macAddress to the dcim interfaces list params func (o *DcimInterfacesListParams) WithMacAddress(macAddress *string) *DcimInterfacesListParams { o.SetMacAddress(macAddress) @@ -2203,6 +2259,74 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Location != nil { + + // query param location + var qrLocation string + + if o.Location != nil { + qrLocation = *o.Location + } + qLocation := qrLocation + if qLocation != "" { + + if err := r.SetQueryParam("location", qLocation); err != nil { + return err + } + } + } + + if o.Locationn != nil { + + // query param location__n + var qrLocationn string + + if o.Locationn != nil { + qrLocationn = *o.Locationn + } + qLocationn := qrLocationn + if qLocationn != "" { + + if err := r.SetQueryParam("location__n", qLocationn); err != nil { + return err + } + } + } + + if o.LocationID != nil { + + // query param location_id + var qrLocationID string + + if o.LocationID != nil { + qrLocationID = *o.LocationID + } + qLocationID := qrLocationID + if qLocationID != "" { + + if err := r.SetQueryParam("location_id", qLocationID); err != nil { + return err + } + } + } + + if o.LocationIDn != nil { + + // query param location_id__n + var qrLocationIDn string + + if o.LocationIDn != nil { + qrLocationIDn = *o.LocationIDn + } + qLocationIDn := qrLocationIDn + if qLocationIDn != "" { + + if err := r.SetQueryParam("location_id__n", qLocationIDn); err != nil { + return err + } + } + } + if o.MacAddress != nil { // query param mac_address diff --git a/netbox/client/dcim/dcim_inventory_items_list_parameters.go b/netbox/client/dcim/dcim_inventory_items_list_parameters.go index 57461826c..bc2b0fd83 100644 --- a/netbox/client/dcim/dcim_inventory_items_list_parameters.go +++ b/netbox/client/dcim/dcim_inventory_items_list_parameters.go @@ -198,6 +198,18 @@ type DcimInventoryItemsListParams struct { */ Limit *int64 + // Location. + Location *string + + // Locationn. + Locationn *string + + // LocationID. + LocationID *string + + // LocationIDn. + LocationIDn *string + // Manufacturer. Manufacturer *string @@ -829,6 +841,50 @@ func (o *DcimInventoryItemsListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithLocation adds the location to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithLocation(location *string) *DcimInventoryItemsListParams { + o.SetLocation(location) + return o +} + +// SetLocation adds the location to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetLocation(location *string) { + o.Location = location +} + +// WithLocationn adds the locationn to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithLocationn(locationn *string) *DcimInventoryItemsListParams { + o.SetLocationn(locationn) + return o +} + +// SetLocationn adds the locationN to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetLocationn(locationn *string) { + o.Locationn = locationn +} + +// WithLocationID adds the locationID to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithLocationID(locationID *string) *DcimInventoryItemsListParams { + o.SetLocationID(locationID) + return o +} + +// SetLocationID adds the locationId to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetLocationID(locationID *string) { + o.LocationID = locationID +} + +// WithLocationIDn adds the locationIDn to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithLocationIDn(locationIDn *string) *DcimInventoryItemsListParams { + o.SetLocationIDn(locationIDn) + return o +} + +// SetLocationIDn adds the locationIdN to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetLocationIDn(locationIDn *string) { + o.LocationIDn = locationIDn +} + // WithManufacturer adds the manufacturer to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithManufacturer(manufacturer *string) *DcimInventoryItemsListParams { o.SetManufacturer(manufacturer) @@ -2012,6 +2068,74 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.Location != nil { + + // query param location + var qrLocation string + + if o.Location != nil { + qrLocation = *o.Location + } + qLocation := qrLocation + if qLocation != "" { + + if err := r.SetQueryParam("location", qLocation); err != nil { + return err + } + } + } + + if o.Locationn != nil { + + // query param location__n + var qrLocationn string + + if o.Locationn != nil { + qrLocationn = *o.Locationn + } + qLocationn := qrLocationn + if qLocationn != "" { + + if err := r.SetQueryParam("location__n", qLocationn); err != nil { + return err + } + } + } + + if o.LocationID != nil { + + // query param location_id + var qrLocationID string + + if o.LocationID != nil { + qrLocationID = *o.LocationID + } + qLocationID := qrLocationID + if qLocationID != "" { + + if err := r.SetQueryParam("location_id", qLocationID); err != nil { + return err + } + } + } + + if o.LocationIDn != nil { + + // query param location_id__n + var qrLocationIDn string + + if o.LocationIDn != nil { + qrLocationIDn = *o.LocationIDn + } + qLocationIDn := qrLocationIDn + if qLocationIDn != "" { + + if err := r.SetQueryParam("location_id__n", qLocationIDn); err != nil { + return err + } + } + } + if o.Manufacturer != nil { // query param manufacturer diff --git a/netbox/client/dcim/dcim_power_connections_list_parameters.go b/netbox/client/dcim/dcim_power_connections_list_parameters.go deleted file mode 100644 index b949332b7..000000000 --- a/netbox/client/dcim/dcim_power_connections_list_parameters.go +++ /dev/null @@ -1,645 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package dcim - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewDcimPowerConnectionsListParams creates a new DcimPowerConnectionsListParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDcimPowerConnectionsListParams() *DcimPowerConnectionsListParams { - return &DcimPowerConnectionsListParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDcimPowerConnectionsListParamsWithTimeout creates a new DcimPowerConnectionsListParams object -// with the ability to set a timeout on a request. -func NewDcimPowerConnectionsListParamsWithTimeout(timeout time.Duration) *DcimPowerConnectionsListParams { - return &DcimPowerConnectionsListParams{ - timeout: timeout, - } -} - -// NewDcimPowerConnectionsListParamsWithContext creates a new DcimPowerConnectionsListParams object -// with the ability to set a context for a request. -func NewDcimPowerConnectionsListParamsWithContext(ctx context.Context) *DcimPowerConnectionsListParams { - return &DcimPowerConnectionsListParams{ - Context: ctx, - } -} - -// NewDcimPowerConnectionsListParamsWithHTTPClient creates a new DcimPowerConnectionsListParams object -// with the ability to set a custom HTTPClient for a request. -func NewDcimPowerConnectionsListParamsWithHTTPClient(client *http.Client) *DcimPowerConnectionsListParams { - return &DcimPowerConnectionsListParams{ - HTTPClient: client, - } -} - -/* DcimPowerConnectionsListParams contains all the parameters to send to the API endpoint - for the dcim power connections list operation. - - Typically these are written to a http.Request. -*/ -type DcimPowerConnectionsListParams struct { - - // Device. - Device *string - - // DeviceID. - DeviceID *string - - /* Limit. - - Number of results to return per page. - */ - Limit *int64 - - // Name. - Name *string - - // NameEmpty. - NameEmpty *string - - // NameIc. - NameIc *string - - // NameIe. - NameIe *string - - // NameIew. - NameIew *string - - // NameIsw. - NameIsw *string - - // Namen. - Namen *string - - // NameNic. - NameNic *string - - // NameNie. - NameNie *string - - // NameNiew. - NameNiew *string - - // NameNisw. - NameNisw *string - - /* Offset. - - The initial index from which to return the results. - */ - Offset *int64 - - // Site. - Site *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the dcim power connections list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DcimPowerConnectionsListParams) WithDefaults() *DcimPowerConnectionsListParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the dcim power connections list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DcimPowerConnectionsListParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithTimeout(timeout time.Duration) *DcimPowerConnectionsListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithContext(ctx context.Context) *DcimPowerConnectionsListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithHTTPClient(client *http.Client) *DcimPowerConnectionsListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDevice adds the device to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithDevice(device *string) *DcimPowerConnectionsListParams { - o.SetDevice(device) - return o -} - -// SetDevice adds the device to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetDevice(device *string) { - o.Device = device -} - -// WithDeviceID adds the deviceID to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithDeviceID(deviceID *string) *DcimPowerConnectionsListParams { - o.SetDeviceID(deviceID) - return o -} - -// SetDeviceID adds the deviceId to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetDeviceID(deviceID *string) { - o.DeviceID = deviceID -} - -// WithLimit adds the limit to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithLimit(limit *int64) *DcimPowerConnectionsListParams { - o.SetLimit(limit) - return o -} - -// SetLimit adds the limit to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetLimit(limit *int64) { - o.Limit = limit -} - -// WithName adds the name to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithName(name *string) *DcimPowerConnectionsListParams { - o.SetName(name) - return o -} - -// SetName adds the name to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetName(name *string) { - o.Name = name -} - -// WithNameEmpty adds the nameEmpty to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithNameEmpty(nameEmpty *string) *DcimPowerConnectionsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - -// WithNameIc adds the nameIc to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithNameIc(nameIc *string) *DcimPowerConnectionsListParams { - o.SetNameIc(nameIc) - return o -} - -// SetNameIc adds the nameIc to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetNameIc(nameIc *string) { - o.NameIc = nameIc -} - -// WithNameIe adds the nameIe to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithNameIe(nameIe *string) *DcimPowerConnectionsListParams { - o.SetNameIe(nameIe) - return o -} - -// SetNameIe adds the nameIe to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetNameIe(nameIe *string) { - o.NameIe = nameIe -} - -// WithNameIew adds the nameIew to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithNameIew(nameIew *string) *DcimPowerConnectionsListParams { - o.SetNameIew(nameIew) - return o -} - -// SetNameIew adds the nameIew to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetNameIew(nameIew *string) { - o.NameIew = nameIew -} - -// WithNameIsw adds the nameIsw to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithNameIsw(nameIsw *string) *DcimPowerConnectionsListParams { - o.SetNameIsw(nameIsw) - return o -} - -// SetNameIsw adds the nameIsw to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetNameIsw(nameIsw *string) { - o.NameIsw = nameIsw -} - -// WithNamen adds the namen to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithNamen(namen *string) *DcimPowerConnectionsListParams { - o.SetNamen(namen) - return o -} - -// SetNamen adds the nameN to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetNamen(namen *string) { - o.Namen = namen -} - -// WithNameNic adds the nameNic to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithNameNic(nameNic *string) *DcimPowerConnectionsListParams { - o.SetNameNic(nameNic) - return o -} - -// SetNameNic adds the nameNic to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetNameNic(nameNic *string) { - o.NameNic = nameNic -} - -// WithNameNie adds the nameNie to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithNameNie(nameNie *string) *DcimPowerConnectionsListParams { - o.SetNameNie(nameNie) - return o -} - -// SetNameNie adds the nameNie to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetNameNie(nameNie *string) { - o.NameNie = nameNie -} - -// WithNameNiew adds the nameNiew to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithNameNiew(nameNiew *string) *DcimPowerConnectionsListParams { - o.SetNameNiew(nameNiew) - return o -} - -// SetNameNiew adds the nameNiew to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetNameNiew(nameNiew *string) { - o.NameNiew = nameNiew -} - -// WithNameNisw adds the nameNisw to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithNameNisw(nameNisw *string) *DcimPowerConnectionsListParams { - o.SetNameNisw(nameNisw) - return o -} - -// SetNameNisw adds the nameNisw to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetNameNisw(nameNisw *string) { - o.NameNisw = nameNisw -} - -// WithOffset adds the offset to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithOffset(offset *int64) *DcimPowerConnectionsListParams { - o.SetOffset(offset) - return o -} - -// SetOffset adds the offset to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetOffset(offset *int64) { - o.Offset = offset -} - -// WithSite adds the site to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) WithSite(site *string) *DcimPowerConnectionsListParams { - o.SetSite(site) - return o -} - -// SetSite adds the site to the dcim power connections list params -func (o *DcimPowerConnectionsListParams) SetSite(site *string) { - o.Site = site -} - -// WriteToRequest writes these params to a swagger request -func (o *DcimPowerConnectionsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Device != nil { - - // query param device - var qrDevice string - - if o.Device != nil { - qrDevice = *o.Device - } - qDevice := qrDevice - if qDevice != "" { - - if err := r.SetQueryParam("device", qDevice); err != nil { - return err - } - } - } - - if o.DeviceID != nil { - - // query param device_id - var qrDeviceID string - - if o.DeviceID != nil { - qrDeviceID = *o.DeviceID - } - qDeviceID := qrDeviceID - if qDeviceID != "" { - - if err := r.SetQueryParam("device_id", qDeviceID); err != nil { - return err - } - } - } - - if o.Limit != nil { - - // query param limit - var qrLimit int64 - - if o.Limit != nil { - qrLimit = *o.Limit - } - qLimit := swag.FormatInt64(qrLimit) - if qLimit != "" { - - if err := r.SetQueryParam("limit", qLimit); err != nil { - return err - } - } - } - - if o.Name != nil { - - // query param name - var qrName string - - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - } - - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - - if o.NameIc != nil { - - // query param name__ic - var qrNameIc string - - if o.NameIc != nil { - qrNameIc = *o.NameIc - } - qNameIc := qrNameIc - if qNameIc != "" { - - if err := r.SetQueryParam("name__ic", qNameIc); err != nil { - return err - } - } - } - - if o.NameIe != nil { - - // query param name__ie - var qrNameIe string - - if o.NameIe != nil { - qrNameIe = *o.NameIe - } - qNameIe := qrNameIe - if qNameIe != "" { - - if err := r.SetQueryParam("name__ie", qNameIe); err != nil { - return err - } - } - } - - if o.NameIew != nil { - - // query param name__iew - var qrNameIew string - - if o.NameIew != nil { - qrNameIew = *o.NameIew - } - qNameIew := qrNameIew - if qNameIew != "" { - - if err := r.SetQueryParam("name__iew", qNameIew); err != nil { - return err - } - } - } - - if o.NameIsw != nil { - - // query param name__isw - var qrNameIsw string - - if o.NameIsw != nil { - qrNameIsw = *o.NameIsw - } - qNameIsw := qrNameIsw - if qNameIsw != "" { - - if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { - return err - } - } - } - - if o.Namen != nil { - - // query param name__n - var qrNamen string - - if o.Namen != nil { - qrNamen = *o.Namen - } - qNamen := qrNamen - if qNamen != "" { - - if err := r.SetQueryParam("name__n", qNamen); err != nil { - return err - } - } - } - - if o.NameNic != nil { - - // query param name__nic - var qrNameNic string - - if o.NameNic != nil { - qrNameNic = *o.NameNic - } - qNameNic := qrNameNic - if qNameNic != "" { - - if err := r.SetQueryParam("name__nic", qNameNic); err != nil { - return err - } - } - } - - if o.NameNie != nil { - - // query param name__nie - var qrNameNie string - - if o.NameNie != nil { - qrNameNie = *o.NameNie - } - qNameNie := qrNameNie - if qNameNie != "" { - - if err := r.SetQueryParam("name__nie", qNameNie); err != nil { - return err - } - } - } - - if o.NameNiew != nil { - - // query param name__niew - var qrNameNiew string - - if o.NameNiew != nil { - qrNameNiew = *o.NameNiew - } - qNameNiew := qrNameNiew - if qNameNiew != "" { - - if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { - return err - } - } - } - - if o.NameNisw != nil { - - // query param name__nisw - var qrNameNisw string - - if o.NameNisw != nil { - qrNameNisw = *o.NameNisw - } - qNameNisw := qrNameNisw - if qNameNisw != "" { - - if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { - return err - } - } - } - - if o.Offset != nil { - - // query param offset - var qrOffset int64 - - if o.Offset != nil { - qrOffset = *o.Offset - } - qOffset := swag.FormatInt64(qrOffset) - if qOffset != "" { - - if err := r.SetQueryParam("offset", qOffset); err != nil { - return err - } - } - } - - if o.Site != nil { - - // query param site - var qrSite string - - if o.Site != nil { - qrSite = *o.Site - } - qSite := qrSite - if qSite != "" { - - if err := r.SetQueryParam("site", qSite); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/dcim/dcim_power_connections_list_responses.go b/netbox/client/dcim/dcim_power_connections_list_responses.go deleted file mode 100644 index 2424c621c..000000000 --- a/netbox/client/dcim/dcim_power_connections_list_responses.go +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package dcim - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// DcimPowerConnectionsListReader is a Reader for the DcimPowerConnectionsList structure. -type DcimPowerConnectionsListReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DcimPowerConnectionsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDcimPowerConnectionsListOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDcimPowerConnectionsListOK creates a DcimPowerConnectionsListOK with default headers values -func NewDcimPowerConnectionsListOK() *DcimPowerConnectionsListOK { - return &DcimPowerConnectionsListOK{} -} - -/* DcimPowerConnectionsListOK describes a response with status code 200, with default header values. - -DcimPowerConnectionsListOK dcim power connections list o k -*/ -type DcimPowerConnectionsListOK struct { - Payload *DcimPowerConnectionsListOKBody -} - -func (o *DcimPowerConnectionsListOK) Error() string { - return fmt.Sprintf("[GET /dcim/power-connections/][%d] dcimPowerConnectionsListOK %+v", 200, o.Payload) -} -func (o *DcimPowerConnectionsListOK) GetPayload() *DcimPowerConnectionsListOKBody { - return o.Payload -} - -func (o *DcimPowerConnectionsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(DcimPowerConnectionsListOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/*DcimPowerConnectionsListOKBody dcim power connections list o k body -swagger:model DcimPowerConnectionsListOKBody -*/ -type DcimPowerConnectionsListOKBody struct { - - // count - // Required: true - Count *int64 `json:"count"` - - // next - // Format: uri - Next *strfmt.URI `json:"next,omitempty"` - - // previous - // Format: uri - Previous *strfmt.URI `json:"previous,omitempty"` - - // results - // Required: true - Results []*models.PowerPort `json:"results"` -} - -// Validate validates this dcim power connections list o k body -func (o *DcimPowerConnectionsListOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateCount(formats); err != nil { - res = append(res, err) - } - - if err := o.validateNext(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePrevious(formats); err != nil { - res = append(res, err) - } - - if err := o.validateResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *DcimPowerConnectionsListOKBody) validateCount(formats strfmt.Registry) error { - - if err := validate.Required("dcimPowerConnectionsListOK"+"."+"count", "body", o.Count); err != nil { - return err - } - - return nil -} - -func (o *DcimPowerConnectionsListOKBody) validateNext(formats strfmt.Registry) error { - if swag.IsZero(o.Next) { // not required - return nil - } - - if err := validate.FormatOf("dcimPowerConnectionsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { - return err - } - - return nil -} - -func (o *DcimPowerConnectionsListOKBody) validatePrevious(formats strfmt.Registry) error { - if swag.IsZero(o.Previous) { // not required - return nil - } - - if err := validate.FormatOf("dcimPowerConnectionsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { - return err - } - - return nil -} - -func (o *DcimPowerConnectionsListOKBody) validateResults(formats strfmt.Registry) error { - - if err := validate.Required("dcimPowerConnectionsListOK"+"."+"results", "body", o.Results); err != nil { - return err - } - - for i := 0; i < len(o.Results); i++ { - if swag.IsZero(o.Results[i]) { // not required - continue - } - - if o.Results[i] != nil { - if err := o.Results[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dcimPowerConnectionsListOK" + "." + "results" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this dcim power connections list o k body based on the context it is used -func (o *DcimPowerConnectionsListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *DcimPowerConnectionsListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(o.Results); i++ { - - if o.Results[i] != nil { - if err := o.Results[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dcimPowerConnectionsListOK" + "." + "results" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (o *DcimPowerConnectionsListOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *DcimPowerConnectionsListOKBody) UnmarshalBinary(b []byte) error { - var res DcimPowerConnectionsListOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/netbox/client/dcim/dcim_power_outlets_list_parameters.go b/netbox/client/dcim/dcim_power_outlets_list_parameters.go index 333e1dd12..122584ff2 100644 --- a/netbox/client/dcim/dcim_power_outlets_list_parameters.go +++ b/netbox/client/dcim/dcim_power_outlets_list_parameters.go @@ -207,6 +207,18 @@ type DcimPowerOutletsListParams struct { */ Limit *int64 + // Location. + Location *string + + // Locationn. + Locationn *string + + // LocationID. + LocationID *string + + // LocationIDn. + LocationIDn *string + // Name. Name *string @@ -823,6 +835,50 @@ func (o *DcimPowerOutletsListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithLocation adds the location to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithLocation(location *string) *DcimPowerOutletsListParams { + o.SetLocation(location) + return o +} + +// SetLocation adds the location to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetLocation(location *string) { + o.Location = location +} + +// WithLocationn adds the locationn to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithLocationn(locationn *string) *DcimPowerOutletsListParams { + o.SetLocationn(locationn) + return o +} + +// SetLocationn adds the locationN to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetLocationn(locationn *string) { + o.Locationn = locationn +} + +// WithLocationID adds the locationID to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithLocationID(locationID *string) *DcimPowerOutletsListParams { + o.SetLocationID(locationID) + return o +} + +// SetLocationID adds the locationId to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetLocationID(locationID *string) { + o.LocationID = locationID +} + +// WithLocationIDn adds the locationIDn to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithLocationIDn(locationIDn *string) *DcimPowerOutletsListParams { + o.SetLocationIDn(locationIDn) + return o +} + +// SetLocationIDn adds the locationIdN to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetLocationIDn(locationIDn *string) { + o.LocationIDn = locationIDn +} + // WithName adds the name to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithName(name *string) *DcimPowerOutletsListParams { o.SetName(name) @@ -1881,6 +1937,74 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Location != nil { + + // query param location + var qrLocation string + + if o.Location != nil { + qrLocation = *o.Location + } + qLocation := qrLocation + if qLocation != "" { + + if err := r.SetQueryParam("location", qLocation); err != nil { + return err + } + } + } + + if o.Locationn != nil { + + // query param location__n + var qrLocationn string + + if o.Locationn != nil { + qrLocationn = *o.Locationn + } + qLocationn := qrLocationn + if qLocationn != "" { + + if err := r.SetQueryParam("location__n", qLocationn); err != nil { + return err + } + } + } + + if o.LocationID != nil { + + // query param location_id + var qrLocationID string + + if o.LocationID != nil { + qrLocationID = *o.LocationID + } + qLocationID := qrLocationID + if qLocationID != "" { + + if err := r.SetQueryParam("location_id", qLocationID); err != nil { + return err + } + } + } + + if o.LocationIDn != nil { + + // query param location_id__n + var qrLocationIDn string + + if o.LocationIDn != nil { + qrLocationIDn = *o.LocationIDn + } + qLocationIDn := qrLocationIDn + if qLocationIDn != "" { + + if err := r.SetQueryParam("location_id__n", qLocationIDn); err != nil { + return err + } + } + } + if o.Name != nil { // query param name diff --git a/netbox/client/dcim/dcim_power_ports_list_parameters.go b/netbox/client/dcim/dcim_power_ports_list_parameters.go index 8a9a7074f..a1b984eeb 100644 --- a/netbox/client/dcim/dcim_power_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_power_ports_list_parameters.go @@ -219,6 +219,18 @@ type DcimPowerPortsListParams struct { */ Limit *int64 + // Location. + Location *string + + // Locationn. + Locationn *string + + // LocationID. + LocationID *string + + // LocationIDn. + LocationIDn *string + // MaximumDraw. MaximumDraw *string @@ -897,6 +909,50 @@ func (o *DcimPowerPortsListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithLocation adds the location to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithLocation(location *string) *DcimPowerPortsListParams { + o.SetLocation(location) + return o +} + +// SetLocation adds the location to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetLocation(location *string) { + o.Location = location +} + +// WithLocationn adds the locationn to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithLocationn(locationn *string) *DcimPowerPortsListParams { + o.SetLocationn(locationn) + return o +} + +// SetLocationn adds the locationN to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetLocationn(locationn *string) { + o.Locationn = locationn +} + +// WithLocationID adds the locationID to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithLocationID(locationID *string) *DcimPowerPortsListParams { + o.SetLocationID(locationID) + return o +} + +// SetLocationID adds the locationId to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetLocationID(locationID *string) { + o.LocationID = locationID +} + +// WithLocationIDn adds the locationIDn to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithLocationIDn(locationIDn *string) *DcimPowerPortsListParams { + o.SetLocationIDn(locationIDn) + return o +} + +// SetLocationIDn adds the locationIdN to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetLocationIDn(locationIDn *string) { + o.LocationIDn = locationIDn +} + // WithMaximumDraw adds the maximumDraw to the dcim power ports list params func (o *DcimPowerPortsListParams) WithMaximumDraw(maximumDraw *string) *DcimPowerPortsListParams { o.SetMaximumDraw(maximumDraw) @@ -2089,6 +2145,74 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Location != nil { + + // query param location + var qrLocation string + + if o.Location != nil { + qrLocation = *o.Location + } + qLocation := qrLocation + if qLocation != "" { + + if err := r.SetQueryParam("location", qLocation); err != nil { + return err + } + } + } + + if o.Locationn != nil { + + // query param location__n + var qrLocationn string + + if o.Locationn != nil { + qrLocationn = *o.Locationn + } + qLocationn := qrLocationn + if qLocationn != "" { + + if err := r.SetQueryParam("location__n", qLocationn); err != nil { + return err + } + } + } + + if o.LocationID != nil { + + // query param location_id + var qrLocationID string + + if o.LocationID != nil { + qrLocationID = *o.LocationID + } + qLocationID := qrLocationID + if qLocationID != "" { + + if err := r.SetQueryParam("location_id", qLocationID); err != nil { + return err + } + } + } + + if o.LocationIDn != nil { + + // query param location_id__n + var qrLocationIDn string + + if o.LocationIDn != nil { + qrLocationIDn = *o.LocationIDn + } + qLocationIDn := qrLocationIDn + if qLocationIDn != "" { + + if err := r.SetQueryParam("location_id__n", qLocationIDn); err != nil { + return err + } + } + } + if o.MaximumDraw != nil { // query param maximum_draw diff --git a/netbox/client/dcim/dcim_rear_port_templates_list_parameters.go b/netbox/client/dcim/dcim_rear_port_templates_list_parameters.go index aeec6c1f1..051088d16 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_rear_port_templates_list_parameters.go @@ -75,6 +75,39 @@ func NewDcimRearPortTemplatesListParamsWithHTTPClient(client *http.Client) *Dcim */ type DcimRearPortTemplatesListParams struct { + // Color. + Color *string + + // ColorEmpty. + ColorEmpty *string + + // ColorIc. + ColorIc *string + + // ColorIe. + ColorIe *string + + // ColorIew. + ColorIew *string + + // ColorIsw. + ColorIsw *string + + // Colorn. + Colorn *string + + // ColorNic. + ColorNic *string + + // ColorNie. + ColorNie *string + + // ColorNiew. + ColorNiew *string + + // ColorNisw. + ColorNisw *string + // Created. Created *string @@ -239,6 +272,127 @@ func (o *DcimRearPortTemplatesListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithColor adds the color to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithColor(color *string) *DcimRearPortTemplatesListParams { + o.SetColor(color) + return o +} + +// SetColor adds the color to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetColor(color *string) { + o.Color = color +} + +// WithColorEmpty adds the colorEmpty to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithColorEmpty(colorEmpty *string) *DcimRearPortTemplatesListParams { + o.SetColorEmpty(colorEmpty) + return o +} + +// SetColorEmpty adds the colorEmpty to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetColorEmpty(colorEmpty *string) { + o.ColorEmpty = colorEmpty +} + +// WithColorIc adds the colorIc to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithColorIc(colorIc *string) *DcimRearPortTemplatesListParams { + o.SetColorIc(colorIc) + return o +} + +// SetColorIc adds the colorIc to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetColorIc(colorIc *string) { + o.ColorIc = colorIc +} + +// WithColorIe adds the colorIe to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithColorIe(colorIe *string) *DcimRearPortTemplatesListParams { + o.SetColorIe(colorIe) + return o +} + +// SetColorIe adds the colorIe to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetColorIe(colorIe *string) { + o.ColorIe = colorIe +} + +// WithColorIew adds the colorIew to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithColorIew(colorIew *string) *DcimRearPortTemplatesListParams { + o.SetColorIew(colorIew) + return o +} + +// SetColorIew adds the colorIew to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetColorIew(colorIew *string) { + o.ColorIew = colorIew +} + +// WithColorIsw adds the colorIsw to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithColorIsw(colorIsw *string) *DcimRearPortTemplatesListParams { + o.SetColorIsw(colorIsw) + return o +} + +// SetColorIsw adds the colorIsw to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetColorIsw(colorIsw *string) { + o.ColorIsw = colorIsw +} + +// WithColorn adds the colorn to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithColorn(colorn *string) *DcimRearPortTemplatesListParams { + o.SetColorn(colorn) + return o +} + +// SetColorn adds the colorN to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetColorn(colorn *string) { + o.Colorn = colorn +} + +// WithColorNic adds the colorNic to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithColorNic(colorNic *string) *DcimRearPortTemplatesListParams { + o.SetColorNic(colorNic) + return o +} + +// SetColorNic adds the colorNic to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetColorNic(colorNic *string) { + o.ColorNic = colorNic +} + +// WithColorNie adds the colorNie to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithColorNie(colorNie *string) *DcimRearPortTemplatesListParams { + o.SetColorNie(colorNie) + return o +} + +// SetColorNie adds the colorNie to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetColorNie(colorNie *string) { + o.ColorNie = colorNie +} + +// WithColorNiew adds the colorNiew to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithColorNiew(colorNiew *string) *DcimRearPortTemplatesListParams { + o.SetColorNiew(colorNiew) + return o +} + +// SetColorNiew adds the colorNiew to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetColorNiew(colorNiew *string) { + o.ColorNiew = colorNiew +} + +// WithColorNisw adds the colorNisw to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithColorNisw(colorNisw *string) *DcimRearPortTemplatesListParams { + o.SetColorNisw(colorNisw) + return o +} + +// SetColorNisw adds the colorNisw to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetColorNisw(colorNisw *string) { + o.ColorNisw = colorNisw +} + // WithCreated adds the created to the dcim rear port templates list params func (o *DcimRearPortTemplatesListParams) WithCreated(created *string) *DcimRearPortTemplatesListParams { o.SetCreated(created) @@ -632,6 +786,193 @@ func (o *DcimRearPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest } var res []error + if o.Color != nil { + + // query param color + var qrColor string + + if o.Color != nil { + qrColor = *o.Color + } + qColor := qrColor + if qColor != "" { + + if err := r.SetQueryParam("color", qColor); err != nil { + return err + } + } + } + + if o.ColorEmpty != nil { + + // query param color__empty + var qrColorEmpty string + + if o.ColorEmpty != nil { + qrColorEmpty = *o.ColorEmpty + } + qColorEmpty := qrColorEmpty + if qColorEmpty != "" { + + if err := r.SetQueryParam("color__empty", qColorEmpty); err != nil { + return err + } + } + } + + if o.ColorIc != nil { + + // query param color__ic + var qrColorIc string + + if o.ColorIc != nil { + qrColorIc = *o.ColorIc + } + qColorIc := qrColorIc + if qColorIc != "" { + + if err := r.SetQueryParam("color__ic", qColorIc); err != nil { + return err + } + } + } + + if o.ColorIe != nil { + + // query param color__ie + var qrColorIe string + + if o.ColorIe != nil { + qrColorIe = *o.ColorIe + } + qColorIe := qrColorIe + if qColorIe != "" { + + if err := r.SetQueryParam("color__ie", qColorIe); err != nil { + return err + } + } + } + + if o.ColorIew != nil { + + // query param color__iew + var qrColorIew string + + if o.ColorIew != nil { + qrColorIew = *o.ColorIew + } + qColorIew := qrColorIew + if qColorIew != "" { + + if err := r.SetQueryParam("color__iew", qColorIew); err != nil { + return err + } + } + } + + if o.ColorIsw != nil { + + // query param color__isw + var qrColorIsw string + + if o.ColorIsw != nil { + qrColorIsw = *o.ColorIsw + } + qColorIsw := qrColorIsw + if qColorIsw != "" { + + if err := r.SetQueryParam("color__isw", qColorIsw); err != nil { + return err + } + } + } + + if o.Colorn != nil { + + // query param color__n + var qrColorn string + + if o.Colorn != nil { + qrColorn = *o.Colorn + } + qColorn := qrColorn + if qColorn != "" { + + if err := r.SetQueryParam("color__n", qColorn); err != nil { + return err + } + } + } + + if o.ColorNic != nil { + + // query param color__nic + var qrColorNic string + + if o.ColorNic != nil { + qrColorNic = *o.ColorNic + } + qColorNic := qrColorNic + if qColorNic != "" { + + if err := r.SetQueryParam("color__nic", qColorNic); err != nil { + return err + } + } + } + + if o.ColorNie != nil { + + // query param color__nie + var qrColorNie string + + if o.ColorNie != nil { + qrColorNie = *o.ColorNie + } + qColorNie := qrColorNie + if qColorNie != "" { + + if err := r.SetQueryParam("color__nie", qColorNie); err != nil { + return err + } + } + } + + if o.ColorNiew != nil { + + // query param color__niew + var qrColorNiew string + + if o.ColorNiew != nil { + qrColorNiew = *o.ColorNiew + } + qColorNiew := qrColorNiew + if qColorNiew != "" { + + if err := r.SetQueryParam("color__niew", qColorNiew); err != nil { + return err + } + } + } + + if o.ColorNisw != nil { + + // query param color__nisw + var qrColorNisw string + + if o.ColorNisw != nil { + qrColorNisw = *o.ColorNisw + } + qColorNisw := qrColorNisw + if qColorNisw != "" { + + if err := r.SetQueryParam("color__nisw", qColorNisw); err != nil { + return err + } + } + } + if o.Created != nil { // query param created diff --git a/netbox/client/dcim/dcim_rear_ports_list_parameters.go b/netbox/client/dcim/dcim_rear_ports_list_parameters.go index 969068554..b4fd4a9d8 100644 --- a/netbox/client/dcim/dcim_rear_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_rear_ports_list_parameters.go @@ -78,6 +78,39 @@ type DcimRearPortsListParams struct { // Cabled. Cabled *string + // Color. + Color *string + + // ColorEmpty. + ColorEmpty *string + + // ColorIc. + ColorIc *string + + // ColorIe. + ColorIe *string + + // ColorIew. + ColorIew *string + + // ColorIsw. + ColorIsw *string + + // Colorn. + Colorn *string + + // ColorNic. + ColorNic *string + + // ColorNie. + ColorNie *string + + // ColorNiew. + ColorNiew *string + + // ColorNisw. + ColorNisw *string + // Created. Created *string @@ -198,6 +231,18 @@ type DcimRearPortsListParams struct { */ Limit *int64 + // Location. + Location *string + + // Locationn. + Locationn *string + + // LocationID. + LocationID *string + + // LocationIDn. + LocationIDn *string + // Name. Name *string @@ -370,6 +415,127 @@ func (o *DcimRearPortsListParams) SetCabled(cabled *string) { o.Cabled = cabled } +// WithColor adds the color to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithColor(color *string) *DcimRearPortsListParams { + o.SetColor(color) + return o +} + +// SetColor adds the color to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetColor(color *string) { + o.Color = color +} + +// WithColorEmpty adds the colorEmpty to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithColorEmpty(colorEmpty *string) *DcimRearPortsListParams { + o.SetColorEmpty(colorEmpty) + return o +} + +// SetColorEmpty adds the colorEmpty to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetColorEmpty(colorEmpty *string) { + o.ColorEmpty = colorEmpty +} + +// WithColorIc adds the colorIc to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithColorIc(colorIc *string) *DcimRearPortsListParams { + o.SetColorIc(colorIc) + return o +} + +// SetColorIc adds the colorIc to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetColorIc(colorIc *string) { + o.ColorIc = colorIc +} + +// WithColorIe adds the colorIe to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithColorIe(colorIe *string) *DcimRearPortsListParams { + o.SetColorIe(colorIe) + return o +} + +// SetColorIe adds the colorIe to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetColorIe(colorIe *string) { + o.ColorIe = colorIe +} + +// WithColorIew adds the colorIew to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithColorIew(colorIew *string) *DcimRearPortsListParams { + o.SetColorIew(colorIew) + return o +} + +// SetColorIew adds the colorIew to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetColorIew(colorIew *string) { + o.ColorIew = colorIew +} + +// WithColorIsw adds the colorIsw to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithColorIsw(colorIsw *string) *DcimRearPortsListParams { + o.SetColorIsw(colorIsw) + return o +} + +// SetColorIsw adds the colorIsw to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetColorIsw(colorIsw *string) { + o.ColorIsw = colorIsw +} + +// WithColorn adds the colorn to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithColorn(colorn *string) *DcimRearPortsListParams { + o.SetColorn(colorn) + return o +} + +// SetColorn adds the colorN to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetColorn(colorn *string) { + o.Colorn = colorn +} + +// WithColorNic adds the colorNic to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithColorNic(colorNic *string) *DcimRearPortsListParams { + o.SetColorNic(colorNic) + return o +} + +// SetColorNic adds the colorNic to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetColorNic(colorNic *string) { + o.ColorNic = colorNic +} + +// WithColorNie adds the colorNie to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithColorNie(colorNie *string) *DcimRearPortsListParams { + o.SetColorNie(colorNie) + return o +} + +// SetColorNie adds the colorNie to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetColorNie(colorNie *string) { + o.ColorNie = colorNie +} + +// WithColorNiew adds the colorNiew to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithColorNiew(colorNiew *string) *DcimRearPortsListParams { + o.SetColorNiew(colorNiew) + return o +} + +// SetColorNiew adds the colorNiew to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetColorNiew(colorNiew *string) { + o.ColorNiew = colorNiew +} + +// WithColorNisw adds the colorNisw to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithColorNisw(colorNisw *string) *DcimRearPortsListParams { + o.SetColorNisw(colorNisw) + return o +} + +// SetColorNisw adds the colorNisw to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetColorNisw(colorNisw *string) { + o.ColorNisw = colorNisw +} + // WithCreated adds the created to the dcim rear ports list params func (o *DcimRearPortsListParams) WithCreated(created *string) *DcimRearPortsListParams { o.SetCreated(created) @@ -799,6 +965,50 @@ func (o *DcimRearPortsListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithLocation adds the location to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithLocation(location *string) *DcimRearPortsListParams { + o.SetLocation(location) + return o +} + +// SetLocation adds the location to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetLocation(location *string) { + o.Location = location +} + +// WithLocationn adds the locationn to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithLocationn(locationn *string) *DcimRearPortsListParams { + o.SetLocationn(locationn) + return o +} + +// SetLocationn adds the locationN to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetLocationn(locationn *string) { + o.Locationn = locationn +} + +// WithLocationID adds the locationID to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithLocationID(locationID *string) *DcimRearPortsListParams { + o.SetLocationID(locationID) + return o +} + +// SetLocationID adds the locationId to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetLocationID(locationID *string) { + o.LocationID = locationID +} + +// WithLocationIDn adds the locationIDn to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithLocationIDn(locationIDn *string) *DcimRearPortsListParams { + o.SetLocationIDn(locationIDn) + return o +} + +// SetLocationIDn adds the locationIdN to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetLocationIDn(locationIDn *string) { + o.LocationIDn = locationIDn +} + // WithName adds the name to the dcim rear ports list params func (o *DcimRearPortsListParams) WithName(name *string) *DcimRearPortsListParams { o.SetName(name) @@ -1209,6 +1419,193 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.Color != nil { + + // query param color + var qrColor string + + if o.Color != nil { + qrColor = *o.Color + } + qColor := qrColor + if qColor != "" { + + if err := r.SetQueryParam("color", qColor); err != nil { + return err + } + } + } + + if o.ColorEmpty != nil { + + // query param color__empty + var qrColorEmpty string + + if o.ColorEmpty != nil { + qrColorEmpty = *o.ColorEmpty + } + qColorEmpty := qrColorEmpty + if qColorEmpty != "" { + + if err := r.SetQueryParam("color__empty", qColorEmpty); err != nil { + return err + } + } + } + + if o.ColorIc != nil { + + // query param color__ic + var qrColorIc string + + if o.ColorIc != nil { + qrColorIc = *o.ColorIc + } + qColorIc := qrColorIc + if qColorIc != "" { + + if err := r.SetQueryParam("color__ic", qColorIc); err != nil { + return err + } + } + } + + if o.ColorIe != nil { + + // query param color__ie + var qrColorIe string + + if o.ColorIe != nil { + qrColorIe = *o.ColorIe + } + qColorIe := qrColorIe + if qColorIe != "" { + + if err := r.SetQueryParam("color__ie", qColorIe); err != nil { + return err + } + } + } + + if o.ColorIew != nil { + + // query param color__iew + var qrColorIew string + + if o.ColorIew != nil { + qrColorIew = *o.ColorIew + } + qColorIew := qrColorIew + if qColorIew != "" { + + if err := r.SetQueryParam("color__iew", qColorIew); err != nil { + return err + } + } + } + + if o.ColorIsw != nil { + + // query param color__isw + var qrColorIsw string + + if o.ColorIsw != nil { + qrColorIsw = *o.ColorIsw + } + qColorIsw := qrColorIsw + if qColorIsw != "" { + + if err := r.SetQueryParam("color__isw", qColorIsw); err != nil { + return err + } + } + } + + if o.Colorn != nil { + + // query param color__n + var qrColorn string + + if o.Colorn != nil { + qrColorn = *o.Colorn + } + qColorn := qrColorn + if qColorn != "" { + + if err := r.SetQueryParam("color__n", qColorn); err != nil { + return err + } + } + } + + if o.ColorNic != nil { + + // query param color__nic + var qrColorNic string + + if o.ColorNic != nil { + qrColorNic = *o.ColorNic + } + qColorNic := qrColorNic + if qColorNic != "" { + + if err := r.SetQueryParam("color__nic", qColorNic); err != nil { + return err + } + } + } + + if o.ColorNie != nil { + + // query param color__nie + var qrColorNie string + + if o.ColorNie != nil { + qrColorNie = *o.ColorNie + } + qColorNie := qrColorNie + if qColorNie != "" { + + if err := r.SetQueryParam("color__nie", qColorNie); err != nil { + return err + } + } + } + + if o.ColorNiew != nil { + + // query param color__niew + var qrColorNiew string + + if o.ColorNiew != nil { + qrColorNiew = *o.ColorNiew + } + qColorNiew := qrColorNiew + if qColorNiew != "" { + + if err := r.SetQueryParam("color__niew", qColorNiew); err != nil { + return err + } + } + } + + if o.ColorNisw != nil { + + // query param color__nisw + var qrColorNisw string + + if o.ColorNisw != nil { + qrColorNisw = *o.ColorNisw + } + qColorNisw := qrColorNisw + if qColorNisw != "" { + + if err := r.SetQueryParam("color__nisw", qColorNisw); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -1872,6 +2269,74 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.Location != nil { + + // query param location + var qrLocation string + + if o.Location != nil { + qrLocation = *o.Location + } + qLocation := qrLocation + if qLocation != "" { + + if err := r.SetQueryParam("location", qLocation); err != nil { + return err + } + } + } + + if o.Locationn != nil { + + // query param location__n + var qrLocationn string + + if o.Locationn != nil { + qrLocationn = *o.Locationn + } + qLocationn := qrLocationn + if qLocationn != "" { + + if err := r.SetQueryParam("location__n", qLocationn); err != nil { + return err + } + } + } + + if o.LocationID != nil { + + // query param location_id + var qrLocationID string + + if o.LocationID != nil { + qrLocationID = *o.LocationID + } + qLocationID := qrLocationID + if qLocationID != "" { + + if err := r.SetQueryParam("location_id", qLocationID); err != nil { + return err + } + } + } + + if o.LocationIDn != nil { + + // query param location_id__n + var qrLocationIDn string + + if o.LocationIDn != nil { + qrLocationIDn = *o.LocationIDn + } + qLocationIDn := qrLocationIDn + if qLocationIDn != "" { + + if err := r.SetQueryParam("location_id__n", qLocationIDn); err != nil { + return err + } + } + } + if o.Name != nil { // query param name diff --git a/netbox/client/extras/extras_client.go b/netbox/client/extras/extras_client.go index 183f67926..2428c1545 100644 --- a/netbox/client/extras/extras_client.go +++ b/netbox/client/extras/extras_client.go @@ -410,7 +410,7 @@ func (a *Client) ExtrasConfigContextsDelete(params *ExtrasConfigContextsDeletePa } /* - ExtrasConfigContextsList extras config contexts list API + ExtrasConfigContextsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) ExtrasConfigContextsList(params *ExtrasConfigContextsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasConfigContextsListOK, error) { // TODO: Validate the params before sending @@ -839,7 +839,7 @@ func (a *Client) ExtrasCustomFieldsDelete(params *ExtrasCustomFieldsDeleteParams } /* - ExtrasCustomFieldsList extras custom fields list API + ExtrasCustomFieldsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) ExtrasCustomFieldsList(params *ExtrasCustomFieldsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasCustomFieldsListOK, error) { // TODO: Validate the params before sending @@ -1190,7 +1190,7 @@ func (a *Client) ExtrasCustomLinksDelete(params *ExtrasCustomLinksDeleteParams, } /* - ExtrasCustomLinksList extras custom links list API + ExtrasCustomLinksList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) ExtrasCustomLinksList(params *ExtrasCustomLinksListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasCustomLinksListOK, error) { // TODO: Validate the params before sending @@ -1541,7 +1541,7 @@ func (a *Client) ExtrasExportTemplatesDelete(params *ExtrasExportTemplatesDelete } /* - ExtrasExportTemplatesList extras export templates list API + ExtrasExportTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) ExtrasExportTemplatesList(params *ExtrasExportTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasExportTemplatesListOK, error) { // TODO: Validate the params before sending @@ -1892,7 +1892,7 @@ func (a *Client) ExtrasImageAttachmentsDelete(params *ExtrasImageAttachmentsDele } /* - ExtrasImageAttachmentsList extras image attachments list API + ExtrasImageAttachmentsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) ExtrasImageAttachmentsList(params *ExtrasImageAttachmentsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasImageAttachmentsListOK, error) { // TODO: Validate the params before sending @@ -2321,7 +2321,7 @@ func (a *Client) ExtrasJournalEntriesDelete(params *ExtrasJournalEntriesDeletePa } /* - ExtrasJournalEntriesList extras journal entries list API + ExtrasJournalEntriesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) ExtrasJournalEntriesList(params *ExtrasJournalEntriesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasJournalEntriesListOK, error) { // TODO: Validate the params before sending @@ -2945,7 +2945,7 @@ func (a *Client) ExtrasTagsDelete(params *ExtrasTagsDeleteParams, authInfo runti } /* - ExtrasTagsList extras tags list API + ExtrasTagsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) ExtrasTagsList(params *ExtrasTagsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasTagsListOK, error) { // TODO: Validate the params before sending @@ -3296,7 +3296,7 @@ func (a *Client) ExtrasWebhooksDelete(params *ExtrasWebhooksDeleteParams, authIn } /* - ExtrasWebhooksList extras webhooks list API + ExtrasWebhooksList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) ExtrasWebhooksList(params *ExtrasWebhooksListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasWebhooksListOK, error) { // TODO: Validate the params before sending diff --git a/netbox/client/extras/extras_content_types_list_parameters.go b/netbox/client/extras/extras_content_types_list_parameters.go index 3d135e4a9..2ffc0e480 100644 --- a/netbox/client/extras/extras_content_types_list_parameters.go +++ b/netbox/client/extras/extras_content_types_list_parameters.go @@ -96,6 +96,9 @@ type ExtrasContentTypesListParams struct { */ Offset *int64 + // Q. + Q *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -204,6 +207,17 @@ func (o *ExtrasContentTypesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithQ adds the q to the extras content types list params +func (o *ExtrasContentTypesListParams) WithQ(q *string) *ExtrasContentTypesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the extras content types list params +func (o *ExtrasContentTypesListParams) SetQ(q *string) { + o.Q = q +} + // WriteToRequest writes these params to a swagger request func (o *ExtrasContentTypesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -297,6 +311,23 @@ func (o *ExtrasContentTypesListParams) WriteToRequest(r runtime.ClientRequest, r } } + 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...) } diff --git a/netbox/client/ipam/ipam_client.go b/netbox/client/ipam/ipam_client.go index 2b2fffd58..3faa1e04d 100644 --- a/netbox/client/ipam/ipam_client.go +++ b/netbox/client/ipam/ipam_client.go @@ -81,6 +81,28 @@ type ClientService interface { IpamIPAddressesUpdate(params *IpamIPAddressesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesUpdateOK, error) + IpamIPRangesAvailableIpsCreate(params *IpamIPRangesAvailableIpsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesAvailableIpsCreateCreated, error) + + IpamIPRangesAvailableIpsRead(params *IpamIPRangesAvailableIpsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesAvailableIpsReadOK, error) + + IpamIPRangesBulkDelete(params *IpamIPRangesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesBulkDeleteNoContent, error) + + IpamIPRangesBulkPartialUpdate(params *IpamIPRangesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesBulkPartialUpdateOK, error) + + IpamIPRangesBulkUpdate(params *IpamIPRangesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesBulkUpdateOK, error) + + IpamIPRangesCreate(params *IpamIPRangesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesCreateCreated, error) + + IpamIPRangesDelete(params *IpamIPRangesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesDeleteNoContent, error) + + IpamIPRangesList(params *IpamIPRangesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesListOK, error) + + IpamIPRangesPartialUpdate(params *IpamIPRangesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesPartialUpdateOK, error) + + IpamIPRangesRead(params *IpamIPRangesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesReadOK, error) + + IpamIPRangesUpdate(params *IpamIPRangesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesUpdateOK, error) + IpamPrefixesAvailableIpsCreate(params *IpamPrefixesAvailableIpsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailableIpsCreateCreated, error) IpamPrefixesAvailableIpsRead(params *IpamPrefixesAvailableIpsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailableIpsReadOK, error) @@ -432,7 +454,7 @@ func (a *Client) IpamAggregatesDelete(params *IpamAggregatesDeleteParams, authIn } /* - IpamAggregatesList ipam aggregates list API + IpamAggregatesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) IpamAggregatesList(params *IpamAggregatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAggregatesListOK, error) { // TODO: Validate the params before sending @@ -783,7 +805,7 @@ func (a *Client) IpamIPAddressesDelete(params *IpamIPAddressesDeleteParams, auth } /* - IpamIPAddressesList ipam ip addresses list API + IpamIPAddressesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) IpamIPAddressesList(params *IpamIPAddressesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesListOK, error) { // TODO: Validate the params before sending @@ -939,9 +961,448 @@ func (a *Client) IpamIPAddressesUpdate(params *IpamIPAddressesUpdateParams, auth } /* - IpamPrefixesAvailableIpsCreate A convenience method for returning available IP addresses within a prefix. By default, the number of IPs -returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be passed, -however results will not be paginated. + IpamIPRangesAvailableIpsCreate A convenience method for returning available IP addresses within a Prefix or IPRange. By default, the number of +IPs returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be +passed, however results will not be paginated. + +The advisory lock decorator uses a PostgreSQL advisory lock to prevent this API from being +invoked in parallel, which results in a race condition where multiple insertions can occur. +*/ +func (a *Client) IpamIPRangesAvailableIpsCreate(params *IpamIPRangesAvailableIpsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesAvailableIpsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesAvailableIpsCreateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_available-ips_create", + Method: "POST", + PathPattern: "/ipam/ip-ranges/{id}/available-ips/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamIPRangesAvailableIpsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesAvailableIpsCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_ip-ranges_available-ips_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesAvailableIpsRead A convenience method for returning available IP addresses within a Prefix or IPRange. By default, the number of +IPs returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be +passed, however results will not be paginated. + +The advisory lock decorator uses a PostgreSQL advisory lock to prevent this API from being +invoked in parallel, which results in a race condition where multiple insertions can occur. +*/ +func (a *Client) IpamIPRangesAvailableIpsRead(params *IpamIPRangesAvailableIpsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesAvailableIpsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesAvailableIpsReadParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_available-ips_read", + Method: "GET", + PathPattern: "/ipam/ip-ranges/{id}/available-ips/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamIPRangesAvailableIpsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesAvailableIpsReadOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_ip-ranges_available-ips_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesBulkDelete ipam ip ranges bulk delete API +*/ +func (a *Client) IpamIPRangesBulkDelete(params *IpamIPRangesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_bulk_delete", + Method: "DELETE", + PathPattern: "/ipam/ip-ranges/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamIPRangesBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesBulkDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_ip-ranges_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesBulkPartialUpdate ipam ip ranges bulk partial update API +*/ +func (a *Client) IpamIPRangesBulkPartialUpdate(params *IpamIPRangesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_bulk_partial_update", + Method: "PATCH", + PathPattern: "/ipam/ip-ranges/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamIPRangesBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesBulkPartialUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_ip-ranges_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesBulkUpdate ipam ip ranges bulk update API +*/ +func (a *Client) IpamIPRangesBulkUpdate(params *IpamIPRangesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_bulk_update", + Method: "PUT", + PathPattern: "/ipam/ip-ranges/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamIPRangesBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesBulkUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_ip-ranges_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesCreate ipam ip ranges create API +*/ +func (a *Client) IpamIPRangesCreate(params *IpamIPRangesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesCreateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_create", + Method: "POST", + PathPattern: "/ipam/ip-ranges/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamIPRangesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_ip-ranges_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesDelete ipam ip ranges delete API +*/ +func (a *Client) IpamIPRangesDelete(params *IpamIPRangesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_delete", + Method: "DELETE", + PathPattern: "/ipam/ip-ranges/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamIPRangesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_ip-ranges_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) IpamIPRangesList(params *IpamIPRangesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesListParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_list", + Method: "GET", + PathPattern: "/ipam/ip-ranges/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamIPRangesListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_ip-ranges_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesPartialUpdate ipam ip ranges partial update API +*/ +func (a *Client) IpamIPRangesPartialUpdate(params *IpamIPRangesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_partial_update", + Method: "PATCH", + PathPattern: "/ipam/ip-ranges/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamIPRangesPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesPartialUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_ip-ranges_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesRead ipam ip ranges read API +*/ +func (a *Client) IpamIPRangesRead(params *IpamIPRangesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesReadParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_read", + Method: "GET", + PathPattern: "/ipam/ip-ranges/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamIPRangesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesReadOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_ip-ranges_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesUpdate ipam ip ranges update API +*/ +func (a *Client) IpamIPRangesUpdate(params *IpamIPRangesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_update", + Method: "PUT", + PathPattern: "/ipam/ip-ranges/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamIPRangesUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_ip-ranges_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesAvailableIpsCreate A convenience method for returning available IP addresses within a Prefix or IPRange. By default, the number of +IPs returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be +passed, however results will not be paginated. The advisory lock decorator uses a PostgreSQL advisory lock to prevent this API from being invoked in parallel, which results in a race condition where multiple insertions can occur. @@ -983,9 +1444,9 @@ func (a *Client) IpamPrefixesAvailableIpsCreate(params *IpamPrefixesAvailableIps } /* - IpamPrefixesAvailableIpsRead A convenience method for returning available IP addresses within a prefix. By default, the number of IPs -returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be passed, -however results will not be paginated. + IpamPrefixesAvailableIpsRead A convenience method for returning available IP addresses within a Prefix or IPRange. By default, the number of +IPs returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be +passed, however results will not be paginated. The advisory lock decorator uses a PostgreSQL advisory lock to prevent this API from being invoked in parallel, which results in a race condition where multiple insertions can occur. @@ -1306,7 +1767,7 @@ func (a *Client) IpamPrefixesDelete(params *IpamPrefixesDeleteParams, authInfo r } /* - IpamPrefixesList ipam prefixes list API + IpamPrefixesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) IpamPrefixesList(params *IpamPrefixesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesListOK, error) { // TODO: Validate the params before sending @@ -1657,7 +2118,7 @@ func (a *Client) IpamRirsDelete(params *IpamRirsDeleteParams, authInfo runtime.C } /* - IpamRirsList ipam rirs list API + IpamRirsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) IpamRirsList(params *IpamRirsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsListOK, error) { // TODO: Validate the params before sending @@ -2008,7 +2469,7 @@ func (a *Client) IpamRolesDelete(params *IpamRolesDeleteParams, authInfo runtime } /* - IpamRolesList ipam roles list API + IpamRolesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) IpamRolesList(params *IpamRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesListOK, error) { // TODO: Validate the params before sending @@ -2359,7 +2820,7 @@ func (a *Client) IpamRouteTargetsDelete(params *IpamRouteTargetsDeleteParams, au } /* - IpamRouteTargetsList ipam route targets list API + IpamRouteTargetsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) IpamRouteTargetsList(params *IpamRouteTargetsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsListOK, error) { // TODO: Validate the params before sending @@ -2710,7 +3171,7 @@ func (a *Client) IpamServicesDelete(params *IpamServicesDeleteParams, authInfo r } /* - IpamServicesList ipam services list API + IpamServicesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) IpamServicesList(params *IpamServicesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServicesListOK, error) { // TODO: Validate the params before sending @@ -3061,7 +3522,7 @@ func (a *Client) IpamVlanGroupsDelete(params *IpamVlanGroupsDeleteParams, authIn } /* - IpamVlanGroupsList ipam vlan groups list API + IpamVlanGroupsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) IpamVlanGroupsList(params *IpamVlanGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamVlanGroupsListOK, error) { // TODO: Validate the params before sending @@ -3412,7 +3873,7 @@ func (a *Client) IpamVlansDelete(params *IpamVlansDeleteParams, authInfo runtime } /* - IpamVlansList ipam vlans list API + IpamVlansList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) IpamVlansList(params *IpamVlansListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamVlansListOK, error) { // TODO: Validate the params before sending @@ -3763,7 +4224,7 @@ func (a *Client) IpamVrfsDelete(params *IpamVrfsDeleteParams, authInfo runtime.C } /* - IpamVrfsList ipam vrfs list API + IpamVrfsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) IpamVrfsList(params *IpamVrfsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamVrfsListOK, error) { // TODO: Validate the params before sending diff --git a/netbox/client/ipam/ipam_ip_ranges_available_ips_create_parameters.go b/netbox/client/ipam/ipam_ip_ranges_available_ips_create_parameters.go new file mode 100644 index 000000000..67c77cc36 --- /dev/null +++ b/netbox/client/ipam/ipam_ip_ranges_available_ips_create_parameters.go @@ -0,0 +1,186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamIPRangesAvailableIpsCreateParams creates a new IpamIPRangesAvailableIpsCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamIPRangesAvailableIpsCreateParams() *IpamIPRangesAvailableIpsCreateParams { + return &IpamIPRangesAvailableIpsCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamIPRangesAvailableIpsCreateParamsWithTimeout creates a new IpamIPRangesAvailableIpsCreateParams object +// with the ability to set a timeout on a request. +func NewIpamIPRangesAvailableIpsCreateParamsWithTimeout(timeout time.Duration) *IpamIPRangesAvailableIpsCreateParams { + return &IpamIPRangesAvailableIpsCreateParams{ + timeout: timeout, + } +} + +// NewIpamIPRangesAvailableIpsCreateParamsWithContext creates a new IpamIPRangesAvailableIpsCreateParams object +// with the ability to set a context for a request. +func NewIpamIPRangesAvailableIpsCreateParamsWithContext(ctx context.Context) *IpamIPRangesAvailableIpsCreateParams { + return &IpamIPRangesAvailableIpsCreateParams{ + Context: ctx, + } +} + +// NewIpamIPRangesAvailableIpsCreateParamsWithHTTPClient creates a new IpamIPRangesAvailableIpsCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamIPRangesAvailableIpsCreateParamsWithHTTPClient(client *http.Client) *IpamIPRangesAvailableIpsCreateParams { + return &IpamIPRangesAvailableIpsCreateParams{ + HTTPClient: client, + } +} + +/* IpamIPRangesAvailableIpsCreateParams contains all the parameters to send to the API endpoint + for the ipam ip ranges available ips create operation. + + Typically these are written to a http.Request. +*/ +type IpamIPRangesAvailableIpsCreateParams struct { + + // Data. + Data []*models.AvailableIP + + /* ID. + + A unique integer value identifying this IP range. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam ip ranges available ips create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesAvailableIpsCreateParams) WithDefaults() *IpamIPRangesAvailableIpsCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam ip ranges available ips create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesAvailableIpsCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam ip ranges available ips create params +func (o *IpamIPRangesAvailableIpsCreateParams) WithTimeout(timeout time.Duration) *IpamIPRangesAvailableIpsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam ip ranges available ips create params +func (o *IpamIPRangesAvailableIpsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam ip ranges available ips create params +func (o *IpamIPRangesAvailableIpsCreateParams) WithContext(ctx context.Context) *IpamIPRangesAvailableIpsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam ip ranges available ips create params +func (o *IpamIPRangesAvailableIpsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam ip ranges available ips create params +func (o *IpamIPRangesAvailableIpsCreateParams) WithHTTPClient(client *http.Client) *IpamIPRangesAvailableIpsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam ip ranges available ips create params +func (o *IpamIPRangesAvailableIpsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam ip ranges available ips create params +func (o *IpamIPRangesAvailableIpsCreateParams) WithData(data []*models.AvailableIP) *IpamIPRangesAvailableIpsCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam ip ranges available ips create params +func (o *IpamIPRangesAvailableIpsCreateParams) SetData(data []*models.AvailableIP) { + o.Data = data +} + +// WithID adds the id to the ipam ip ranges available ips create params +func (o *IpamIPRangesAvailableIpsCreateParams) WithID(id int64) *IpamIPRangesAvailableIpsCreateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam ip ranges available ips create params +func (o *IpamIPRangesAvailableIpsCreateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamIPRangesAvailableIpsCreateParams) 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/netbox/client/secrets/secrets_secrets_partial_update_responses.go b/netbox/client/ipam/ipam_ip_ranges_available_ips_create_responses.go similarity index 50% rename from netbox/client/secrets/secrets_secrets_partial_update_responses.go rename to netbox/client/ipam/ipam_ip_ranges_available_ips_create_responses.go index 1f9d9a38c..35ce6c742 100644 --- a/netbox/client/secrets/secrets_secrets_partial_update_responses.go +++ b/netbox/client/ipam/ipam_ip_ranges_available_ips_create_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package ipam // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// SecretsSecretsPartialUpdateReader is a Reader for the SecretsSecretsPartialUpdate structure. -type SecretsSecretsPartialUpdateReader struct { +// IpamIPRangesAvailableIpsCreateReader is a Reader for the IpamIPRangesAvailableIpsCreate structure. +type IpamIPRangesAvailableIpsCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPRangesAvailableIpsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewSecretsSecretsPartialUpdateOK() + case 201: + result := NewIpamIPRangesAvailableIpsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,32 +49,30 @@ func (o *SecretsSecretsPartialUpdateReader) ReadResponse(response runtime.Client } } -// NewSecretsSecretsPartialUpdateOK creates a SecretsSecretsPartialUpdateOK with default headers values -func NewSecretsSecretsPartialUpdateOK() *SecretsSecretsPartialUpdateOK { - return &SecretsSecretsPartialUpdateOK{} +// NewIpamIPRangesAvailableIpsCreateCreated creates a IpamIPRangesAvailableIpsCreateCreated with default headers values +func NewIpamIPRangesAvailableIpsCreateCreated() *IpamIPRangesAvailableIpsCreateCreated { + return &IpamIPRangesAvailableIpsCreateCreated{} } -/* SecretsSecretsPartialUpdateOK describes a response with status code 200, with default header values. +/* IpamIPRangesAvailableIpsCreateCreated describes a response with status code 201, with default header values. -SecretsSecretsPartialUpdateOK secrets secrets partial update o k +IpamIPRangesAvailableIpsCreateCreated ipam Ip ranges available ips create created */ -type SecretsSecretsPartialUpdateOK struct { - Payload *models.Secret +type IpamIPRangesAvailableIpsCreateCreated struct { + Payload []*models.AvailableIP } -func (o *SecretsSecretsPartialUpdateOK) Error() string { - return fmt.Sprintf("[PATCH /secrets/secrets/{id}/][%d] secretsSecretsPartialUpdateOK %+v", 200, o.Payload) +func (o *IpamIPRangesAvailableIpsCreateCreated) Error() string { + return fmt.Sprintf("[POST /ipam/ip-ranges/{id}/available-ips/][%d] ipamIpRangesAvailableIpsCreateCreated %+v", 201, o.Payload) } -func (o *SecretsSecretsPartialUpdateOK) GetPayload() *models.Secret { +func (o *IpamIPRangesAvailableIpsCreateCreated) GetPayload() []*models.AvailableIP { return o.Payload } -func (o *SecretsSecretsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Secret) +func (o *IpamIPRangesAvailableIpsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } diff --git a/netbox/client/ipam/ipam_ip_ranges_available_ips_read_parameters.go b/netbox/client/ipam/ipam_ip_ranges_available_ips_read_parameters.go new file mode 100644 index 000000000..a48324601 --- /dev/null +++ b/netbox/client/ipam/ipam_ip_ranges_available_ips_read_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewIpamIPRangesAvailableIpsReadParams creates a new IpamIPRangesAvailableIpsReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamIPRangesAvailableIpsReadParams() *IpamIPRangesAvailableIpsReadParams { + return &IpamIPRangesAvailableIpsReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamIPRangesAvailableIpsReadParamsWithTimeout creates a new IpamIPRangesAvailableIpsReadParams object +// with the ability to set a timeout on a request. +func NewIpamIPRangesAvailableIpsReadParamsWithTimeout(timeout time.Duration) *IpamIPRangesAvailableIpsReadParams { + return &IpamIPRangesAvailableIpsReadParams{ + timeout: timeout, + } +} + +// NewIpamIPRangesAvailableIpsReadParamsWithContext creates a new IpamIPRangesAvailableIpsReadParams object +// with the ability to set a context for a request. +func NewIpamIPRangesAvailableIpsReadParamsWithContext(ctx context.Context) *IpamIPRangesAvailableIpsReadParams { + return &IpamIPRangesAvailableIpsReadParams{ + Context: ctx, + } +} + +// NewIpamIPRangesAvailableIpsReadParamsWithHTTPClient creates a new IpamIPRangesAvailableIpsReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamIPRangesAvailableIpsReadParamsWithHTTPClient(client *http.Client) *IpamIPRangesAvailableIpsReadParams { + return &IpamIPRangesAvailableIpsReadParams{ + HTTPClient: client, + } +} + +/* IpamIPRangesAvailableIpsReadParams contains all the parameters to send to the API endpoint + for the ipam ip ranges available ips read operation. + + Typically these are written to a http.Request. +*/ +type IpamIPRangesAvailableIpsReadParams struct { + + /* ID. + + A unique integer value identifying this IP range. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam ip ranges available ips read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesAvailableIpsReadParams) WithDefaults() *IpamIPRangesAvailableIpsReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam ip ranges available ips read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesAvailableIpsReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam ip ranges available ips read params +func (o *IpamIPRangesAvailableIpsReadParams) WithTimeout(timeout time.Duration) *IpamIPRangesAvailableIpsReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam ip ranges available ips read params +func (o *IpamIPRangesAvailableIpsReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam ip ranges available ips read params +func (o *IpamIPRangesAvailableIpsReadParams) WithContext(ctx context.Context) *IpamIPRangesAvailableIpsReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam ip ranges available ips read params +func (o *IpamIPRangesAvailableIpsReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam ip ranges available ips read params +func (o *IpamIPRangesAvailableIpsReadParams) WithHTTPClient(client *http.Client) *IpamIPRangesAvailableIpsReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam ip ranges available ips read params +func (o *IpamIPRangesAvailableIpsReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam ip ranges available ips read params +func (o *IpamIPRangesAvailableIpsReadParams) WithID(id int64) *IpamIPRangesAvailableIpsReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam ip ranges available ips read params +func (o *IpamIPRangesAvailableIpsReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamIPRangesAvailableIpsReadParams) 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/netbox/client/secrets/secrets_secret_roles_update_responses.go b/netbox/client/ipam/ipam_ip_ranges_available_ips_read_responses.go similarity index 52% rename from netbox/client/secrets/secrets_secret_roles_update_responses.go rename to netbox/client/ipam/ipam_ip_ranges_available_ips_read_responses.go index 462db2617..5854a4548 100644 --- a/netbox/client/secrets/secrets_secret_roles_update_responses.go +++ b/netbox/client/ipam/ipam_ip_ranges_available_ips_read_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package ipam // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// SecretsSecretRolesUpdateReader is a Reader for the SecretsSecretRolesUpdate structure. -type SecretsSecretRolesUpdateReader struct { +// IpamIPRangesAvailableIpsReadReader is a Reader for the IpamIPRangesAvailableIpsRead structure. +type IpamIPRangesAvailableIpsReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretRolesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPRangesAvailableIpsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewSecretsSecretRolesUpdateOK() + result := NewIpamIPRangesAvailableIpsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,32 +49,30 @@ func (o *SecretsSecretRolesUpdateReader) ReadResponse(response runtime.ClientRes } } -// NewSecretsSecretRolesUpdateOK creates a SecretsSecretRolesUpdateOK with default headers values -func NewSecretsSecretRolesUpdateOK() *SecretsSecretRolesUpdateOK { - return &SecretsSecretRolesUpdateOK{} +// NewIpamIPRangesAvailableIpsReadOK creates a IpamIPRangesAvailableIpsReadOK with default headers values +func NewIpamIPRangesAvailableIpsReadOK() *IpamIPRangesAvailableIpsReadOK { + return &IpamIPRangesAvailableIpsReadOK{} } -/* SecretsSecretRolesUpdateOK describes a response with status code 200, with default header values. +/* IpamIPRangesAvailableIpsReadOK describes a response with status code 200, with default header values. -SecretsSecretRolesUpdateOK secrets secret roles update o k +IpamIPRangesAvailableIpsReadOK ipam Ip ranges available ips read o k */ -type SecretsSecretRolesUpdateOK struct { - Payload *models.SecretRole +type IpamIPRangesAvailableIpsReadOK struct { + Payload []*models.AvailableIP } -func (o *SecretsSecretRolesUpdateOK) Error() string { - return fmt.Sprintf("[PUT /secrets/secret-roles/{id}/][%d] secretsSecretRolesUpdateOK %+v", 200, o.Payload) +func (o *IpamIPRangesAvailableIpsReadOK) Error() string { + return fmt.Sprintf("[GET /ipam/ip-ranges/{id}/available-ips/][%d] ipamIpRangesAvailableIpsReadOK %+v", 200, o.Payload) } -func (o *SecretsSecretRolesUpdateOK) GetPayload() *models.SecretRole { +func (o *IpamIPRangesAvailableIpsReadOK) GetPayload() []*models.AvailableIP { return o.Payload } -func (o *SecretsSecretRolesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SecretRole) +func (o *IpamIPRangesAvailableIpsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } diff --git a/netbox/client/ipam/ipam_ip_ranges_bulk_delete_parameters.go b/netbox/client/ipam/ipam_ip_ranges_bulk_delete_parameters.go new file mode 100644 index 000000000..cebe7af31 --- /dev/null +++ b/netbox/client/ipam/ipam_ip_ranges_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewIpamIPRangesBulkDeleteParams creates a new IpamIPRangesBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamIPRangesBulkDeleteParams() *IpamIPRangesBulkDeleteParams { + return &IpamIPRangesBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamIPRangesBulkDeleteParamsWithTimeout creates a new IpamIPRangesBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewIpamIPRangesBulkDeleteParamsWithTimeout(timeout time.Duration) *IpamIPRangesBulkDeleteParams { + return &IpamIPRangesBulkDeleteParams{ + timeout: timeout, + } +} + +// NewIpamIPRangesBulkDeleteParamsWithContext creates a new IpamIPRangesBulkDeleteParams object +// with the ability to set a context for a request. +func NewIpamIPRangesBulkDeleteParamsWithContext(ctx context.Context) *IpamIPRangesBulkDeleteParams { + return &IpamIPRangesBulkDeleteParams{ + Context: ctx, + } +} + +// NewIpamIPRangesBulkDeleteParamsWithHTTPClient creates a new IpamIPRangesBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamIPRangesBulkDeleteParamsWithHTTPClient(client *http.Client) *IpamIPRangesBulkDeleteParams { + return &IpamIPRangesBulkDeleteParams{ + HTTPClient: client, + } +} + +/* IpamIPRangesBulkDeleteParams contains all the parameters to send to the API endpoint + for the ipam ip ranges bulk delete operation. + + Typically these are written to a http.Request. +*/ +type IpamIPRangesBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam ip ranges bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesBulkDeleteParams) WithDefaults() *IpamIPRangesBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam ip ranges bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam ip ranges bulk delete params +func (o *IpamIPRangesBulkDeleteParams) WithTimeout(timeout time.Duration) *IpamIPRangesBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam ip ranges bulk delete params +func (o *IpamIPRangesBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam ip ranges bulk delete params +func (o *IpamIPRangesBulkDeleteParams) WithContext(ctx context.Context) *IpamIPRangesBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam ip ranges bulk delete params +func (o *IpamIPRangesBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam ip ranges bulk delete params +func (o *IpamIPRangesBulkDeleteParams) WithHTTPClient(client *http.Client) *IpamIPRangesBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam ip ranges bulk delete params +func (o *IpamIPRangesBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamIPRangesBulkDeleteParams) 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/netbox/client/secrets/secrets_generate_rsa_key_pair_list_responses.go b/netbox/client/ipam/ipam_ip_ranges_bulk_delete_responses.go similarity index 57% rename from netbox/client/secrets/secrets_generate_rsa_key_pair_list_responses.go rename to netbox/client/ipam/ipam_ip_ranges_bulk_delete_responses.go index 6c74b9415..1760e5204 100644 --- a/netbox/client/secrets/secrets_generate_rsa_key_pair_list_responses.go +++ b/netbox/client/ipam/ipam_ip_ranges_bulk_delete_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package ipam // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -27,16 +27,16 @@ import ( "github.com/go-openapi/strfmt" ) -// SecretsGenerateRsaKeyPairListReader is a Reader for the SecretsGenerateRsaKeyPairList structure. -type SecretsGenerateRsaKeyPairListReader struct { +// IpamIPRangesBulkDeleteReader is a Reader for the IpamIPRangesBulkDelete structure. +type IpamIPRangesBulkDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsGenerateRsaKeyPairListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPRangesBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewSecretsGenerateRsaKeyPairListOK() + case 204: + result := NewIpamIPRangesBulkDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -46,23 +46,23 @@ func (o *SecretsGenerateRsaKeyPairListReader) ReadResponse(response runtime.Clie } } -// NewSecretsGenerateRsaKeyPairListOK creates a SecretsGenerateRsaKeyPairListOK with default headers values -func NewSecretsGenerateRsaKeyPairListOK() *SecretsGenerateRsaKeyPairListOK { - return &SecretsGenerateRsaKeyPairListOK{} +// NewIpamIPRangesBulkDeleteNoContent creates a IpamIPRangesBulkDeleteNoContent with default headers values +func NewIpamIPRangesBulkDeleteNoContent() *IpamIPRangesBulkDeleteNoContent { + return &IpamIPRangesBulkDeleteNoContent{} } -/* SecretsGenerateRsaKeyPairListOK describes a response with status code 200, with default header values. +/* IpamIPRangesBulkDeleteNoContent describes a response with status code 204, with default header values. -SecretsGenerateRsaKeyPairListOK secrets generate rsa key pair list o k +IpamIPRangesBulkDeleteNoContent ipam Ip ranges bulk delete no content */ -type SecretsGenerateRsaKeyPairListOK struct { +type IpamIPRangesBulkDeleteNoContent struct { } -func (o *SecretsGenerateRsaKeyPairListOK) Error() string { - return fmt.Sprintf("[GET /secrets/generate-rsa-key-pair/][%d] secretsGenerateRsaKeyPairListOK ", 200) +func (o *IpamIPRangesBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /ipam/ip-ranges/][%d] ipamIpRangesBulkDeleteNoContent ", 204) } -func (o *SecretsGenerateRsaKeyPairListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPRangesBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/ipam/ipam_ip_ranges_bulk_partial_update_parameters.go b/netbox/client/ipam/ipam_ip_ranges_bulk_partial_update_parameters.go new file mode 100644 index 000000000..75b1f7ccd --- /dev/null +++ b/netbox/client/ipam/ipam_ip_ranges_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamIPRangesBulkPartialUpdateParams creates a new IpamIPRangesBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamIPRangesBulkPartialUpdateParams() *IpamIPRangesBulkPartialUpdateParams { + return &IpamIPRangesBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamIPRangesBulkPartialUpdateParamsWithTimeout creates a new IpamIPRangesBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamIPRangesBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamIPRangesBulkPartialUpdateParams { + return &IpamIPRangesBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewIpamIPRangesBulkPartialUpdateParamsWithContext creates a new IpamIPRangesBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewIpamIPRangesBulkPartialUpdateParamsWithContext(ctx context.Context) *IpamIPRangesBulkPartialUpdateParams { + return &IpamIPRangesBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewIpamIPRangesBulkPartialUpdateParamsWithHTTPClient creates a new IpamIPRangesBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamIPRangesBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamIPRangesBulkPartialUpdateParams { + return &IpamIPRangesBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* IpamIPRangesBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the ipam ip ranges bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type IpamIPRangesBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableIPRange + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam ip ranges bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesBulkPartialUpdateParams) WithDefaults() *IpamIPRangesBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam ip ranges bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam ip ranges bulk partial update params +func (o *IpamIPRangesBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamIPRangesBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam ip ranges bulk partial update params +func (o *IpamIPRangesBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam ip ranges bulk partial update params +func (o *IpamIPRangesBulkPartialUpdateParams) WithContext(ctx context.Context) *IpamIPRangesBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam ip ranges bulk partial update params +func (o *IpamIPRangesBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam ip ranges bulk partial update params +func (o *IpamIPRangesBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamIPRangesBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam ip ranges bulk partial update params +func (o *IpamIPRangesBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam ip ranges bulk partial update params +func (o *IpamIPRangesBulkPartialUpdateParams) WithData(data *models.WritableIPRange) *IpamIPRangesBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam ip ranges bulk partial update params +func (o *IpamIPRangesBulkPartialUpdateParams) SetData(data *models.WritableIPRange) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamIPRangesBulkPartialUpdateParams) 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/netbox/client/secrets/secrets_secret_roles_create_responses.go b/netbox/client/ipam/ipam_ip_ranges_bulk_partial_update_responses.go similarity index 57% rename from netbox/client/secrets/secrets_secret_roles_create_responses.go rename to netbox/client/ipam/ipam_ip_ranges_bulk_partial_update_responses.go index 243b4f11d..f82a52449 100644 --- a/netbox/client/secrets/secrets_secret_roles_create_responses.go +++ b/netbox/client/ipam/ipam_ip_ranges_bulk_partial_update_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package ipam // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// SecretsSecretRolesCreateReader is a Reader for the SecretsSecretRolesCreate structure. -type SecretsSecretRolesCreateReader struct { +// IpamIPRangesBulkPartialUpdateReader is a Reader for the IpamIPRangesBulkPartialUpdate structure. +type IpamIPRangesBulkPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretRolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPRangesBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: - result := NewSecretsSecretRolesCreateCreated() + case 200: + result := NewIpamIPRangesBulkPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,29 +49,29 @@ func (o *SecretsSecretRolesCreateReader) ReadResponse(response runtime.ClientRes } } -// NewSecretsSecretRolesCreateCreated creates a SecretsSecretRolesCreateCreated with default headers values -func NewSecretsSecretRolesCreateCreated() *SecretsSecretRolesCreateCreated { - return &SecretsSecretRolesCreateCreated{} +// NewIpamIPRangesBulkPartialUpdateOK creates a IpamIPRangesBulkPartialUpdateOK with default headers values +func NewIpamIPRangesBulkPartialUpdateOK() *IpamIPRangesBulkPartialUpdateOK { + return &IpamIPRangesBulkPartialUpdateOK{} } -/* SecretsSecretRolesCreateCreated describes a response with status code 201, with default header values. +/* IpamIPRangesBulkPartialUpdateOK describes a response with status code 200, with default header values. -SecretsSecretRolesCreateCreated secrets secret roles create created +IpamIPRangesBulkPartialUpdateOK ipam Ip ranges bulk partial update o k */ -type SecretsSecretRolesCreateCreated struct { - Payload *models.SecretRole +type IpamIPRangesBulkPartialUpdateOK struct { + Payload *models.IPRange } -func (o *SecretsSecretRolesCreateCreated) Error() string { - return fmt.Sprintf("[POST /secrets/secret-roles/][%d] secretsSecretRolesCreateCreated %+v", 201, o.Payload) +func (o *IpamIPRangesBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /ipam/ip-ranges/][%d] ipamIpRangesBulkPartialUpdateOK %+v", 200, o.Payload) } -func (o *SecretsSecretRolesCreateCreated) GetPayload() *models.SecretRole { +func (o *IpamIPRangesBulkPartialUpdateOK) GetPayload() *models.IPRange { return o.Payload } -func (o *SecretsSecretRolesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPRangesBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.SecretRole) + o.Payload = new(models.IPRange) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/netbox/client/ipam/ipam_ip_ranges_bulk_update_parameters.go b/netbox/client/ipam/ipam_ip_ranges_bulk_update_parameters.go new file mode 100644 index 000000000..b44e549f8 --- /dev/null +++ b/netbox/client/ipam/ipam_ip_ranges_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamIPRangesBulkUpdateParams creates a new IpamIPRangesBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamIPRangesBulkUpdateParams() *IpamIPRangesBulkUpdateParams { + return &IpamIPRangesBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamIPRangesBulkUpdateParamsWithTimeout creates a new IpamIPRangesBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamIPRangesBulkUpdateParamsWithTimeout(timeout time.Duration) *IpamIPRangesBulkUpdateParams { + return &IpamIPRangesBulkUpdateParams{ + timeout: timeout, + } +} + +// NewIpamIPRangesBulkUpdateParamsWithContext creates a new IpamIPRangesBulkUpdateParams object +// with the ability to set a context for a request. +func NewIpamIPRangesBulkUpdateParamsWithContext(ctx context.Context) *IpamIPRangesBulkUpdateParams { + return &IpamIPRangesBulkUpdateParams{ + Context: ctx, + } +} + +// NewIpamIPRangesBulkUpdateParamsWithHTTPClient creates a new IpamIPRangesBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamIPRangesBulkUpdateParamsWithHTTPClient(client *http.Client) *IpamIPRangesBulkUpdateParams { + return &IpamIPRangesBulkUpdateParams{ + HTTPClient: client, + } +} + +/* IpamIPRangesBulkUpdateParams contains all the parameters to send to the API endpoint + for the ipam ip ranges bulk update operation. + + Typically these are written to a http.Request. +*/ +type IpamIPRangesBulkUpdateParams struct { + + // Data. + Data *models.WritableIPRange + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam ip ranges bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesBulkUpdateParams) WithDefaults() *IpamIPRangesBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam ip ranges bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam ip ranges bulk update params +func (o *IpamIPRangesBulkUpdateParams) WithTimeout(timeout time.Duration) *IpamIPRangesBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam ip ranges bulk update params +func (o *IpamIPRangesBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam ip ranges bulk update params +func (o *IpamIPRangesBulkUpdateParams) WithContext(ctx context.Context) *IpamIPRangesBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam ip ranges bulk update params +func (o *IpamIPRangesBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam ip ranges bulk update params +func (o *IpamIPRangesBulkUpdateParams) WithHTTPClient(client *http.Client) *IpamIPRangesBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam ip ranges bulk update params +func (o *IpamIPRangesBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam ip ranges bulk update params +func (o *IpamIPRangesBulkUpdateParams) WithData(data *models.WritableIPRange) *IpamIPRangesBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam ip ranges bulk update params +func (o *IpamIPRangesBulkUpdateParams) SetData(data *models.WritableIPRange) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamIPRangesBulkUpdateParams) 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/netbox/client/secrets/secrets_secret_roles_read_responses.go b/netbox/client/ipam/ipam_ip_ranges_bulk_update_responses.go similarity index 65% rename from netbox/client/secrets/secrets_secret_roles_read_responses.go rename to netbox/client/ipam/ipam_ip_ranges_bulk_update_responses.go index 68d97dcd1..fceeade5d 100644 --- a/netbox/client/secrets/secrets_secret_roles_read_responses.go +++ b/netbox/client/ipam/ipam_ip_ranges_bulk_update_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package ipam // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// SecretsSecretRolesReadReader is a Reader for the SecretsSecretRolesRead structure. -type SecretsSecretRolesReadReader struct { +// IpamIPRangesBulkUpdateReader is a Reader for the IpamIPRangesBulkUpdate structure. +type IpamIPRangesBulkUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretRolesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPRangesBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewSecretsSecretRolesReadOK() + result := NewIpamIPRangesBulkUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,29 +49,29 @@ func (o *SecretsSecretRolesReadReader) ReadResponse(response runtime.ClientRespo } } -// NewSecretsSecretRolesReadOK creates a SecretsSecretRolesReadOK with default headers values -func NewSecretsSecretRolesReadOK() *SecretsSecretRolesReadOK { - return &SecretsSecretRolesReadOK{} +// NewIpamIPRangesBulkUpdateOK creates a IpamIPRangesBulkUpdateOK with default headers values +func NewIpamIPRangesBulkUpdateOK() *IpamIPRangesBulkUpdateOK { + return &IpamIPRangesBulkUpdateOK{} } -/* SecretsSecretRolesReadOK describes a response with status code 200, with default header values. +/* IpamIPRangesBulkUpdateOK describes a response with status code 200, with default header values. -SecretsSecretRolesReadOK secrets secret roles read o k +IpamIPRangesBulkUpdateOK ipam Ip ranges bulk update o k */ -type SecretsSecretRolesReadOK struct { - Payload *models.SecretRole +type IpamIPRangesBulkUpdateOK struct { + Payload *models.IPRange } -func (o *SecretsSecretRolesReadOK) Error() string { - return fmt.Sprintf("[GET /secrets/secret-roles/{id}/][%d] secretsSecretRolesReadOK %+v", 200, o.Payload) +func (o *IpamIPRangesBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /ipam/ip-ranges/][%d] ipamIpRangesBulkUpdateOK %+v", 200, o.Payload) } -func (o *SecretsSecretRolesReadOK) GetPayload() *models.SecretRole { +func (o *IpamIPRangesBulkUpdateOK) GetPayload() *models.IPRange { return o.Payload } -func (o *SecretsSecretRolesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPRangesBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.SecretRole) + o.Payload = new(models.IPRange) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/netbox/client/ipam/ipam_ip_ranges_create_parameters.go b/netbox/client/ipam/ipam_ip_ranges_create_parameters.go new file mode 100644 index 000000000..dcee81411 --- /dev/null +++ b/netbox/client/ipam/ipam_ip_ranges_create_parameters.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamIPRangesCreateParams creates a new IpamIPRangesCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamIPRangesCreateParams() *IpamIPRangesCreateParams { + return &IpamIPRangesCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamIPRangesCreateParamsWithTimeout creates a new IpamIPRangesCreateParams object +// with the ability to set a timeout on a request. +func NewIpamIPRangesCreateParamsWithTimeout(timeout time.Duration) *IpamIPRangesCreateParams { + return &IpamIPRangesCreateParams{ + timeout: timeout, + } +} + +// NewIpamIPRangesCreateParamsWithContext creates a new IpamIPRangesCreateParams object +// with the ability to set a context for a request. +func NewIpamIPRangesCreateParamsWithContext(ctx context.Context) *IpamIPRangesCreateParams { + return &IpamIPRangesCreateParams{ + Context: ctx, + } +} + +// NewIpamIPRangesCreateParamsWithHTTPClient creates a new IpamIPRangesCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamIPRangesCreateParamsWithHTTPClient(client *http.Client) *IpamIPRangesCreateParams { + return &IpamIPRangesCreateParams{ + HTTPClient: client, + } +} + +/* IpamIPRangesCreateParams contains all the parameters to send to the API endpoint + for the ipam ip ranges create operation. + + Typically these are written to a http.Request. +*/ +type IpamIPRangesCreateParams struct { + + // Data. + Data *models.WritableIPRange + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam ip ranges create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesCreateParams) WithDefaults() *IpamIPRangesCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam ip ranges create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam ip ranges create params +func (o *IpamIPRangesCreateParams) WithTimeout(timeout time.Duration) *IpamIPRangesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam ip ranges create params +func (o *IpamIPRangesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam ip ranges create params +func (o *IpamIPRangesCreateParams) WithContext(ctx context.Context) *IpamIPRangesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam ip ranges create params +func (o *IpamIPRangesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam ip ranges create params +func (o *IpamIPRangesCreateParams) WithHTTPClient(client *http.Client) *IpamIPRangesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam ip ranges create params +func (o *IpamIPRangesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam ip ranges create params +func (o *IpamIPRangesCreateParams) WithData(data *models.WritableIPRange) *IpamIPRangesCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam ip ranges create params +func (o *IpamIPRangesCreateParams) SetData(data *models.WritableIPRange) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamIPRangesCreateParams) 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/netbox/client/ipam/ipam_ip_ranges_create_responses.go b/netbox/client/ipam/ipam_ip_ranges_create_responses.go new file mode 100644 index 000000000..f41af380b --- /dev/null +++ b/netbox/client/ipam/ipam_ip_ranges_create_responses.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamIPRangesCreateReader is a Reader for the IpamIPRangesCreate structure. +type IpamIPRangesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamIPRangesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewIpamIPRangesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamIPRangesCreateCreated creates a IpamIPRangesCreateCreated with default headers values +func NewIpamIPRangesCreateCreated() *IpamIPRangesCreateCreated { + return &IpamIPRangesCreateCreated{} +} + +/* IpamIPRangesCreateCreated describes a response with status code 201, with default header values. + +IpamIPRangesCreateCreated ipam Ip ranges create created +*/ +type IpamIPRangesCreateCreated struct { + Payload *models.IPRange +} + +func (o *IpamIPRangesCreateCreated) Error() string { + return fmt.Sprintf("[POST /ipam/ip-ranges/][%d] ipamIpRangesCreateCreated %+v", 201, o.Payload) +} +func (o *IpamIPRangesCreateCreated) GetPayload() *models.IPRange { + return o.Payload +} + +func (o *IpamIPRangesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.IPRange) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_ip_ranges_delete_parameters.go b/netbox/client/ipam/ipam_ip_ranges_delete_parameters.go new file mode 100644 index 000000000..2bad944df --- /dev/null +++ b/netbox/client/ipam/ipam_ip_ranges_delete_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewIpamIPRangesDeleteParams creates a new IpamIPRangesDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamIPRangesDeleteParams() *IpamIPRangesDeleteParams { + return &IpamIPRangesDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamIPRangesDeleteParamsWithTimeout creates a new IpamIPRangesDeleteParams object +// with the ability to set a timeout on a request. +func NewIpamIPRangesDeleteParamsWithTimeout(timeout time.Duration) *IpamIPRangesDeleteParams { + return &IpamIPRangesDeleteParams{ + timeout: timeout, + } +} + +// NewIpamIPRangesDeleteParamsWithContext creates a new IpamIPRangesDeleteParams object +// with the ability to set a context for a request. +func NewIpamIPRangesDeleteParamsWithContext(ctx context.Context) *IpamIPRangesDeleteParams { + return &IpamIPRangesDeleteParams{ + Context: ctx, + } +} + +// NewIpamIPRangesDeleteParamsWithHTTPClient creates a new IpamIPRangesDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamIPRangesDeleteParamsWithHTTPClient(client *http.Client) *IpamIPRangesDeleteParams { + return &IpamIPRangesDeleteParams{ + HTTPClient: client, + } +} + +/* IpamIPRangesDeleteParams contains all the parameters to send to the API endpoint + for the ipam ip ranges delete operation. + + Typically these are written to a http.Request. +*/ +type IpamIPRangesDeleteParams struct { + + /* ID. + + A unique integer value identifying this IP range. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam ip ranges delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesDeleteParams) WithDefaults() *IpamIPRangesDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam ip ranges delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam ip ranges delete params +func (o *IpamIPRangesDeleteParams) WithTimeout(timeout time.Duration) *IpamIPRangesDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam ip ranges delete params +func (o *IpamIPRangesDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam ip ranges delete params +func (o *IpamIPRangesDeleteParams) WithContext(ctx context.Context) *IpamIPRangesDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam ip ranges delete params +func (o *IpamIPRangesDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam ip ranges delete params +func (o *IpamIPRangesDeleteParams) WithHTTPClient(client *http.Client) *IpamIPRangesDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam ip ranges delete params +func (o *IpamIPRangesDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam ip ranges delete params +func (o *IpamIPRangesDeleteParams) WithID(id int64) *IpamIPRangesDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam ip ranges delete params +func (o *IpamIPRangesDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamIPRangesDeleteParams) 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/netbox/client/secrets/secrets_secrets_delete_responses.go b/netbox/client/ipam/ipam_ip_ranges_delete_responses.go similarity index 55% rename from netbox/client/secrets/secrets_secrets_delete_responses.go rename to netbox/client/ipam/ipam_ip_ranges_delete_responses.go index 8b6ece7d5..e24d0a7a4 100644 --- a/netbox/client/secrets/secrets_secrets_delete_responses.go +++ b/netbox/client/ipam/ipam_ip_ranges_delete_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package ipam // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -27,16 +27,16 @@ import ( "github.com/go-openapi/strfmt" ) -// SecretsSecretsDeleteReader is a Reader for the SecretsSecretsDelete structure. -type SecretsSecretsDeleteReader struct { +// IpamIPRangesDeleteReader is a Reader for the IpamIPRangesDelete structure. +type IpamIPRangesDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPRangesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 204: - result := NewSecretsSecretsDeleteNoContent() + result := NewIpamIPRangesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -46,23 +46,23 @@ func (o *SecretsSecretsDeleteReader) ReadResponse(response runtime.ClientRespons } } -// NewSecretsSecretsDeleteNoContent creates a SecretsSecretsDeleteNoContent with default headers values -func NewSecretsSecretsDeleteNoContent() *SecretsSecretsDeleteNoContent { - return &SecretsSecretsDeleteNoContent{} +// NewIpamIPRangesDeleteNoContent creates a IpamIPRangesDeleteNoContent with default headers values +func NewIpamIPRangesDeleteNoContent() *IpamIPRangesDeleteNoContent { + return &IpamIPRangesDeleteNoContent{} } -/* SecretsSecretsDeleteNoContent describes a response with status code 204, with default header values. +/* IpamIPRangesDeleteNoContent describes a response with status code 204, with default header values. -SecretsSecretsDeleteNoContent secrets secrets delete no content +IpamIPRangesDeleteNoContent ipam Ip ranges delete no content */ -type SecretsSecretsDeleteNoContent struct { +type IpamIPRangesDeleteNoContent struct { } -func (o *SecretsSecretsDeleteNoContent) Error() string { - return fmt.Sprintf("[DELETE /secrets/secrets/{id}/][%d] secretsSecretsDeleteNoContent ", 204) +func (o *IpamIPRangesDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /ipam/ip-ranges/{id}/][%d] ipamIpRangesDeleteNoContent ", 204) } -func (o *SecretsSecretsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPRangesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/ipam/ipam_ip_ranges_list_parameters.go b/netbox/client/ipam/ipam_ip_ranges_list_parameters.go new file mode 100644 index 000000000..7a6e3197e --- /dev/null +++ b/netbox/client/ipam/ipam_ip_ranges_list_parameters.go @@ -0,0 +1,1296 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewIpamIPRangesListParams creates a new IpamIPRangesListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamIPRangesListParams() *IpamIPRangesListParams { + return &IpamIPRangesListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamIPRangesListParamsWithTimeout creates a new IpamIPRangesListParams object +// with the ability to set a timeout on a request. +func NewIpamIPRangesListParamsWithTimeout(timeout time.Duration) *IpamIPRangesListParams { + return &IpamIPRangesListParams{ + timeout: timeout, + } +} + +// NewIpamIPRangesListParamsWithContext creates a new IpamIPRangesListParams object +// with the ability to set a context for a request. +func NewIpamIPRangesListParamsWithContext(ctx context.Context) *IpamIPRangesListParams { + return &IpamIPRangesListParams{ + Context: ctx, + } +} + +// NewIpamIPRangesListParamsWithHTTPClient creates a new IpamIPRangesListParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamIPRangesListParamsWithHTTPClient(client *http.Client) *IpamIPRangesListParams { + return &IpamIPRangesListParams{ + HTTPClient: client, + } +} + +/* IpamIPRangesListParams contains all the parameters to send to the API endpoint + for the ipam ip ranges list operation. + + Typically these are written to a http.Request. +*/ +type IpamIPRangesListParams struct { + + // Contains. + Contains *string + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // Family. + Family *float64 + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Q. + Q *string + + // Role. + Role *string + + // Rolen. + Rolen *string + + // RoleID. + RoleID *string + + // RoleIDn. + RoleIDn *string + + // Status. + Status *string + + // Statusn. + Statusn *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + // Tenant. + Tenant *string + + // Tenantn. + Tenantn *string + + // TenantGroup. + TenantGroup *string + + // TenantGroupn. + TenantGroupn *string + + // TenantGroupID. + TenantGroupID *string + + // TenantGroupIDn. + TenantGroupIDn *string + + // TenantID. + TenantID *string + + // TenantIDn. + TenantIDn *string + + // Vrf. + Vrf *string + + // Vrfn. + Vrfn *string + + // VrfID. + VrfID *string + + // VrfIDn. + VrfIDn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam ip ranges list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesListParams) WithDefaults() *IpamIPRangesListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam ip ranges list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithTimeout(timeout time.Duration) *IpamIPRangesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithContext(ctx context.Context) *IpamIPRangesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithHTTPClient(client *http.Client) *IpamIPRangesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContains adds the contains to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithContains(contains *string) *IpamIPRangesListParams { + o.SetContains(contains) + return o +} + +// SetContains adds the contains to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetContains(contains *string) { + o.Contains = contains +} + +// WithCreated adds the created to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithCreated(created *string) *IpamIPRangesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithCreatedGte(createdGte *string) *IpamIPRangesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithCreatedLte(createdLte *string) *IpamIPRangesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithFamily adds the family to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithFamily(family *float64) *IpamIPRangesListParams { + o.SetFamily(family) + return o +} + +// SetFamily adds the family to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetFamily(family *float64) { + o.Family = family +} + +// WithID adds the id to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithID(id *string) *IpamIPRangesListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithIDGt(iDGt *string) *IpamIPRangesListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithIDGte(iDGte *string) *IpamIPRangesListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithIDLt(iDLt *string) *IpamIPRangesListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithIDLte(iDLte *string) *IpamIPRangesListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithIDn(iDn *string) *IpamIPRangesListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLastUpdated adds the lastUpdated to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithLastUpdated(lastUpdated *string) *IpamIPRangesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamIPRangesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamIPRangesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithLimit(limit *int64) *IpamIPRangesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithOffset(offset *int64) *IpamIPRangesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithQ adds the q to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithQ(q *string) *IpamIPRangesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetQ(q *string) { + o.Q = q +} + +// WithRole adds the role to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithRole(role *string) *IpamIPRangesListParams { + o.SetRole(role) + return o +} + +// SetRole adds the role to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetRole(role *string) { + o.Role = role +} + +// WithRolen adds the rolen to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithRolen(rolen *string) *IpamIPRangesListParams { + o.SetRolen(rolen) + return o +} + +// SetRolen adds the roleN to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetRolen(rolen *string) { + o.Rolen = rolen +} + +// WithRoleID adds the roleID to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithRoleID(roleID *string) *IpamIPRangesListParams { + o.SetRoleID(roleID) + return o +} + +// SetRoleID adds the roleId to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetRoleID(roleID *string) { + o.RoleID = roleID +} + +// WithRoleIDn adds the roleIDn to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithRoleIDn(roleIDn *string) *IpamIPRangesListParams { + o.SetRoleIDn(roleIDn) + return o +} + +// SetRoleIDn adds the roleIdN to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetRoleIDn(roleIDn *string) { + o.RoleIDn = roleIDn +} + +// WithStatus adds the status to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithStatus(status *string) *IpamIPRangesListParams { + o.SetStatus(status) + return o +} + +// SetStatus adds the status to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetStatus(status *string) { + o.Status = status +} + +// WithStatusn adds the statusn to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithStatusn(statusn *string) *IpamIPRangesListParams { + o.SetStatusn(statusn) + return o +} + +// SetStatusn adds the statusN to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetStatusn(statusn *string) { + o.Statusn = statusn +} + +// WithTag adds the tag to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithTag(tag *string) *IpamIPRangesListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithTagn(tagn *string) *IpamIPRangesListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WithTenant adds the tenant to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithTenant(tenant *string) *IpamIPRangesListParams { + o.SetTenant(tenant) + return o +} + +// SetTenant adds the tenant to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetTenant(tenant *string) { + o.Tenant = tenant +} + +// WithTenantn adds the tenantn to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithTenantn(tenantn *string) *IpamIPRangesListParams { + o.SetTenantn(tenantn) + return o +} + +// SetTenantn adds the tenantN to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetTenantn(tenantn *string) { + o.Tenantn = tenantn +} + +// WithTenantGroup adds the tenantGroup to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithTenantGroup(tenantGroup *string) *IpamIPRangesListParams { + o.SetTenantGroup(tenantGroup) + return o +} + +// SetTenantGroup adds the tenantGroup to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetTenantGroup(tenantGroup *string) { + o.TenantGroup = tenantGroup +} + +// WithTenantGroupn adds the tenantGroupn to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithTenantGroupn(tenantGroupn *string) *IpamIPRangesListParams { + o.SetTenantGroupn(tenantGroupn) + return o +} + +// SetTenantGroupn adds the tenantGroupN to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetTenantGroupn(tenantGroupn *string) { + o.TenantGroupn = tenantGroupn +} + +// WithTenantGroupID adds the tenantGroupID to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithTenantGroupID(tenantGroupID *string) *IpamIPRangesListParams { + o.SetTenantGroupID(tenantGroupID) + return o +} + +// SetTenantGroupID adds the tenantGroupId to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetTenantGroupID(tenantGroupID *string) { + o.TenantGroupID = tenantGroupID +} + +// WithTenantGroupIDn adds the tenantGroupIDn to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithTenantGroupIDn(tenantGroupIDn *string) *IpamIPRangesListParams { + o.SetTenantGroupIDn(tenantGroupIDn) + return o +} + +// SetTenantGroupIDn adds the tenantGroupIdN to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetTenantGroupIDn(tenantGroupIDn *string) { + o.TenantGroupIDn = tenantGroupIDn +} + +// WithTenantID adds the tenantID to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithTenantID(tenantID *string) *IpamIPRangesListParams { + o.SetTenantID(tenantID) + return o +} + +// SetTenantID adds the tenantId to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetTenantID(tenantID *string) { + o.TenantID = tenantID +} + +// WithTenantIDn adds the tenantIDn to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithTenantIDn(tenantIDn *string) *IpamIPRangesListParams { + o.SetTenantIDn(tenantIDn) + return o +} + +// SetTenantIDn adds the tenantIdN to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetTenantIDn(tenantIDn *string) { + o.TenantIDn = tenantIDn +} + +// WithVrf adds the vrf to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithVrf(vrf *string) *IpamIPRangesListParams { + o.SetVrf(vrf) + return o +} + +// SetVrf adds the vrf to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetVrf(vrf *string) { + o.Vrf = vrf +} + +// WithVrfn adds the vrfn to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithVrfn(vrfn *string) *IpamIPRangesListParams { + o.SetVrfn(vrfn) + return o +} + +// SetVrfn adds the vrfN to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetVrfn(vrfn *string) { + o.Vrfn = vrfn +} + +// WithVrfID adds the vrfID to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithVrfID(vrfID *string) *IpamIPRangesListParams { + o.SetVrfID(vrfID) + return o +} + +// SetVrfID adds the vrfId to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetVrfID(vrfID *string) { + o.VrfID = vrfID +} + +// WithVrfIDn adds the vrfIDn to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithVrfIDn(vrfIDn *string) *IpamIPRangesListParams { + o.SetVrfIDn(vrfIDn) + return o +} + +// SetVrfIDn adds the vrfIdN to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetVrfIDn(vrfIDn *string) { + o.VrfIDn = vrfIDn +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamIPRangesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Contains != nil { + + // query param contains + var qrContains string + + if o.Contains != nil { + qrContains = *o.Contains + } + qContains := qrContains + if qContains != "" { + + if err := r.SetQueryParam("contains", qContains); err != nil { + return err + } + } + } + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.Family != nil { + + // query param family + var qrFamily float64 + + if o.Family != nil { + qrFamily = *o.Family + } + qFamily := swag.FormatFloat64(qrFamily) + if qFamily != "" { + + if err := r.SetQueryParam("family", qFamily); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.Role != nil { + + // query param role + var qrRole string + + if o.Role != nil { + qrRole = *o.Role + } + qRole := qrRole + if qRole != "" { + + if err := r.SetQueryParam("role", qRole); err != nil { + return err + } + } + } + + if o.Rolen != nil { + + // query param role__n + var qrRolen string + + if o.Rolen != nil { + qrRolen = *o.Rolen + } + qRolen := qrRolen + if qRolen != "" { + + if err := r.SetQueryParam("role__n", qRolen); err != nil { + return err + } + } + } + + if o.RoleID != nil { + + // query param role_id + var qrRoleID string + + if o.RoleID != nil { + qrRoleID = *o.RoleID + } + qRoleID := qrRoleID + if qRoleID != "" { + + if err := r.SetQueryParam("role_id", qRoleID); err != nil { + return err + } + } + } + + if o.RoleIDn != nil { + + // query param role_id__n + var qrRoleIDn string + + if o.RoleIDn != nil { + qrRoleIDn = *o.RoleIDn + } + qRoleIDn := qrRoleIDn + if qRoleIDn != "" { + + if err := r.SetQueryParam("role_id__n", qRoleIDn); err != nil { + return err + } + } + } + + if o.Status != nil { + + // query param status + var qrStatus string + + if o.Status != nil { + qrStatus = *o.Status + } + qStatus := qrStatus + if qStatus != "" { + + if err := r.SetQueryParam("status", qStatus); err != nil { + return err + } + } + } + + if o.Statusn != nil { + + // query param status__n + var qrStatusn string + + if o.Statusn != nil { + qrStatusn = *o.Statusn + } + qStatusn := qrStatusn + if qStatusn != "" { + + if err := r.SetQueryParam("status__n", qStatusn); err != nil { + return err + } + } + } + + if o.Tag != nil { + + // query param tag + var qrTag string + + if o.Tag != nil { + qrTag = *o.Tag + } + qTag := qrTag + if qTag != "" { + + if err := r.SetQueryParam("tag", qTag); err != nil { + return err + } + } + } + + if o.Tagn != nil { + + // query param tag__n + var qrTagn string + + if o.Tagn != nil { + qrTagn = *o.Tagn + } + qTagn := qrTagn + if qTagn != "" { + + if err := r.SetQueryParam("tag__n", qTagn); err != nil { + return err + } + } + } + + if o.Tenant != nil { + + // query param tenant + var qrTenant string + + if o.Tenant != nil { + qrTenant = *o.Tenant + } + qTenant := qrTenant + if qTenant != "" { + + if err := r.SetQueryParam("tenant", qTenant); err != nil { + return err + } + } + } + + if o.Tenantn != nil { + + // query param tenant__n + var qrTenantn string + + if o.Tenantn != nil { + qrTenantn = *o.Tenantn + } + qTenantn := qrTenantn + if qTenantn != "" { + + if err := r.SetQueryParam("tenant__n", qTenantn); err != nil { + return err + } + } + } + + if o.TenantGroup != nil { + + // query param tenant_group + var qrTenantGroup string + + if o.TenantGroup != nil { + qrTenantGroup = *o.TenantGroup + } + qTenantGroup := qrTenantGroup + if qTenantGroup != "" { + + if err := r.SetQueryParam("tenant_group", qTenantGroup); err != nil { + return err + } + } + } + + if o.TenantGroupn != nil { + + // query param tenant_group__n + var qrTenantGroupn string + + if o.TenantGroupn != nil { + qrTenantGroupn = *o.TenantGroupn + } + qTenantGroupn := qrTenantGroupn + if qTenantGroupn != "" { + + if err := r.SetQueryParam("tenant_group__n", qTenantGroupn); err != nil { + return err + } + } + } + + if o.TenantGroupID != nil { + + // query param tenant_group_id + var qrTenantGroupID string + + if o.TenantGroupID != nil { + qrTenantGroupID = *o.TenantGroupID + } + qTenantGroupID := qrTenantGroupID + if qTenantGroupID != "" { + + if err := r.SetQueryParam("tenant_group_id", qTenantGroupID); err != nil { + return err + } + } + } + + if o.TenantGroupIDn != nil { + + // query param tenant_group_id__n + var qrTenantGroupIDn string + + if o.TenantGroupIDn != nil { + qrTenantGroupIDn = *o.TenantGroupIDn + } + qTenantGroupIDn := qrTenantGroupIDn + if qTenantGroupIDn != "" { + + if err := r.SetQueryParam("tenant_group_id__n", qTenantGroupIDn); err != nil { + return err + } + } + } + + if o.TenantID != nil { + + // query param tenant_id + var qrTenantID string + + if o.TenantID != nil { + qrTenantID = *o.TenantID + } + qTenantID := qrTenantID + if qTenantID != "" { + + if err := r.SetQueryParam("tenant_id", qTenantID); err != nil { + return err + } + } + } + + if o.TenantIDn != nil { + + // query param tenant_id__n + var qrTenantIDn string + + if o.TenantIDn != nil { + qrTenantIDn = *o.TenantIDn + } + qTenantIDn := qrTenantIDn + if qTenantIDn != "" { + + if err := r.SetQueryParam("tenant_id__n", qTenantIDn); err != nil { + return err + } + } + } + + if o.Vrf != nil { + + // query param vrf + var qrVrf string + + if o.Vrf != nil { + qrVrf = *o.Vrf + } + qVrf := qrVrf + if qVrf != "" { + + if err := r.SetQueryParam("vrf", qVrf); err != nil { + return err + } + } + } + + if o.Vrfn != nil { + + // query param vrf__n + var qrVrfn string + + if o.Vrfn != nil { + qrVrfn = *o.Vrfn + } + qVrfn := qrVrfn + if qVrfn != "" { + + if err := r.SetQueryParam("vrf__n", qVrfn); err != nil { + return err + } + } + } + + if o.VrfID != nil { + + // query param vrf_id + var qrVrfID string + + if o.VrfID != nil { + qrVrfID = *o.VrfID + } + qVrfID := qrVrfID + if qVrfID != "" { + + if err := r.SetQueryParam("vrf_id", qVrfID); err != nil { + return err + } + } + } + + if o.VrfIDn != nil { + + // query param vrf_id__n + var qrVrfIDn string + + if o.VrfIDn != nil { + qrVrfIDn = *o.VrfIDn + } + qVrfIDn := qrVrfIDn + if qVrfIDn != "" { + + if err := r.SetQueryParam("vrf_id__n", qVrfIDn); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/secrets/secrets_secret_roles_list_responses.go b/netbox/client/ipam/ipam_ip_ranges_list_responses.go similarity index 53% rename from netbox/client/secrets/secrets_secret_roles_list_responses.go rename to netbox/client/ipam/ipam_ip_ranges_list_responses.go index 39fd19b47..da8222df0 100644 --- a/netbox/client/secrets/secrets_secret_roles_list_responses.go +++ b/netbox/client/ipam/ipam_ip_ranges_list_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package ipam // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -35,16 +35,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// SecretsSecretRolesListReader is a Reader for the SecretsSecretRolesList structure. -type SecretsSecretRolesListReader struct { +// IpamIPRangesListReader is a Reader for the IpamIPRangesList structure. +type IpamIPRangesListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretRolesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPRangesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewSecretsSecretRolesListOK() + result := NewIpamIPRangesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -54,29 +54,29 @@ func (o *SecretsSecretRolesListReader) ReadResponse(response runtime.ClientRespo } } -// NewSecretsSecretRolesListOK creates a SecretsSecretRolesListOK with default headers values -func NewSecretsSecretRolesListOK() *SecretsSecretRolesListOK { - return &SecretsSecretRolesListOK{} +// NewIpamIPRangesListOK creates a IpamIPRangesListOK with default headers values +func NewIpamIPRangesListOK() *IpamIPRangesListOK { + return &IpamIPRangesListOK{} } -/* SecretsSecretRolesListOK describes a response with status code 200, with default header values. +/* IpamIPRangesListOK describes a response with status code 200, with default header values. -SecretsSecretRolesListOK secrets secret roles list o k +IpamIPRangesListOK ipam Ip ranges list o k */ -type SecretsSecretRolesListOK struct { - Payload *SecretsSecretRolesListOKBody +type IpamIPRangesListOK struct { + Payload *IpamIPRangesListOKBody } -func (o *SecretsSecretRolesListOK) Error() string { - return fmt.Sprintf("[GET /secrets/secret-roles/][%d] secretsSecretRolesListOK %+v", 200, o.Payload) +func (o *IpamIPRangesListOK) Error() string { + return fmt.Sprintf("[GET /ipam/ip-ranges/][%d] ipamIpRangesListOK %+v", 200, o.Payload) } -func (o *SecretsSecretRolesListOK) GetPayload() *SecretsSecretRolesListOKBody { +func (o *IpamIPRangesListOK) GetPayload() *IpamIPRangesListOKBody { return o.Payload } -func (o *SecretsSecretRolesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPRangesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SecretsSecretRolesListOKBody) + o.Payload = new(IpamIPRangesListOKBody) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -86,10 +86,10 @@ func (o *SecretsSecretRolesListOK) readResponse(response runtime.ClientResponse, return nil } -/*SecretsSecretRolesListOKBody secrets secret roles list o k body -swagger:model SecretsSecretRolesListOKBody +/*IpamIPRangesListOKBody ipam IP ranges list o k body +swagger:model IpamIPRangesListOKBody */ -type SecretsSecretRolesListOKBody struct { +type IpamIPRangesListOKBody struct { // count // Required: true @@ -105,11 +105,11 @@ type SecretsSecretRolesListOKBody struct { // results // Required: true - Results []*models.SecretRole `json:"results"` + Results []*models.IPRange `json:"results"` } -// Validate validates this secrets secret roles list o k body -func (o *SecretsSecretRolesListOKBody) Validate(formats strfmt.Registry) error { +// Validate validates this ipam IP ranges list o k body +func (o *IpamIPRangesListOKBody) Validate(formats strfmt.Registry) error { var res []error if err := o.validateCount(formats); err != nil { @@ -134,42 +134,42 @@ func (o *SecretsSecretRolesListOKBody) Validate(formats strfmt.Registry) error { return nil } -func (o *SecretsSecretRolesListOKBody) validateCount(formats strfmt.Registry) error { +func (o *IpamIPRangesListOKBody) validateCount(formats strfmt.Registry) error { - if err := validate.Required("secretsSecretRolesListOK"+"."+"count", "body", o.Count); err != nil { + if err := validate.Required("ipamIpRangesListOK"+"."+"count", "body", o.Count); err != nil { return err } return nil } -func (o *SecretsSecretRolesListOKBody) validateNext(formats strfmt.Registry) error { +func (o *IpamIPRangesListOKBody) validateNext(formats strfmt.Registry) error { if swag.IsZero(o.Next) { // not required return nil } - if err := validate.FormatOf("secretsSecretRolesListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + if err := validate.FormatOf("ipamIpRangesListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { return err } return nil } -func (o *SecretsSecretRolesListOKBody) validatePrevious(formats strfmt.Registry) error { +func (o *IpamIPRangesListOKBody) validatePrevious(formats strfmt.Registry) error { if swag.IsZero(o.Previous) { // not required return nil } - if err := validate.FormatOf("secretsSecretRolesListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + if err := validate.FormatOf("ipamIpRangesListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { return err } return nil } -func (o *SecretsSecretRolesListOKBody) validateResults(formats strfmt.Registry) error { +func (o *IpamIPRangesListOKBody) validateResults(formats strfmt.Registry) error { - if err := validate.Required("secretsSecretRolesListOK"+"."+"results", "body", o.Results); err != nil { + if err := validate.Required("ipamIpRangesListOK"+"."+"results", "body", o.Results); err != nil { return err } @@ -181,7 +181,7 @@ func (o *SecretsSecretRolesListOKBody) validateResults(formats strfmt.Registry) if o.Results[i] != nil { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secretsSecretRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + return ve.ValidateName("ipamIpRangesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -192,8 +192,8 @@ func (o *SecretsSecretRolesListOKBody) validateResults(formats strfmt.Registry) return nil } -// ContextValidate validate this secrets secret roles list o k body based on the context it is used -func (o *SecretsSecretRolesListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this ipam IP ranges list o k body based on the context it is used +func (o *IpamIPRangesListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateResults(ctx, formats); err != nil { @@ -206,14 +206,14 @@ func (o *SecretsSecretRolesListOKBody) ContextValidate(ctx context.Context, form return nil } -func (o *SecretsSecretRolesListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { +func (o *IpamIPRangesListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(o.Results); i++ { if o.Results[i] != nil { if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secretsSecretRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + return ve.ValidateName("ipamIpRangesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -225,7 +225,7 @@ func (o *SecretsSecretRolesListOKBody) contextValidateResults(ctx context.Contex } // MarshalBinary interface implementation -func (o *SecretsSecretRolesListOKBody) MarshalBinary() ([]byte, error) { +func (o *IpamIPRangesListOKBody) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -233,8 +233,8 @@ func (o *SecretsSecretRolesListOKBody) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *SecretsSecretRolesListOKBody) UnmarshalBinary(b []byte) error { - var res SecretsSecretRolesListOKBody +func (o *IpamIPRangesListOKBody) UnmarshalBinary(b []byte) error { + var res IpamIPRangesListOKBody if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/netbox/client/ipam/ipam_ip_ranges_partial_update_parameters.go b/netbox/client/ipam/ipam_ip_ranges_partial_update_parameters.go new file mode 100644 index 000000000..bda2a52bb --- /dev/null +++ b/netbox/client/ipam/ipam_ip_ranges_partial_update_parameters.go @@ -0,0 +1,186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamIPRangesPartialUpdateParams creates a new IpamIPRangesPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamIPRangesPartialUpdateParams() *IpamIPRangesPartialUpdateParams { + return &IpamIPRangesPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamIPRangesPartialUpdateParamsWithTimeout creates a new IpamIPRangesPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamIPRangesPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamIPRangesPartialUpdateParams { + return &IpamIPRangesPartialUpdateParams{ + timeout: timeout, + } +} + +// NewIpamIPRangesPartialUpdateParamsWithContext creates a new IpamIPRangesPartialUpdateParams object +// with the ability to set a context for a request. +func NewIpamIPRangesPartialUpdateParamsWithContext(ctx context.Context) *IpamIPRangesPartialUpdateParams { + return &IpamIPRangesPartialUpdateParams{ + Context: ctx, + } +} + +// NewIpamIPRangesPartialUpdateParamsWithHTTPClient creates a new IpamIPRangesPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamIPRangesPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamIPRangesPartialUpdateParams { + return &IpamIPRangesPartialUpdateParams{ + HTTPClient: client, + } +} + +/* IpamIPRangesPartialUpdateParams contains all the parameters to send to the API endpoint + for the ipam ip ranges partial update operation. + + Typically these are written to a http.Request. +*/ +type IpamIPRangesPartialUpdateParams struct { + + // Data. + Data *models.WritableIPRange + + /* ID. + + A unique integer value identifying this IP range. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam ip ranges partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesPartialUpdateParams) WithDefaults() *IpamIPRangesPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam ip ranges partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam ip ranges partial update params +func (o *IpamIPRangesPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamIPRangesPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam ip ranges partial update params +func (o *IpamIPRangesPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam ip ranges partial update params +func (o *IpamIPRangesPartialUpdateParams) WithContext(ctx context.Context) *IpamIPRangesPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam ip ranges partial update params +func (o *IpamIPRangesPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam ip ranges partial update params +func (o *IpamIPRangesPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamIPRangesPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam ip ranges partial update params +func (o *IpamIPRangesPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam ip ranges partial update params +func (o *IpamIPRangesPartialUpdateParams) WithData(data *models.WritableIPRange) *IpamIPRangesPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam ip ranges partial update params +func (o *IpamIPRangesPartialUpdateParams) SetData(data *models.WritableIPRange) { + o.Data = data +} + +// WithID adds the id to the ipam ip ranges partial update params +func (o *IpamIPRangesPartialUpdateParams) WithID(id int64) *IpamIPRangesPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam ip ranges partial update params +func (o *IpamIPRangesPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamIPRangesPartialUpdateParams) 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/netbox/client/secrets/secrets_secrets_create_responses.go b/netbox/client/ipam/ipam_ip_ranges_partial_update_responses.go similarity index 59% rename from netbox/client/secrets/secrets_secrets_create_responses.go rename to netbox/client/ipam/ipam_ip_ranges_partial_update_responses.go index 5d8c2918b..deb964cc8 100644 --- a/netbox/client/secrets/secrets_secrets_create_responses.go +++ b/netbox/client/ipam/ipam_ip_ranges_partial_update_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package ipam // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// SecretsSecretsCreateReader is a Reader for the SecretsSecretsCreate structure. -type SecretsSecretsCreateReader struct { +// IpamIPRangesPartialUpdateReader is a Reader for the IpamIPRangesPartialUpdate structure. +type IpamIPRangesPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPRangesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: - result := NewSecretsSecretsCreateCreated() + case 200: + result := NewIpamIPRangesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,29 +49,29 @@ func (o *SecretsSecretsCreateReader) ReadResponse(response runtime.ClientRespons } } -// NewSecretsSecretsCreateCreated creates a SecretsSecretsCreateCreated with default headers values -func NewSecretsSecretsCreateCreated() *SecretsSecretsCreateCreated { - return &SecretsSecretsCreateCreated{} +// NewIpamIPRangesPartialUpdateOK creates a IpamIPRangesPartialUpdateOK with default headers values +func NewIpamIPRangesPartialUpdateOK() *IpamIPRangesPartialUpdateOK { + return &IpamIPRangesPartialUpdateOK{} } -/* SecretsSecretsCreateCreated describes a response with status code 201, with default header values. +/* IpamIPRangesPartialUpdateOK describes a response with status code 200, with default header values. -SecretsSecretsCreateCreated secrets secrets create created +IpamIPRangesPartialUpdateOK ipam Ip ranges partial update o k */ -type SecretsSecretsCreateCreated struct { - Payload *models.Secret +type IpamIPRangesPartialUpdateOK struct { + Payload *models.IPRange } -func (o *SecretsSecretsCreateCreated) Error() string { - return fmt.Sprintf("[POST /secrets/secrets/][%d] secretsSecretsCreateCreated %+v", 201, o.Payload) +func (o *IpamIPRangesPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /ipam/ip-ranges/{id}/][%d] ipamIpRangesPartialUpdateOK %+v", 200, o.Payload) } -func (o *SecretsSecretsCreateCreated) GetPayload() *models.Secret { +func (o *IpamIPRangesPartialUpdateOK) GetPayload() *models.IPRange { return o.Payload } -func (o *SecretsSecretsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPRangesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.Secret) + o.Payload = new(models.IPRange) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/netbox/client/ipam/ipam_ip_ranges_read_parameters.go b/netbox/client/ipam/ipam_ip_ranges_read_parameters.go new file mode 100644 index 000000000..0e329a8ff --- /dev/null +++ b/netbox/client/ipam/ipam_ip_ranges_read_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewIpamIPRangesReadParams creates a new IpamIPRangesReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamIPRangesReadParams() *IpamIPRangesReadParams { + return &IpamIPRangesReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamIPRangesReadParamsWithTimeout creates a new IpamIPRangesReadParams object +// with the ability to set a timeout on a request. +func NewIpamIPRangesReadParamsWithTimeout(timeout time.Duration) *IpamIPRangesReadParams { + return &IpamIPRangesReadParams{ + timeout: timeout, + } +} + +// NewIpamIPRangesReadParamsWithContext creates a new IpamIPRangesReadParams object +// with the ability to set a context for a request. +func NewIpamIPRangesReadParamsWithContext(ctx context.Context) *IpamIPRangesReadParams { + return &IpamIPRangesReadParams{ + Context: ctx, + } +} + +// NewIpamIPRangesReadParamsWithHTTPClient creates a new IpamIPRangesReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamIPRangesReadParamsWithHTTPClient(client *http.Client) *IpamIPRangesReadParams { + return &IpamIPRangesReadParams{ + HTTPClient: client, + } +} + +/* IpamIPRangesReadParams contains all the parameters to send to the API endpoint + for the ipam ip ranges read operation. + + Typically these are written to a http.Request. +*/ +type IpamIPRangesReadParams struct { + + /* ID. + + A unique integer value identifying this IP range. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam ip ranges read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesReadParams) WithDefaults() *IpamIPRangesReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam ip ranges read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam ip ranges read params +func (o *IpamIPRangesReadParams) WithTimeout(timeout time.Duration) *IpamIPRangesReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam ip ranges read params +func (o *IpamIPRangesReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam ip ranges read params +func (o *IpamIPRangesReadParams) WithContext(ctx context.Context) *IpamIPRangesReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam ip ranges read params +func (o *IpamIPRangesReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam ip ranges read params +func (o *IpamIPRangesReadParams) WithHTTPClient(client *http.Client) *IpamIPRangesReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam ip ranges read params +func (o *IpamIPRangesReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam ip ranges read params +func (o *IpamIPRangesReadParams) WithID(id int64) *IpamIPRangesReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam ip ranges read params +func (o *IpamIPRangesReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamIPRangesReadParams) 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/netbox/client/secrets/secrets_secrets_update_responses.go b/netbox/client/ipam/ipam_ip_ranges_read_responses.go similarity index 58% rename from netbox/client/secrets/secrets_secrets_update_responses.go rename to netbox/client/ipam/ipam_ip_ranges_read_responses.go index 2a9cdf6a8..bf2b85ada 100644 --- a/netbox/client/secrets/secrets_secrets_update_responses.go +++ b/netbox/client/ipam/ipam_ip_ranges_read_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package ipam // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// SecretsSecretsUpdateReader is a Reader for the SecretsSecretsUpdate structure. -type SecretsSecretsUpdateReader struct { +// IpamIPRangesReadReader is a Reader for the IpamIPRangesRead structure. +type IpamIPRangesReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPRangesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewSecretsSecretsUpdateOK() + result := NewIpamIPRangesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,29 +49,29 @@ func (o *SecretsSecretsUpdateReader) ReadResponse(response runtime.ClientRespons } } -// NewSecretsSecretsUpdateOK creates a SecretsSecretsUpdateOK with default headers values -func NewSecretsSecretsUpdateOK() *SecretsSecretsUpdateOK { - return &SecretsSecretsUpdateOK{} +// NewIpamIPRangesReadOK creates a IpamIPRangesReadOK with default headers values +func NewIpamIPRangesReadOK() *IpamIPRangesReadOK { + return &IpamIPRangesReadOK{} } -/* SecretsSecretsUpdateOK describes a response with status code 200, with default header values. +/* IpamIPRangesReadOK describes a response with status code 200, with default header values. -SecretsSecretsUpdateOK secrets secrets update o k +IpamIPRangesReadOK ipam Ip ranges read o k */ -type SecretsSecretsUpdateOK struct { - Payload *models.Secret +type IpamIPRangesReadOK struct { + Payload *models.IPRange } -func (o *SecretsSecretsUpdateOK) Error() string { - return fmt.Sprintf("[PUT /secrets/secrets/{id}/][%d] secretsSecretsUpdateOK %+v", 200, o.Payload) +func (o *IpamIPRangesReadOK) Error() string { + return fmt.Sprintf("[GET /ipam/ip-ranges/{id}/][%d] ipamIpRangesReadOK %+v", 200, o.Payload) } -func (o *SecretsSecretsUpdateOK) GetPayload() *models.Secret { +func (o *IpamIPRangesReadOK) GetPayload() *models.IPRange { return o.Payload } -func (o *SecretsSecretsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPRangesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.Secret) + o.Payload = new(models.IPRange) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/netbox/client/ipam/ipam_ip_ranges_update_parameters.go b/netbox/client/ipam/ipam_ip_ranges_update_parameters.go new file mode 100644 index 000000000..1c7bf9441 --- /dev/null +++ b/netbox/client/ipam/ipam_ip_ranges_update_parameters.go @@ -0,0 +1,186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamIPRangesUpdateParams creates a new IpamIPRangesUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamIPRangesUpdateParams() *IpamIPRangesUpdateParams { + return &IpamIPRangesUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamIPRangesUpdateParamsWithTimeout creates a new IpamIPRangesUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamIPRangesUpdateParamsWithTimeout(timeout time.Duration) *IpamIPRangesUpdateParams { + return &IpamIPRangesUpdateParams{ + timeout: timeout, + } +} + +// NewIpamIPRangesUpdateParamsWithContext creates a new IpamIPRangesUpdateParams object +// with the ability to set a context for a request. +func NewIpamIPRangesUpdateParamsWithContext(ctx context.Context) *IpamIPRangesUpdateParams { + return &IpamIPRangesUpdateParams{ + Context: ctx, + } +} + +// NewIpamIPRangesUpdateParamsWithHTTPClient creates a new IpamIPRangesUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamIPRangesUpdateParamsWithHTTPClient(client *http.Client) *IpamIPRangesUpdateParams { + return &IpamIPRangesUpdateParams{ + HTTPClient: client, + } +} + +/* IpamIPRangesUpdateParams contains all the parameters to send to the API endpoint + for the ipam ip ranges update operation. + + Typically these are written to a http.Request. +*/ +type IpamIPRangesUpdateParams struct { + + // Data. + Data *models.WritableIPRange + + /* ID. + + A unique integer value identifying this IP range. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam ip ranges update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesUpdateParams) WithDefaults() *IpamIPRangesUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam ip ranges update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamIPRangesUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam ip ranges update params +func (o *IpamIPRangesUpdateParams) WithTimeout(timeout time.Duration) *IpamIPRangesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam ip ranges update params +func (o *IpamIPRangesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam ip ranges update params +func (o *IpamIPRangesUpdateParams) WithContext(ctx context.Context) *IpamIPRangesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam ip ranges update params +func (o *IpamIPRangesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam ip ranges update params +func (o *IpamIPRangesUpdateParams) WithHTTPClient(client *http.Client) *IpamIPRangesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam ip ranges update params +func (o *IpamIPRangesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam ip ranges update params +func (o *IpamIPRangesUpdateParams) WithData(data *models.WritableIPRange) *IpamIPRangesUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam ip ranges update params +func (o *IpamIPRangesUpdateParams) SetData(data *models.WritableIPRange) { + o.Data = data +} + +// WithID adds the id to the ipam ip ranges update params +func (o *IpamIPRangesUpdateParams) WithID(id int64) *IpamIPRangesUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam ip ranges update params +func (o *IpamIPRangesUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamIPRangesUpdateParams) 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/netbox/client/secrets/secrets_secrets_read_responses.go b/netbox/client/ipam/ipam_ip_ranges_update_responses.go similarity index 66% rename from netbox/client/secrets/secrets_secrets_read_responses.go rename to netbox/client/ipam/ipam_ip_ranges_update_responses.go index 2588a2f2c..cc769866f 100644 --- a/netbox/client/secrets/secrets_secrets_read_responses.go +++ b/netbox/client/ipam/ipam_ip_ranges_update_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package ipam // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// SecretsSecretsReadReader is a Reader for the SecretsSecretsRead structure. -type SecretsSecretsReadReader struct { +// IpamIPRangesUpdateReader is a Reader for the IpamIPRangesUpdate structure. +type IpamIPRangesUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPRangesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewSecretsSecretsReadOK() + result := NewIpamIPRangesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,29 +49,29 @@ func (o *SecretsSecretsReadReader) ReadResponse(response runtime.ClientResponse, } } -// NewSecretsSecretsReadOK creates a SecretsSecretsReadOK with default headers values -func NewSecretsSecretsReadOK() *SecretsSecretsReadOK { - return &SecretsSecretsReadOK{} +// NewIpamIPRangesUpdateOK creates a IpamIPRangesUpdateOK with default headers values +func NewIpamIPRangesUpdateOK() *IpamIPRangesUpdateOK { + return &IpamIPRangesUpdateOK{} } -/* SecretsSecretsReadOK describes a response with status code 200, with default header values. +/* IpamIPRangesUpdateOK describes a response with status code 200, with default header values. -SecretsSecretsReadOK secrets secrets read o k +IpamIPRangesUpdateOK ipam Ip ranges update o k */ -type SecretsSecretsReadOK struct { - Payload *models.Secret +type IpamIPRangesUpdateOK struct { + Payload *models.IPRange } -func (o *SecretsSecretsReadOK) Error() string { - return fmt.Sprintf("[GET /secrets/secrets/{id}/][%d] secretsSecretsReadOK %+v", 200, o.Payload) +func (o *IpamIPRangesUpdateOK) Error() string { + return fmt.Sprintf("[PUT /ipam/ip-ranges/{id}/][%d] ipamIpRangesUpdateOK %+v", 200, o.Payload) } -func (o *SecretsSecretsReadOK) GetPayload() *models.Secret { +func (o *IpamIPRangesUpdateOK) GetPayload() *models.IPRange { return o.Payload } -func (o *SecretsSecretsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPRangesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.Secret) + o.Payload = new(models.IPRange) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/netbox/client/ipam/ipam_prefixes_list_parameters.go b/netbox/client/ipam/ipam_prefixes_list_parameters.go index 3973cabe8..312ccdbe3 100644 --- a/netbox/client/ipam/ipam_prefixes_list_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_list_parameters.go @@ -162,8 +162,11 @@ type IpamPrefixesListParams struct { */ Limit *int64 + // MarkUtilized. + MarkUtilized *string + // MaskLength. - MaskLength *float64 + MaskLength *string // MaskLengthGte. MaskLengthGte *float64 @@ -661,14 +664,25 @@ func (o *IpamPrefixesListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithMarkUtilized adds the markUtilized to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithMarkUtilized(markUtilized *string) *IpamPrefixesListParams { + o.SetMarkUtilized(markUtilized) + return o +} + +// SetMarkUtilized adds the markUtilized to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetMarkUtilized(markUtilized *string) { + o.MarkUtilized = markUtilized +} + // WithMaskLength adds the maskLength to the ipam prefixes list params -func (o *IpamPrefixesListParams) WithMaskLength(maskLength *float64) *IpamPrefixesListParams { +func (o *IpamPrefixesListParams) WithMaskLength(maskLength *string) *IpamPrefixesListParams { o.SetMaskLength(maskLength) return o } // SetMaskLength adds the maskLength to the ipam prefixes list params -func (o *IpamPrefixesListParams) SetMaskLength(maskLength *float64) { +func (o *IpamPrefixesListParams) SetMaskLength(maskLength *string) { o.MaskLength = maskLength } @@ -1640,15 +1654,32 @@ func (o *IpamPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.MarkUtilized != nil { + + // query param mark_utilized + var qrMarkUtilized string + + if o.MarkUtilized != nil { + qrMarkUtilized = *o.MarkUtilized + } + qMarkUtilized := qrMarkUtilized + if qMarkUtilized != "" { + + if err := r.SetQueryParam("mark_utilized", qMarkUtilized); err != nil { + return err + } + } + } + if o.MaskLength != nil { // query param mask_length - var qrMaskLength float64 + var qrMaskLength string if o.MaskLength != nil { qrMaskLength = *o.MaskLength } - qMaskLength := swag.FormatFloat64(qrMaskLength) + qMaskLength := qrMaskLength if qMaskLength != "" { if err := r.SetQueryParam("mask_length", qMaskLength); err != nil { diff --git a/netbox/client/net_box_api_client.go b/netbox/client/net_box_api_client.go index 8f7c39d1e..65a9ac3a0 100644 --- a/netbox/client/net_box_api_client.go +++ b/netbox/client/net_box_api_client.go @@ -29,8 +29,6 @@ import ( "github.com/netbox-community/go-netbox/netbox/client/dcim" "github.com/netbox-community/go-netbox/netbox/client/extras" "github.com/netbox-community/go-netbox/netbox/client/ipam" - "github.com/netbox-community/go-netbox/netbox/client/plugins" - "github.com/netbox-community/go-netbox/netbox/client/secrets" "github.com/netbox-community/go-netbox/netbox/client/status" "github.com/netbox-community/go-netbox/netbox/client/tenancy" "github.com/netbox-community/go-netbox/netbox/client/users" @@ -43,7 +41,7 @@ var Default = NewHTTPClient(nil) const ( // DefaultHost is the default Host // found in Meta (info) section of spec file - DefaultHost string = "localhost" + DefaultHost string = "localhost:8099" // DefaultBasePath is the default BasePath // found in Meta (info) section of spec file DefaultBasePath string = "/api" @@ -83,8 +81,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *NetBoxAPI cli.Dcim = dcim.New(transport, formats) cli.Extras = extras.New(transport, formats) cli.Ipam = ipam.New(transport, formats) - cli.Plugins = plugins.New(transport, formats) - cli.Secrets = secrets.New(transport, formats) cli.Status = status.New(transport, formats) cli.Tenancy = tenancy.New(transport, formats) cli.Users = users.New(transport, formats) @@ -141,10 +137,6 @@ type NetBoxAPI struct { Ipam ipam.ClientService - Plugins plugins.ClientService - - Secrets secrets.ClientService - Status status.ClientService Tenancy tenancy.ClientService @@ -163,8 +155,6 @@ func (c *NetBoxAPI) SetTransport(transport runtime.ClientTransport) { c.Dcim.SetTransport(transport) c.Extras.SetTransport(transport) c.Ipam.SetTransport(transport) - c.Plugins.SetTransport(transport) - c.Secrets.SetTransport(transport) c.Status.SetTransport(transport) c.Tenancy.SetTransport(transport) c.Users.SetTransport(transport) diff --git a/netbox/client/plugins/plugins_client.go b/netbox/client/plugins/plugins_client.go index b845e815d..b8006db01 100644 --- a/netbox/client/plugins/plugins_client.go +++ b/netbox/client/plugins/plugins_client.go @@ -45,28 +45,233 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - PluginsIPReservationsRelatedIPV6Read(params *PluginsIPReservationsRelatedIPV6ReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsIPReservationsRelatedIPV6ReadOK, error) + PluginsNextboxUISavedtopologiesCreate(params *PluginsNextboxUISavedtopologiesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesCreateCreated, error) + + PluginsNextboxUISavedtopologiesDelete(params *PluginsNextboxUISavedtopologiesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesDeleteNoContent, error) + + PluginsNextboxUISavedtopologiesList(params *PluginsNextboxUISavedtopologiesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesListOK, error) + + PluginsNextboxUISavedtopologiesPartialUpdate(params *PluginsNextboxUISavedtopologiesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesPartialUpdateOK, error) + + PluginsNextboxUISavedtopologiesRead(params *PluginsNextboxUISavedtopologiesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesReadOK, error) + + PluginsNextboxUISavedtopologiesUpdate(params *PluginsNextboxUISavedtopologiesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesUpdateOK, error) SetTransport(transport runtime.ClientTransport) } /* - PluginsIPReservationsRelatedIPV6Read plugins ip reservations related ipv6 read API + PluginsNextboxUISavedtopologiesCreate plugins nextbox ui savedtopologies create API +*/ +func (a *Client) PluginsNextboxUISavedtopologiesCreate(params *PluginsNextboxUISavedtopologiesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPluginsNextboxUISavedtopologiesCreateParams() + } + op := &runtime.ClientOperation{ + ID: "plugins_nextbox-ui_savedtopologies_create", + Method: "POST", + PathPattern: "/plugins/nextbox-ui/savedtopologies/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &PluginsNextboxUISavedtopologiesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PluginsNextboxUISavedtopologiesCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for plugins_nextbox-ui_savedtopologies_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PluginsNextboxUISavedtopologiesDelete plugins nextbox ui savedtopologies delete API +*/ +func (a *Client) PluginsNextboxUISavedtopologiesDelete(params *PluginsNextboxUISavedtopologiesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPluginsNextboxUISavedtopologiesDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "plugins_nextbox-ui_savedtopologies_delete", + Method: "DELETE", + PathPattern: "/plugins/nextbox-ui/savedtopologies/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &PluginsNextboxUISavedtopologiesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PluginsNextboxUISavedtopologiesDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for plugins_nextbox-ui_savedtopologies_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PluginsNextboxUISavedtopologiesList plugins nextbox ui savedtopologies list API */ -func (a *Client) PluginsIPReservationsRelatedIPV6Read(params *PluginsIPReservationsRelatedIPV6ReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsIPReservationsRelatedIPV6ReadOK, error) { +func (a *Client) PluginsNextboxUISavedtopologiesList(params *PluginsNextboxUISavedtopologiesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesListOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewPluginsIPReservationsRelatedIPV6ReadParams() + params = NewPluginsNextboxUISavedtopologiesListParams() } op := &runtime.ClientOperation{ - ID: "plugins_ip-reservations_related-ipv6_read", + ID: "plugins_nextbox-ui_savedtopologies_list", Method: "GET", - PathPattern: "/plugins/ip-reservations/related-ipv6/{id}/", + PathPattern: "/plugins/nextbox-ui/savedtopologies/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &PluginsNextboxUISavedtopologiesListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PluginsNextboxUISavedtopologiesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for plugins_nextbox-ui_savedtopologies_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PluginsNextboxUISavedtopologiesPartialUpdate plugins nextbox ui savedtopologies partial update API +*/ +func (a *Client) PluginsNextboxUISavedtopologiesPartialUpdate(params *PluginsNextboxUISavedtopologiesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPluginsNextboxUISavedtopologiesPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "plugins_nextbox-ui_savedtopologies_partial_update", + Method: "PATCH", + PathPattern: "/plugins/nextbox-ui/savedtopologies/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &PluginsNextboxUISavedtopologiesPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PluginsNextboxUISavedtopologiesPartialUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for plugins_nextbox-ui_savedtopologies_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PluginsNextboxUISavedtopologiesRead plugins nextbox ui savedtopologies read API +*/ +func (a *Client) PluginsNextboxUISavedtopologiesRead(params *PluginsNextboxUISavedtopologiesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPluginsNextboxUISavedtopologiesReadParams() + } + op := &runtime.ClientOperation{ + ID: "plugins_nextbox-ui_savedtopologies_read", + Method: "GET", + PathPattern: "/plugins/nextbox-ui/savedtopologies/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &PluginsNextboxUISavedtopologiesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PluginsNextboxUISavedtopologiesReadOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for plugins_nextbox-ui_savedtopologies_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PluginsNextboxUISavedtopologiesUpdate plugins nextbox ui savedtopologies update API +*/ +func (a *Client) PluginsNextboxUISavedtopologiesUpdate(params *PluginsNextboxUISavedtopologiesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPluginsNextboxUISavedtopologiesUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "plugins_nextbox-ui_savedtopologies_update", + Method: "PUT", + PathPattern: "/plugins/nextbox-ui/savedtopologies/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &PluginsIPReservationsRelatedIPV6ReadReader{formats: a.formats}, + Reader: &PluginsNextboxUISavedtopologiesUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -79,13 +284,13 @@ func (a *Client) PluginsIPReservationsRelatedIPV6Read(params *PluginsIPReservati if err != nil { return nil, err } - success, ok := result.(*PluginsIPReservationsRelatedIPV6ReadOK) + success, ok := result.(*PluginsNextboxUISavedtopologiesUpdateOK) if ok { return success, nil } // unexpected success response // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for plugins_ip-reservations_related-ipv6_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for plugins_nextbox-ui_savedtopologies_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/netbox/client/plugins/plugins_ip_reservations_related_ip_v6_read_parameters.go b/netbox/client/plugins/plugins_ip_reservations_related_ip_v6_read_parameters.go deleted file mode 100644 index 44879d16e..000000000 --- a/netbox/client/plugins/plugins_ip_reservations_related_ip_v6_read_parameters.go +++ /dev/null @@ -1,161 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package plugins - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewPluginsIPReservationsRelatedIPV6ReadParams creates a new PluginsIPReservationsRelatedIPV6ReadParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPluginsIPReservationsRelatedIPV6ReadParams() *PluginsIPReservationsRelatedIPV6ReadParams { - return &PluginsIPReservationsRelatedIPV6ReadParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPluginsIPReservationsRelatedIPV6ReadParamsWithTimeout creates a new PluginsIPReservationsRelatedIPV6ReadParams object -// with the ability to set a timeout on a request. -func NewPluginsIPReservationsRelatedIPV6ReadParamsWithTimeout(timeout time.Duration) *PluginsIPReservationsRelatedIPV6ReadParams { - return &PluginsIPReservationsRelatedIPV6ReadParams{ - timeout: timeout, - } -} - -// NewPluginsIPReservationsRelatedIPV6ReadParamsWithContext creates a new PluginsIPReservationsRelatedIPV6ReadParams object -// with the ability to set a context for a request. -func NewPluginsIPReservationsRelatedIPV6ReadParamsWithContext(ctx context.Context) *PluginsIPReservationsRelatedIPV6ReadParams { - return &PluginsIPReservationsRelatedIPV6ReadParams{ - Context: ctx, - } -} - -// NewPluginsIPReservationsRelatedIPV6ReadParamsWithHTTPClient creates a new PluginsIPReservationsRelatedIPV6ReadParams object -// with the ability to set a custom HTTPClient for a request. -func NewPluginsIPReservationsRelatedIPV6ReadParamsWithHTTPClient(client *http.Client) *PluginsIPReservationsRelatedIPV6ReadParams { - return &PluginsIPReservationsRelatedIPV6ReadParams{ - HTTPClient: client, - } -} - -/* PluginsIPReservationsRelatedIPV6ReadParams contains all the parameters to send to the API endpoint - for the plugins ip reservations related ipv6 read operation. - - Typically these are written to a http.Request. -*/ -type PluginsIPReservationsRelatedIPV6ReadParams struct { - - // ID. - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the plugins ip reservations related ipv6 read params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PluginsIPReservationsRelatedIPV6ReadParams) WithDefaults() *PluginsIPReservationsRelatedIPV6ReadParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the plugins ip reservations related ipv6 read params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PluginsIPReservationsRelatedIPV6ReadParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the plugins ip reservations related ipv6 read params -func (o *PluginsIPReservationsRelatedIPV6ReadParams) WithTimeout(timeout time.Duration) *PluginsIPReservationsRelatedIPV6ReadParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the plugins ip reservations related ipv6 read params -func (o *PluginsIPReservationsRelatedIPV6ReadParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the plugins ip reservations related ipv6 read params -func (o *PluginsIPReservationsRelatedIPV6ReadParams) WithContext(ctx context.Context) *PluginsIPReservationsRelatedIPV6ReadParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the plugins ip reservations related ipv6 read params -func (o *PluginsIPReservationsRelatedIPV6ReadParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the plugins ip reservations related ipv6 read params -func (o *PluginsIPReservationsRelatedIPV6ReadParams) WithHTTPClient(client *http.Client) *PluginsIPReservationsRelatedIPV6ReadParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the plugins ip reservations related ipv6 read params -func (o *PluginsIPReservationsRelatedIPV6ReadParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the plugins ip reservations related ipv6 read params -func (o *PluginsIPReservationsRelatedIPV6ReadParams) WithID(id string) *PluginsIPReservationsRelatedIPV6ReadParams { - o.SetID(id) - return o -} - -// SetID adds the id to the plugins ip reservations related ipv6 read params -func (o *PluginsIPReservationsRelatedIPV6ReadParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PluginsIPReservationsRelatedIPV6ReadParams) 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/netbox/client/plugins/plugins_ip_reservations_related_ip_v6_read_responses.go b/netbox/client/plugins/plugins_ip_reservations_related_ip_v6_read_responses.go deleted file mode 100644 index 2154d32fd..000000000 --- a/netbox/client/plugins/plugins_ip_reservations_related_ip_v6_read_responses.go +++ /dev/null @@ -1,68 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package plugins - -// 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" - "github.com/go-openapi/strfmt" -) - -// PluginsIPReservationsRelatedIPV6ReadReader is a Reader for the PluginsIPReservationsRelatedIPV6Read structure. -type PluginsIPReservationsRelatedIPV6ReadReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PluginsIPReservationsRelatedIPV6ReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPluginsIPReservationsRelatedIPV6ReadOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPluginsIPReservationsRelatedIPV6ReadOK creates a PluginsIPReservationsRelatedIPV6ReadOK with default headers values -func NewPluginsIPReservationsRelatedIPV6ReadOK() *PluginsIPReservationsRelatedIPV6ReadOK { - return &PluginsIPReservationsRelatedIPV6ReadOK{} -} - -/* PluginsIPReservationsRelatedIPV6ReadOK describes a response with status code 200, with default header values. - -PluginsIPReservationsRelatedIPV6ReadOK plugins Ip reservations related Ipv6 read o k -*/ -type PluginsIPReservationsRelatedIPV6ReadOK struct { -} - -func (o *PluginsIPReservationsRelatedIPV6ReadOK) Error() string { - return fmt.Sprintf("[GET /plugins/ip-reservations/related-ipv6/{id}/][%d] pluginsIpReservationsRelatedIpv6ReadOK ", 200) -} - -func (o *PluginsIPReservationsRelatedIPV6ReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_create_parameters.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_create_parameters.go new file mode 100644 index 000000000..4a37ea464 --- /dev/null +++ b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_create_parameters.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package plugins + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewPluginsNextboxUISavedtopologiesCreateParams creates a new PluginsNextboxUISavedtopologiesCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPluginsNextboxUISavedtopologiesCreateParams() *PluginsNextboxUISavedtopologiesCreateParams { + return &PluginsNextboxUISavedtopologiesCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPluginsNextboxUISavedtopologiesCreateParamsWithTimeout creates a new PluginsNextboxUISavedtopologiesCreateParams object +// with the ability to set a timeout on a request. +func NewPluginsNextboxUISavedtopologiesCreateParamsWithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesCreateParams { + return &PluginsNextboxUISavedtopologiesCreateParams{ + timeout: timeout, + } +} + +// NewPluginsNextboxUISavedtopologiesCreateParamsWithContext creates a new PluginsNextboxUISavedtopologiesCreateParams object +// with the ability to set a context for a request. +func NewPluginsNextboxUISavedtopologiesCreateParamsWithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesCreateParams { + return &PluginsNextboxUISavedtopologiesCreateParams{ + Context: ctx, + } +} + +// NewPluginsNextboxUISavedtopologiesCreateParamsWithHTTPClient creates a new PluginsNextboxUISavedtopologiesCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewPluginsNextboxUISavedtopologiesCreateParamsWithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesCreateParams { + return &PluginsNextboxUISavedtopologiesCreateParams{ + HTTPClient: client, + } +} + +/* PluginsNextboxUISavedtopologiesCreateParams contains all the parameters to send to the API endpoint + for the plugins nextbox ui savedtopologies create operation. + + Typically these are written to a http.Request. +*/ +type PluginsNextboxUISavedtopologiesCreateParams struct { + + // Data. + Data *models.SavedTopology + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the plugins nextbox ui savedtopologies create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PluginsNextboxUISavedtopologiesCreateParams) WithDefaults() *PluginsNextboxUISavedtopologiesCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the plugins nextbox ui savedtopologies create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PluginsNextboxUISavedtopologiesCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the plugins nextbox ui savedtopologies create params +func (o *PluginsNextboxUISavedtopologiesCreateParams) WithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the plugins nextbox ui savedtopologies create params +func (o *PluginsNextboxUISavedtopologiesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the plugins nextbox ui savedtopologies create params +func (o *PluginsNextboxUISavedtopologiesCreateParams) WithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the plugins nextbox ui savedtopologies create params +func (o *PluginsNextboxUISavedtopologiesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies create params +func (o *PluginsNextboxUISavedtopologiesCreateParams) WithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies create params +func (o *PluginsNextboxUISavedtopologiesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the plugins nextbox ui savedtopologies create params +func (o *PluginsNextboxUISavedtopologiesCreateParams) WithData(data *models.SavedTopology) *PluginsNextboxUISavedtopologiesCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the plugins nextbox ui savedtopologies create params +func (o *PluginsNextboxUISavedtopologiesCreateParams) SetData(data *models.SavedTopology) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *PluginsNextboxUISavedtopologiesCreateParams) 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/netbox/client/secrets/secrets_secret_roles_partial_update_responses.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_create_responses.go similarity index 50% rename from netbox/client/secrets/secrets_secret_roles_partial_update_responses.go rename to netbox/client/plugins/plugins_nextbox_ui_savedtopologies_create_responses.go index d7ee9f394..c2e754123 100644 --- a/netbox/client/secrets/secrets_secret_roles_partial_update_responses.go +++ b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_create_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package plugins // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// SecretsSecretRolesPartialUpdateReader is a Reader for the SecretsSecretRolesPartialUpdate structure. -type SecretsSecretRolesPartialUpdateReader struct { +// PluginsNextboxUISavedtopologiesCreateReader is a Reader for the PluginsNextboxUISavedtopologiesCreate structure. +type PluginsNextboxUISavedtopologiesCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretRolesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PluginsNextboxUISavedtopologiesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewSecretsSecretRolesPartialUpdateOK() + case 201: + result := NewPluginsNextboxUISavedtopologiesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,29 +49,29 @@ func (o *SecretsSecretRolesPartialUpdateReader) ReadResponse(response runtime.Cl } } -// NewSecretsSecretRolesPartialUpdateOK creates a SecretsSecretRolesPartialUpdateOK with default headers values -func NewSecretsSecretRolesPartialUpdateOK() *SecretsSecretRolesPartialUpdateOK { - return &SecretsSecretRolesPartialUpdateOK{} +// NewPluginsNextboxUISavedtopologiesCreateCreated creates a PluginsNextboxUISavedtopologiesCreateCreated with default headers values +func NewPluginsNextboxUISavedtopologiesCreateCreated() *PluginsNextboxUISavedtopologiesCreateCreated { + return &PluginsNextboxUISavedtopologiesCreateCreated{} } -/* SecretsSecretRolesPartialUpdateOK describes a response with status code 200, with default header values. +/* PluginsNextboxUISavedtopologiesCreateCreated describes a response with status code 201, with default header values. -SecretsSecretRolesPartialUpdateOK secrets secret roles partial update o k +PluginsNextboxUISavedtopologiesCreateCreated plugins nextbox Ui savedtopologies create created */ -type SecretsSecretRolesPartialUpdateOK struct { - Payload *models.SecretRole +type PluginsNextboxUISavedtopologiesCreateCreated struct { + Payload *models.SavedTopology } -func (o *SecretsSecretRolesPartialUpdateOK) Error() string { - return fmt.Sprintf("[PATCH /secrets/secret-roles/{id}/][%d] secretsSecretRolesPartialUpdateOK %+v", 200, o.Payload) +func (o *PluginsNextboxUISavedtopologiesCreateCreated) Error() string { + return fmt.Sprintf("[POST /plugins/nextbox-ui/savedtopologies/][%d] pluginsNextboxUiSavedtopologiesCreateCreated %+v", 201, o.Payload) } -func (o *SecretsSecretRolesPartialUpdateOK) GetPayload() *models.SecretRole { +func (o *PluginsNextboxUISavedtopologiesCreateCreated) GetPayload() *models.SavedTopology { return o.Payload } -func (o *SecretsSecretRolesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *PluginsNextboxUISavedtopologiesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.SecretRole) + o.Payload = new(models.SavedTopology) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_delete_parameters.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_delete_parameters.go new file mode 100644 index 000000000..39cee696b --- /dev/null +++ b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_delete_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package plugins + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewPluginsNextboxUISavedtopologiesDeleteParams creates a new PluginsNextboxUISavedtopologiesDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPluginsNextboxUISavedtopologiesDeleteParams() *PluginsNextboxUISavedtopologiesDeleteParams { + return &PluginsNextboxUISavedtopologiesDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPluginsNextboxUISavedtopologiesDeleteParamsWithTimeout creates a new PluginsNextboxUISavedtopologiesDeleteParams object +// with the ability to set a timeout on a request. +func NewPluginsNextboxUISavedtopologiesDeleteParamsWithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesDeleteParams { + return &PluginsNextboxUISavedtopologiesDeleteParams{ + timeout: timeout, + } +} + +// NewPluginsNextboxUISavedtopologiesDeleteParamsWithContext creates a new PluginsNextboxUISavedtopologiesDeleteParams object +// with the ability to set a context for a request. +func NewPluginsNextboxUISavedtopologiesDeleteParamsWithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesDeleteParams { + return &PluginsNextboxUISavedtopologiesDeleteParams{ + Context: ctx, + } +} + +// NewPluginsNextboxUISavedtopologiesDeleteParamsWithHTTPClient creates a new PluginsNextboxUISavedtopologiesDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewPluginsNextboxUISavedtopologiesDeleteParamsWithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesDeleteParams { + return &PluginsNextboxUISavedtopologiesDeleteParams{ + HTTPClient: client, + } +} + +/* PluginsNextboxUISavedtopologiesDeleteParams contains all the parameters to send to the API endpoint + for the plugins nextbox ui savedtopologies delete operation. + + Typically these are written to a http.Request. +*/ +type PluginsNextboxUISavedtopologiesDeleteParams struct { + + /* ID. + + A unique integer value identifying this saved topology. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the plugins nextbox ui savedtopologies delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PluginsNextboxUISavedtopologiesDeleteParams) WithDefaults() *PluginsNextboxUISavedtopologiesDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the plugins nextbox ui savedtopologies delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PluginsNextboxUISavedtopologiesDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the plugins nextbox ui savedtopologies delete params +func (o *PluginsNextboxUISavedtopologiesDeleteParams) WithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the plugins nextbox ui savedtopologies delete params +func (o *PluginsNextboxUISavedtopologiesDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the plugins nextbox ui savedtopologies delete params +func (o *PluginsNextboxUISavedtopologiesDeleteParams) WithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the plugins nextbox ui savedtopologies delete params +func (o *PluginsNextboxUISavedtopologiesDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies delete params +func (o *PluginsNextboxUISavedtopologiesDeleteParams) WithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies delete params +func (o *PluginsNextboxUISavedtopologiesDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the plugins nextbox ui savedtopologies delete params +func (o *PluginsNextboxUISavedtopologiesDeleteParams) WithID(id int64) *PluginsNextboxUISavedtopologiesDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the plugins nextbox ui savedtopologies delete params +func (o *PluginsNextboxUISavedtopologiesDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *PluginsNextboxUISavedtopologiesDeleteParams) 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/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_delete_responses.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_delete_responses.go new file mode 100644 index 000000000..89aff9163 --- /dev/null +++ b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_delete_responses.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package plugins + +// 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" + "github.com/go-openapi/strfmt" +) + +// PluginsNextboxUISavedtopologiesDeleteReader is a Reader for the PluginsNextboxUISavedtopologiesDelete structure. +type PluginsNextboxUISavedtopologiesDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PluginsNextboxUISavedtopologiesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewPluginsNextboxUISavedtopologiesDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPluginsNextboxUISavedtopologiesDeleteNoContent creates a PluginsNextboxUISavedtopologiesDeleteNoContent with default headers values +func NewPluginsNextboxUISavedtopologiesDeleteNoContent() *PluginsNextboxUISavedtopologiesDeleteNoContent { + return &PluginsNextboxUISavedtopologiesDeleteNoContent{} +} + +/* PluginsNextboxUISavedtopologiesDeleteNoContent describes a response with status code 204, with default header values. + +PluginsNextboxUISavedtopologiesDeleteNoContent plugins nextbox Ui savedtopologies delete no content +*/ +type PluginsNextboxUISavedtopologiesDeleteNoContent struct { +} + +func (o *PluginsNextboxUISavedtopologiesDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /plugins/nextbox-ui/savedtopologies/{id}/][%d] pluginsNextboxUiSavedtopologiesDeleteNoContent ", 204) +} + +func (o *PluginsNextboxUISavedtopologiesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_list_parameters.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_list_parameters.go new file mode 100644 index 000000000..18a6e4f3d --- /dev/null +++ b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_list_parameters.go @@ -0,0 +1,211 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package plugins + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewPluginsNextboxUISavedtopologiesListParams creates a new PluginsNextboxUISavedtopologiesListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPluginsNextboxUISavedtopologiesListParams() *PluginsNextboxUISavedtopologiesListParams { + return &PluginsNextboxUISavedtopologiesListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPluginsNextboxUISavedtopologiesListParamsWithTimeout creates a new PluginsNextboxUISavedtopologiesListParams object +// with the ability to set a timeout on a request. +func NewPluginsNextboxUISavedtopologiesListParamsWithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesListParams { + return &PluginsNextboxUISavedtopologiesListParams{ + timeout: timeout, + } +} + +// NewPluginsNextboxUISavedtopologiesListParamsWithContext creates a new PluginsNextboxUISavedtopologiesListParams object +// with the ability to set a context for a request. +func NewPluginsNextboxUISavedtopologiesListParamsWithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesListParams { + return &PluginsNextboxUISavedtopologiesListParams{ + Context: ctx, + } +} + +// NewPluginsNextboxUISavedtopologiesListParamsWithHTTPClient creates a new PluginsNextboxUISavedtopologiesListParams object +// with the ability to set a custom HTTPClient for a request. +func NewPluginsNextboxUISavedtopologiesListParamsWithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesListParams { + return &PluginsNextboxUISavedtopologiesListParams{ + HTTPClient: client, + } +} + +/* PluginsNextboxUISavedtopologiesListParams contains all the parameters to send to the API endpoint + for the plugins nextbox ui savedtopologies list operation. + + Typically these are written to a http.Request. +*/ +type PluginsNextboxUISavedtopologiesListParams struct { + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the plugins nextbox ui savedtopologies list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PluginsNextboxUISavedtopologiesListParams) WithDefaults() *PluginsNextboxUISavedtopologiesListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the plugins nextbox ui savedtopologies list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PluginsNextboxUISavedtopologiesListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the plugins nextbox ui savedtopologies list params +func (o *PluginsNextboxUISavedtopologiesListParams) WithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the plugins nextbox ui savedtopologies list params +func (o *PluginsNextboxUISavedtopologiesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the plugins nextbox ui savedtopologies list params +func (o *PluginsNextboxUISavedtopologiesListParams) WithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the plugins nextbox ui savedtopologies list params +func (o *PluginsNextboxUISavedtopologiesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies list params +func (o *PluginsNextboxUISavedtopologiesListParams) WithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies list params +func (o *PluginsNextboxUISavedtopologiesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLimit adds the limit to the plugins nextbox ui savedtopologies list params +func (o *PluginsNextboxUISavedtopologiesListParams) WithLimit(limit *int64) *PluginsNextboxUISavedtopologiesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the plugins nextbox ui savedtopologies list params +func (o *PluginsNextboxUISavedtopologiesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the plugins nextbox ui savedtopologies list params +func (o *PluginsNextboxUISavedtopologiesListParams) WithOffset(offset *int64) *PluginsNextboxUISavedtopologiesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the plugins nextbox ui savedtopologies list params +func (o *PluginsNextboxUISavedtopologiesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *PluginsNextboxUISavedtopologiesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_list_responses.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_list_responses.go new file mode 100644 index 000000000..542beecb7 --- /dev/null +++ b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_list_responses.go @@ -0,0 +1,243 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package plugins + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// PluginsNextboxUISavedtopologiesListReader is a Reader for the PluginsNextboxUISavedtopologiesList structure. +type PluginsNextboxUISavedtopologiesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PluginsNextboxUISavedtopologiesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPluginsNextboxUISavedtopologiesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPluginsNextboxUISavedtopologiesListOK creates a PluginsNextboxUISavedtopologiesListOK with default headers values +func NewPluginsNextboxUISavedtopologiesListOK() *PluginsNextboxUISavedtopologiesListOK { + return &PluginsNextboxUISavedtopologiesListOK{} +} + +/* PluginsNextboxUISavedtopologiesListOK describes a response with status code 200, with default header values. + +PluginsNextboxUISavedtopologiesListOK plugins nextbox Ui savedtopologies list o k +*/ +type PluginsNextboxUISavedtopologiesListOK struct { + Payload *PluginsNextboxUISavedtopologiesListOKBody +} + +func (o *PluginsNextboxUISavedtopologiesListOK) Error() string { + return fmt.Sprintf("[GET /plugins/nextbox-ui/savedtopologies/][%d] pluginsNextboxUiSavedtopologiesListOK %+v", 200, o.Payload) +} +func (o *PluginsNextboxUISavedtopologiesListOK) GetPayload() *PluginsNextboxUISavedtopologiesListOKBody { + return o.Payload +} + +func (o *PluginsNextboxUISavedtopologiesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(PluginsNextboxUISavedtopologiesListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*PluginsNextboxUISavedtopologiesListOKBody plugins nextbox UI savedtopologies list o k body +swagger:model PluginsNextboxUISavedtopologiesListOKBody +*/ +type PluginsNextboxUISavedtopologiesListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.SavedTopology `json:"results"` +} + +// Validate validates this plugins nextbox UI savedtopologies list o k body +func (o *PluginsNextboxUISavedtopologiesListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *PluginsNextboxUISavedtopologiesListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("pluginsNextboxUiSavedtopologiesListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *PluginsNextboxUISavedtopologiesListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("pluginsNextboxUiSavedtopologiesListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *PluginsNextboxUISavedtopologiesListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("pluginsNextboxUiSavedtopologiesListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *PluginsNextboxUISavedtopologiesListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("pluginsNextboxUiSavedtopologiesListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pluginsNextboxUiSavedtopologiesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this plugins nextbox UI savedtopologies list o k body based on the context it is used +func (o *PluginsNextboxUISavedtopologiesListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *PluginsNextboxUISavedtopologiesListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pluginsNextboxUiSavedtopologiesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *PluginsNextboxUISavedtopologiesListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *PluginsNextboxUISavedtopologiesListOKBody) UnmarshalBinary(b []byte) error { + var res PluginsNextboxUISavedtopologiesListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_partial_update_parameters.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_partial_update_parameters.go new file mode 100644 index 000000000..f9e4d357d --- /dev/null +++ b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_partial_update_parameters.go @@ -0,0 +1,186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package plugins + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewPluginsNextboxUISavedtopologiesPartialUpdateParams creates a new PluginsNextboxUISavedtopologiesPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPluginsNextboxUISavedtopologiesPartialUpdateParams() *PluginsNextboxUISavedtopologiesPartialUpdateParams { + return &PluginsNextboxUISavedtopologiesPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPluginsNextboxUISavedtopologiesPartialUpdateParamsWithTimeout creates a new PluginsNextboxUISavedtopologiesPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewPluginsNextboxUISavedtopologiesPartialUpdateParamsWithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesPartialUpdateParams { + return &PluginsNextboxUISavedtopologiesPartialUpdateParams{ + timeout: timeout, + } +} + +// NewPluginsNextboxUISavedtopologiesPartialUpdateParamsWithContext creates a new PluginsNextboxUISavedtopologiesPartialUpdateParams object +// with the ability to set a context for a request. +func NewPluginsNextboxUISavedtopologiesPartialUpdateParamsWithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesPartialUpdateParams { + return &PluginsNextboxUISavedtopologiesPartialUpdateParams{ + Context: ctx, + } +} + +// NewPluginsNextboxUISavedtopologiesPartialUpdateParamsWithHTTPClient creates a new PluginsNextboxUISavedtopologiesPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewPluginsNextboxUISavedtopologiesPartialUpdateParamsWithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesPartialUpdateParams { + return &PluginsNextboxUISavedtopologiesPartialUpdateParams{ + HTTPClient: client, + } +} + +/* PluginsNextboxUISavedtopologiesPartialUpdateParams contains all the parameters to send to the API endpoint + for the plugins nextbox ui savedtopologies partial update operation. + + Typically these are written to a http.Request. +*/ +type PluginsNextboxUISavedtopologiesPartialUpdateParams struct { + + // Data. + Data *models.SavedTopology + + /* ID. + + A unique integer value identifying this saved topology. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the plugins nextbox ui savedtopologies partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) WithDefaults() *PluginsNextboxUISavedtopologiesPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the plugins nextbox ui savedtopologies partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the plugins nextbox ui savedtopologies partial update params +func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) WithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the plugins nextbox ui savedtopologies partial update params +func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the plugins nextbox ui savedtopologies partial update params +func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) WithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the plugins nextbox ui savedtopologies partial update params +func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies partial update params +func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) WithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies partial update params +func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the plugins nextbox ui savedtopologies partial update params +func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) WithData(data *models.SavedTopology) *PluginsNextboxUISavedtopologiesPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the plugins nextbox ui savedtopologies partial update params +func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) SetData(data *models.SavedTopology) { + o.Data = data +} + +// WithID adds the id to the plugins nextbox ui savedtopologies partial update params +func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) WithID(id int64) *PluginsNextboxUISavedtopologiesPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the plugins nextbox ui savedtopologies partial update params +func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) 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/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_partial_update_responses.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_partial_update_responses.go new file mode 100644 index 000000000..2d252ba75 --- /dev/null +++ b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_partial_update_responses.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package plugins + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// PluginsNextboxUISavedtopologiesPartialUpdateReader is a Reader for the PluginsNextboxUISavedtopologiesPartialUpdate structure. +type PluginsNextboxUISavedtopologiesPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PluginsNextboxUISavedtopologiesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPluginsNextboxUISavedtopologiesPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPluginsNextboxUISavedtopologiesPartialUpdateOK creates a PluginsNextboxUISavedtopologiesPartialUpdateOK with default headers values +func NewPluginsNextboxUISavedtopologiesPartialUpdateOK() *PluginsNextboxUISavedtopologiesPartialUpdateOK { + return &PluginsNextboxUISavedtopologiesPartialUpdateOK{} +} + +/* PluginsNextboxUISavedtopologiesPartialUpdateOK describes a response with status code 200, with default header values. + +PluginsNextboxUISavedtopologiesPartialUpdateOK plugins nextbox Ui savedtopologies partial update o k +*/ +type PluginsNextboxUISavedtopologiesPartialUpdateOK struct { + Payload *models.SavedTopology +} + +func (o *PluginsNextboxUISavedtopologiesPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /plugins/nextbox-ui/savedtopologies/{id}/][%d] pluginsNextboxUiSavedtopologiesPartialUpdateOK %+v", 200, o.Payload) +} +func (o *PluginsNextboxUISavedtopologiesPartialUpdateOK) GetPayload() *models.SavedTopology { + return o.Payload +} + +func (o *PluginsNextboxUISavedtopologiesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SavedTopology) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_read_parameters.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_read_parameters.go new file mode 100644 index 000000000..4f74b1aea --- /dev/null +++ b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_read_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package plugins + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewPluginsNextboxUISavedtopologiesReadParams creates a new PluginsNextboxUISavedtopologiesReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPluginsNextboxUISavedtopologiesReadParams() *PluginsNextboxUISavedtopologiesReadParams { + return &PluginsNextboxUISavedtopologiesReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPluginsNextboxUISavedtopologiesReadParamsWithTimeout creates a new PluginsNextboxUISavedtopologiesReadParams object +// with the ability to set a timeout on a request. +func NewPluginsNextboxUISavedtopologiesReadParamsWithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesReadParams { + return &PluginsNextboxUISavedtopologiesReadParams{ + timeout: timeout, + } +} + +// NewPluginsNextboxUISavedtopologiesReadParamsWithContext creates a new PluginsNextboxUISavedtopologiesReadParams object +// with the ability to set a context for a request. +func NewPluginsNextboxUISavedtopologiesReadParamsWithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesReadParams { + return &PluginsNextboxUISavedtopologiesReadParams{ + Context: ctx, + } +} + +// NewPluginsNextboxUISavedtopologiesReadParamsWithHTTPClient creates a new PluginsNextboxUISavedtopologiesReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewPluginsNextboxUISavedtopologiesReadParamsWithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesReadParams { + return &PluginsNextboxUISavedtopologiesReadParams{ + HTTPClient: client, + } +} + +/* PluginsNextboxUISavedtopologiesReadParams contains all the parameters to send to the API endpoint + for the plugins nextbox ui savedtopologies read operation. + + Typically these are written to a http.Request. +*/ +type PluginsNextboxUISavedtopologiesReadParams struct { + + /* ID. + + A unique integer value identifying this saved topology. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the plugins nextbox ui savedtopologies read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PluginsNextboxUISavedtopologiesReadParams) WithDefaults() *PluginsNextboxUISavedtopologiesReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the plugins nextbox ui savedtopologies read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PluginsNextboxUISavedtopologiesReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the plugins nextbox ui savedtopologies read params +func (o *PluginsNextboxUISavedtopologiesReadParams) WithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the plugins nextbox ui savedtopologies read params +func (o *PluginsNextboxUISavedtopologiesReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the plugins nextbox ui savedtopologies read params +func (o *PluginsNextboxUISavedtopologiesReadParams) WithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the plugins nextbox ui savedtopologies read params +func (o *PluginsNextboxUISavedtopologiesReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies read params +func (o *PluginsNextboxUISavedtopologiesReadParams) WithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies read params +func (o *PluginsNextboxUISavedtopologiesReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the plugins nextbox ui savedtopologies read params +func (o *PluginsNextboxUISavedtopologiesReadParams) WithID(id int64) *PluginsNextboxUISavedtopologiesReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the plugins nextbox ui savedtopologies read params +func (o *PluginsNextboxUISavedtopologiesReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *PluginsNextboxUISavedtopologiesReadParams) 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/netbox/client/secrets/secrets_secret_roles_bulk_partial_update_responses.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_read_responses.go similarity index 59% rename from netbox/client/secrets/secrets_secret_roles_bulk_partial_update_responses.go rename to netbox/client/plugins/plugins_nextbox_ui_savedtopologies_read_responses.go index 898764db2..515d843d6 100644 --- a/netbox/client/secrets/secrets_secret_roles_bulk_partial_update_responses.go +++ b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_read_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package plugins // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// SecretsSecretRolesBulkPartialUpdateReader is a Reader for the SecretsSecretRolesBulkPartialUpdate structure. -type SecretsSecretRolesBulkPartialUpdateReader struct { +// PluginsNextboxUISavedtopologiesReadReader is a Reader for the PluginsNextboxUISavedtopologiesRead structure. +type PluginsNextboxUISavedtopologiesReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretRolesBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PluginsNextboxUISavedtopologiesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewSecretsSecretRolesBulkPartialUpdateOK() + result := NewPluginsNextboxUISavedtopologiesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,29 +49,29 @@ func (o *SecretsSecretRolesBulkPartialUpdateReader) ReadResponse(response runtim } } -// NewSecretsSecretRolesBulkPartialUpdateOK creates a SecretsSecretRolesBulkPartialUpdateOK with default headers values -func NewSecretsSecretRolesBulkPartialUpdateOK() *SecretsSecretRolesBulkPartialUpdateOK { - return &SecretsSecretRolesBulkPartialUpdateOK{} +// NewPluginsNextboxUISavedtopologiesReadOK creates a PluginsNextboxUISavedtopologiesReadOK with default headers values +func NewPluginsNextboxUISavedtopologiesReadOK() *PluginsNextboxUISavedtopologiesReadOK { + return &PluginsNextboxUISavedtopologiesReadOK{} } -/* SecretsSecretRolesBulkPartialUpdateOK describes a response with status code 200, with default header values. +/* PluginsNextboxUISavedtopologiesReadOK describes a response with status code 200, with default header values. -SecretsSecretRolesBulkPartialUpdateOK secrets secret roles bulk partial update o k +PluginsNextboxUISavedtopologiesReadOK plugins nextbox Ui savedtopologies read o k */ -type SecretsSecretRolesBulkPartialUpdateOK struct { - Payload *models.SecretRole +type PluginsNextboxUISavedtopologiesReadOK struct { + Payload *models.SavedTopology } -func (o *SecretsSecretRolesBulkPartialUpdateOK) Error() string { - return fmt.Sprintf("[PATCH /secrets/secret-roles/][%d] secretsSecretRolesBulkPartialUpdateOK %+v", 200, o.Payload) +func (o *PluginsNextboxUISavedtopologiesReadOK) Error() string { + return fmt.Sprintf("[GET /plugins/nextbox-ui/savedtopologies/{id}/][%d] pluginsNextboxUiSavedtopologiesReadOK %+v", 200, o.Payload) } -func (o *SecretsSecretRolesBulkPartialUpdateOK) GetPayload() *models.SecretRole { +func (o *PluginsNextboxUISavedtopologiesReadOK) GetPayload() *models.SavedTopology { return o.Payload } -func (o *SecretsSecretRolesBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *PluginsNextboxUISavedtopologiesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.SecretRole) + o.Payload = new(models.SavedTopology) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_update_parameters.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_update_parameters.go new file mode 100644 index 000000000..f7a3a5150 --- /dev/null +++ b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_update_parameters.go @@ -0,0 +1,186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package plugins + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewPluginsNextboxUISavedtopologiesUpdateParams creates a new PluginsNextboxUISavedtopologiesUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPluginsNextboxUISavedtopologiesUpdateParams() *PluginsNextboxUISavedtopologiesUpdateParams { + return &PluginsNextboxUISavedtopologiesUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPluginsNextboxUISavedtopologiesUpdateParamsWithTimeout creates a new PluginsNextboxUISavedtopologiesUpdateParams object +// with the ability to set a timeout on a request. +func NewPluginsNextboxUISavedtopologiesUpdateParamsWithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesUpdateParams { + return &PluginsNextboxUISavedtopologiesUpdateParams{ + timeout: timeout, + } +} + +// NewPluginsNextboxUISavedtopologiesUpdateParamsWithContext creates a new PluginsNextboxUISavedtopologiesUpdateParams object +// with the ability to set a context for a request. +func NewPluginsNextboxUISavedtopologiesUpdateParamsWithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesUpdateParams { + return &PluginsNextboxUISavedtopologiesUpdateParams{ + Context: ctx, + } +} + +// NewPluginsNextboxUISavedtopologiesUpdateParamsWithHTTPClient creates a new PluginsNextboxUISavedtopologiesUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewPluginsNextboxUISavedtopologiesUpdateParamsWithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesUpdateParams { + return &PluginsNextboxUISavedtopologiesUpdateParams{ + HTTPClient: client, + } +} + +/* PluginsNextboxUISavedtopologiesUpdateParams contains all the parameters to send to the API endpoint + for the plugins nextbox ui savedtopologies update operation. + + Typically these are written to a http.Request. +*/ +type PluginsNextboxUISavedtopologiesUpdateParams struct { + + // Data. + Data *models.SavedTopology + + /* ID. + + A unique integer value identifying this saved topology. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the plugins nextbox ui savedtopologies update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PluginsNextboxUISavedtopologiesUpdateParams) WithDefaults() *PluginsNextboxUISavedtopologiesUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the plugins nextbox ui savedtopologies update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PluginsNextboxUISavedtopologiesUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the plugins nextbox ui savedtopologies update params +func (o *PluginsNextboxUISavedtopologiesUpdateParams) WithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the plugins nextbox ui savedtopologies update params +func (o *PluginsNextboxUISavedtopologiesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the plugins nextbox ui savedtopologies update params +func (o *PluginsNextboxUISavedtopologiesUpdateParams) WithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the plugins nextbox ui savedtopologies update params +func (o *PluginsNextboxUISavedtopologiesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies update params +func (o *PluginsNextboxUISavedtopologiesUpdateParams) WithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies update params +func (o *PluginsNextboxUISavedtopologiesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the plugins nextbox ui savedtopologies update params +func (o *PluginsNextboxUISavedtopologiesUpdateParams) WithData(data *models.SavedTopology) *PluginsNextboxUISavedtopologiesUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the plugins nextbox ui savedtopologies update params +func (o *PluginsNextboxUISavedtopologiesUpdateParams) SetData(data *models.SavedTopology) { + o.Data = data +} + +// WithID adds the id to the plugins nextbox ui savedtopologies update params +func (o *PluginsNextboxUISavedtopologiesUpdateParams) WithID(id int64) *PluginsNextboxUISavedtopologiesUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the plugins nextbox ui savedtopologies update params +func (o *PluginsNextboxUISavedtopologiesUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *PluginsNextboxUISavedtopologiesUpdateParams) 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/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_update_responses.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_update_responses.go new file mode 100644 index 000000000..0fad714d7 --- /dev/null +++ b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_update_responses.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package plugins + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// PluginsNextboxUISavedtopologiesUpdateReader is a Reader for the PluginsNextboxUISavedtopologiesUpdate structure. +type PluginsNextboxUISavedtopologiesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PluginsNextboxUISavedtopologiesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPluginsNextboxUISavedtopologiesUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPluginsNextboxUISavedtopologiesUpdateOK creates a PluginsNextboxUISavedtopologiesUpdateOK with default headers values +func NewPluginsNextboxUISavedtopologiesUpdateOK() *PluginsNextboxUISavedtopologiesUpdateOK { + return &PluginsNextboxUISavedtopologiesUpdateOK{} +} + +/* PluginsNextboxUISavedtopologiesUpdateOK describes a response with status code 200, with default header values. + +PluginsNextboxUISavedtopologiesUpdateOK plugins nextbox Ui savedtopologies update o k +*/ +type PluginsNextboxUISavedtopologiesUpdateOK struct { + Payload *models.SavedTopology +} + +func (o *PluginsNextboxUISavedtopologiesUpdateOK) Error() string { + return fmt.Sprintf("[PUT /plugins/nextbox-ui/savedtopologies/{id}/][%d] pluginsNextboxUiSavedtopologiesUpdateOK %+v", 200, o.Payload) +} +func (o *PluginsNextboxUISavedtopologiesUpdateOK) GetPayload() *models.SavedTopology { + return o.Payload +} + +func (o *PluginsNextboxUISavedtopologiesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SavedTopology) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/secrets/secrets_client.go b/netbox/client/secrets/secrets_client.go deleted file mode 100644 index f76889864..000000000 --- a/netbox/client/secrets/secrets_client.go +++ /dev/null @@ -1,892 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new secrets API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for secrets API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - SecretsGenerateRsaKeyPairList(params *SecretsGenerateRsaKeyPairListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsGenerateRsaKeyPairListOK, error) - - SecretsGetSessionKeyCreate(params *SecretsGetSessionKeyCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsGetSessionKeyCreateCreated, error) - - SecretsSecretRolesBulkDelete(params *SecretsSecretRolesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesBulkDeleteNoContent, error) - - SecretsSecretRolesBulkPartialUpdate(params *SecretsSecretRolesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesBulkPartialUpdateOK, error) - - SecretsSecretRolesBulkUpdate(params *SecretsSecretRolesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesBulkUpdateOK, error) - - SecretsSecretRolesCreate(params *SecretsSecretRolesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesCreateCreated, error) - - SecretsSecretRolesDelete(params *SecretsSecretRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesDeleteNoContent, error) - - SecretsSecretRolesList(params *SecretsSecretRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesListOK, error) - - SecretsSecretRolesPartialUpdate(params *SecretsSecretRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesPartialUpdateOK, error) - - SecretsSecretRolesRead(params *SecretsSecretRolesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesReadOK, error) - - SecretsSecretRolesUpdate(params *SecretsSecretRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesUpdateOK, error) - - SecretsSecretsBulkDelete(params *SecretsSecretsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsBulkDeleteNoContent, error) - - SecretsSecretsBulkPartialUpdate(params *SecretsSecretsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsBulkPartialUpdateOK, error) - - SecretsSecretsBulkUpdate(params *SecretsSecretsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsBulkUpdateOK, error) - - SecretsSecretsCreate(params *SecretsSecretsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsCreateCreated, error) - - SecretsSecretsDelete(params *SecretsSecretsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsDeleteNoContent, error) - - SecretsSecretsList(params *SecretsSecretsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsListOK, error) - - SecretsSecretsPartialUpdate(params *SecretsSecretsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsPartialUpdateOK, error) - - SecretsSecretsRead(params *SecretsSecretsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsReadOK, error) - - SecretsSecretsUpdate(params *SecretsSecretsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsUpdateOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - SecretsGenerateRsaKeyPairList this endpoint can be used to generate a new r s a key pair the keys are returned in p e m format - - { - "public_key": "", - "private_key": "" - } -*/ -func (a *Client) SecretsGenerateRsaKeyPairList(params *SecretsGenerateRsaKeyPairListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsGenerateRsaKeyPairListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsGenerateRsaKeyPairListParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_generate-rsa-key-pair_list", - Method: "GET", - PathPattern: "/secrets/generate-rsa-key-pair/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsGenerateRsaKeyPairListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsGenerateRsaKeyPairListOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_generate-rsa-key-pair_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsGetSessionKeyCreate Retrieve a temporary session key to use for encrypting and decrypting secrets via the API. The user's private RSA -key is POSTed with the name `private_key`. An example: - - curl -v -X POST -H "Authorization: Token " -H "Accept: application/json; indent=4" \ - --data-urlencode "private_key@" https://netbox/api/secrets/get-session-key/ - -This request will yield a base64-encoded session key to be included in an `X-Session-Key` header in future requests: - - { - "session_key": "+8t4SI6XikgVmB5+/urhozx9O5qCQANyOk1MNe6taRf=" - } - -This endpoint accepts one optional parameter: `preserve_key`. If True and a session key exists, the existing session -key will be returned instead of a new one. -*/ -func (a *Client) SecretsGetSessionKeyCreate(params *SecretsGetSessionKeyCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsGetSessionKeyCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsGetSessionKeyCreateParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_get-session-key_create", - Method: "POST", - PathPattern: "/secrets/get-session-key/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsGetSessionKeyCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsGetSessionKeyCreateCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_get-session-key_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretRolesBulkDelete secrets secret roles bulk delete API -*/ -func (a *Client) SecretsSecretRolesBulkDelete(params *SecretsSecretRolesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesBulkDeleteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretRolesBulkDeleteParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secret-roles_bulk_delete", - Method: "DELETE", - PathPattern: "/secrets/secret-roles/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretRolesBulkDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretRolesBulkDeleteNoContent) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secret-roles_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretRolesBulkPartialUpdate secrets secret roles bulk partial update API -*/ -func (a *Client) SecretsSecretRolesBulkPartialUpdate(params *SecretsSecretRolesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesBulkPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretRolesBulkPartialUpdateParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secret-roles_bulk_partial_update", - Method: "PATCH", - PathPattern: "/secrets/secret-roles/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretRolesBulkPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretRolesBulkPartialUpdateOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secret-roles_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretRolesBulkUpdate secrets secret roles bulk update API -*/ -func (a *Client) SecretsSecretRolesBulkUpdate(params *SecretsSecretRolesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesBulkUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretRolesBulkUpdateParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secret-roles_bulk_update", - Method: "PUT", - PathPattern: "/secrets/secret-roles/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretRolesBulkUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretRolesBulkUpdateOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secret-roles_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretRolesCreate secrets secret roles create API -*/ -func (a *Client) SecretsSecretRolesCreate(params *SecretsSecretRolesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretRolesCreateParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secret-roles_create", - Method: "POST", - PathPattern: "/secrets/secret-roles/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretRolesCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretRolesCreateCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secret-roles_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretRolesDelete secrets secret roles delete API -*/ -func (a *Client) SecretsSecretRolesDelete(params *SecretsSecretRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesDeleteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretRolesDeleteParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secret-roles_delete", - Method: "DELETE", - PathPattern: "/secrets/secret-roles/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretRolesDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretRolesDeleteNoContent) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secret-roles_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretRolesList secrets secret roles list API -*/ -func (a *Client) SecretsSecretRolesList(params *SecretsSecretRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretRolesListParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secret-roles_list", - Method: "GET", - PathPattern: "/secrets/secret-roles/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretRolesListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretRolesListOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secret-roles_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretRolesPartialUpdate secrets secret roles partial update API -*/ -func (a *Client) SecretsSecretRolesPartialUpdate(params *SecretsSecretRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretRolesPartialUpdateParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secret-roles_partial_update", - Method: "PATCH", - PathPattern: "/secrets/secret-roles/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretRolesPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretRolesPartialUpdateOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secret-roles_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretRolesRead secrets secret roles read API -*/ -func (a *Client) SecretsSecretRolesRead(params *SecretsSecretRolesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretRolesReadParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secret-roles_read", - Method: "GET", - PathPattern: "/secrets/secret-roles/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretRolesReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretRolesReadOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secret-roles_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretRolesUpdate secrets secret roles update API -*/ -func (a *Client) SecretsSecretRolesUpdate(params *SecretsSecretRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretRolesUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretRolesUpdateParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secret-roles_update", - Method: "PUT", - PathPattern: "/secrets/secret-roles/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretRolesUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretRolesUpdateOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secret-roles_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretsBulkDelete secrets secrets bulk delete API -*/ -func (a *Client) SecretsSecretsBulkDelete(params *SecretsSecretsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsBulkDeleteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretsBulkDeleteParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secrets_bulk_delete", - Method: "DELETE", - PathPattern: "/secrets/secrets/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretsBulkDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretsBulkDeleteNoContent) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secrets_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretsBulkPartialUpdate secrets secrets bulk partial update API -*/ -func (a *Client) SecretsSecretsBulkPartialUpdate(params *SecretsSecretsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsBulkPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretsBulkPartialUpdateParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secrets_bulk_partial_update", - Method: "PATCH", - PathPattern: "/secrets/secrets/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretsBulkPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretsBulkPartialUpdateOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secrets_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretsBulkUpdate secrets secrets bulk update API -*/ -func (a *Client) SecretsSecretsBulkUpdate(params *SecretsSecretsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsBulkUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretsBulkUpdateParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secrets_bulk_update", - Method: "PUT", - PathPattern: "/secrets/secrets/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretsBulkUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretsBulkUpdateOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secrets_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretsCreate secrets secrets create API -*/ -func (a *Client) SecretsSecretsCreate(params *SecretsSecretsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretsCreateParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secrets_create", - Method: "POST", - PathPattern: "/secrets/secrets/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretsCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretsCreateCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secrets_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretsDelete secrets secrets delete API -*/ -func (a *Client) SecretsSecretsDelete(params *SecretsSecretsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsDeleteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretsDeleteParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secrets_delete", - Method: "DELETE", - PathPattern: "/secrets/secrets/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretsDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretsDeleteNoContent) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secrets_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretsList secrets secrets list API -*/ -func (a *Client) SecretsSecretsList(params *SecretsSecretsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretsListParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secrets_list", - Method: "GET", - PathPattern: "/secrets/secrets/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretsListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretsListOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secrets_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretsPartialUpdate secrets secrets partial update API -*/ -func (a *Client) SecretsSecretsPartialUpdate(params *SecretsSecretsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretsPartialUpdateParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secrets_partial_update", - Method: "PATCH", - PathPattern: "/secrets/secrets/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretsPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretsPartialUpdateOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secrets_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretsRead secrets secrets read API -*/ -func (a *Client) SecretsSecretsRead(params *SecretsSecretsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretsReadParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secrets_read", - Method: "GET", - PathPattern: "/secrets/secrets/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretsReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretsReadOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secrets_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - SecretsSecretsUpdate secrets secrets update API -*/ -func (a *Client) SecretsSecretsUpdate(params *SecretsSecretsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SecretsSecretsUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSecretsSecretsUpdateParams() - } - op := &runtime.ClientOperation{ - ID: "secrets_secrets_update", - Method: "PUT", - PathPattern: "/secrets/secrets/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &SecretsSecretsUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*SecretsSecretsUpdateOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for secrets_secrets_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/netbox/client/secrets/secrets_generate_rsa_key_pair_list_parameters.go b/netbox/client/secrets/secrets_generate_rsa_key_pair_list_parameters.go deleted file mode 100644 index eb4df1ebc..000000000 --- a/netbox/client/secrets/secrets_generate_rsa_key_pair_list_parameters.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewSecretsGenerateRsaKeyPairListParams creates a new SecretsGenerateRsaKeyPairListParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsGenerateRsaKeyPairListParams() *SecretsGenerateRsaKeyPairListParams { - return &SecretsGenerateRsaKeyPairListParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsGenerateRsaKeyPairListParamsWithTimeout creates a new SecretsGenerateRsaKeyPairListParams object -// with the ability to set a timeout on a request. -func NewSecretsGenerateRsaKeyPairListParamsWithTimeout(timeout time.Duration) *SecretsGenerateRsaKeyPairListParams { - return &SecretsGenerateRsaKeyPairListParams{ - timeout: timeout, - } -} - -// NewSecretsGenerateRsaKeyPairListParamsWithContext creates a new SecretsGenerateRsaKeyPairListParams object -// with the ability to set a context for a request. -func NewSecretsGenerateRsaKeyPairListParamsWithContext(ctx context.Context) *SecretsGenerateRsaKeyPairListParams { - return &SecretsGenerateRsaKeyPairListParams{ - Context: ctx, - } -} - -// NewSecretsGenerateRsaKeyPairListParamsWithHTTPClient creates a new SecretsGenerateRsaKeyPairListParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsGenerateRsaKeyPairListParamsWithHTTPClient(client *http.Client) *SecretsGenerateRsaKeyPairListParams { - return &SecretsGenerateRsaKeyPairListParams{ - HTTPClient: client, - } -} - -/* SecretsGenerateRsaKeyPairListParams contains all the parameters to send to the API endpoint - for the secrets generate rsa key pair list operation. - - Typically these are written to a http.Request. -*/ -type SecretsGenerateRsaKeyPairListParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets generate rsa key pair list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsGenerateRsaKeyPairListParams) WithDefaults() *SecretsGenerateRsaKeyPairListParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets generate rsa key pair list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsGenerateRsaKeyPairListParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets generate rsa key pair list params -func (o *SecretsGenerateRsaKeyPairListParams) WithTimeout(timeout time.Duration) *SecretsGenerateRsaKeyPairListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets generate rsa key pair list params -func (o *SecretsGenerateRsaKeyPairListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets generate rsa key pair list params -func (o *SecretsGenerateRsaKeyPairListParams) WithContext(ctx context.Context) *SecretsGenerateRsaKeyPairListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets generate rsa key pair list params -func (o *SecretsGenerateRsaKeyPairListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets generate rsa key pair list params -func (o *SecretsGenerateRsaKeyPairListParams) WithHTTPClient(client *http.Client) *SecretsGenerateRsaKeyPairListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets generate rsa key pair list params -func (o *SecretsGenerateRsaKeyPairListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsGenerateRsaKeyPairListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/secrets/secrets_get_session_key_create_parameters.go b/netbox/client/secrets/secrets_get_session_key_create_parameters.go deleted file mode 100644 index d4d8977cd..000000000 --- a/netbox/client/secrets/secrets_get_session_key_create_parameters.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewSecretsGetSessionKeyCreateParams creates a new SecretsGetSessionKeyCreateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsGetSessionKeyCreateParams() *SecretsGetSessionKeyCreateParams { - return &SecretsGetSessionKeyCreateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsGetSessionKeyCreateParamsWithTimeout creates a new SecretsGetSessionKeyCreateParams object -// with the ability to set a timeout on a request. -func NewSecretsGetSessionKeyCreateParamsWithTimeout(timeout time.Duration) *SecretsGetSessionKeyCreateParams { - return &SecretsGetSessionKeyCreateParams{ - timeout: timeout, - } -} - -// NewSecretsGetSessionKeyCreateParamsWithContext creates a new SecretsGetSessionKeyCreateParams object -// with the ability to set a context for a request. -func NewSecretsGetSessionKeyCreateParamsWithContext(ctx context.Context) *SecretsGetSessionKeyCreateParams { - return &SecretsGetSessionKeyCreateParams{ - Context: ctx, - } -} - -// NewSecretsGetSessionKeyCreateParamsWithHTTPClient creates a new SecretsGetSessionKeyCreateParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsGetSessionKeyCreateParamsWithHTTPClient(client *http.Client) *SecretsGetSessionKeyCreateParams { - return &SecretsGetSessionKeyCreateParams{ - HTTPClient: client, - } -} - -/* SecretsGetSessionKeyCreateParams contains all the parameters to send to the API endpoint - for the secrets get session key create operation. - - Typically these are written to a http.Request. -*/ -type SecretsGetSessionKeyCreateParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets get session key create params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsGetSessionKeyCreateParams) WithDefaults() *SecretsGetSessionKeyCreateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets get session key create params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsGetSessionKeyCreateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets get session key create params -func (o *SecretsGetSessionKeyCreateParams) WithTimeout(timeout time.Duration) *SecretsGetSessionKeyCreateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets get session key create params -func (o *SecretsGetSessionKeyCreateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets get session key create params -func (o *SecretsGetSessionKeyCreateParams) WithContext(ctx context.Context) *SecretsGetSessionKeyCreateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets get session key create params -func (o *SecretsGetSessionKeyCreateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets get session key create params -func (o *SecretsGetSessionKeyCreateParams) WithHTTPClient(client *http.Client) *SecretsGetSessionKeyCreateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets get session key create params -func (o *SecretsGetSessionKeyCreateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsGetSessionKeyCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/secrets/secrets_secret_roles_bulk_delete_parameters.go b/netbox/client/secrets/secrets_secret_roles_bulk_delete_parameters.go deleted file mode 100644 index 67aad4e35..000000000 --- a/netbox/client/secrets/secrets_secret_roles_bulk_delete_parameters.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewSecretsSecretRolesBulkDeleteParams creates a new SecretsSecretRolesBulkDeleteParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretRolesBulkDeleteParams() *SecretsSecretRolesBulkDeleteParams { - return &SecretsSecretRolesBulkDeleteParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretRolesBulkDeleteParamsWithTimeout creates a new SecretsSecretRolesBulkDeleteParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretRolesBulkDeleteParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesBulkDeleteParams { - return &SecretsSecretRolesBulkDeleteParams{ - timeout: timeout, - } -} - -// NewSecretsSecretRolesBulkDeleteParamsWithContext creates a new SecretsSecretRolesBulkDeleteParams object -// with the ability to set a context for a request. -func NewSecretsSecretRolesBulkDeleteParamsWithContext(ctx context.Context) *SecretsSecretRolesBulkDeleteParams { - return &SecretsSecretRolesBulkDeleteParams{ - Context: ctx, - } -} - -// NewSecretsSecretRolesBulkDeleteParamsWithHTTPClient creates a new SecretsSecretRolesBulkDeleteParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretRolesBulkDeleteParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesBulkDeleteParams { - return &SecretsSecretRolesBulkDeleteParams{ - HTTPClient: client, - } -} - -/* SecretsSecretRolesBulkDeleteParams contains all the parameters to send to the API endpoint - for the secrets secret roles bulk delete operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretRolesBulkDeleteParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secret roles bulk delete params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesBulkDeleteParams) WithDefaults() *SecretsSecretRolesBulkDeleteParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secret roles bulk delete params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesBulkDeleteParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secret roles bulk delete params -func (o *SecretsSecretRolesBulkDeleteParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesBulkDeleteParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secret roles bulk delete params -func (o *SecretsSecretRolesBulkDeleteParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secret roles bulk delete params -func (o *SecretsSecretRolesBulkDeleteParams) WithContext(ctx context.Context) *SecretsSecretRolesBulkDeleteParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secret roles bulk delete params -func (o *SecretsSecretRolesBulkDeleteParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secret roles bulk delete params -func (o *SecretsSecretRolesBulkDeleteParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesBulkDeleteParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secret roles bulk delete params -func (o *SecretsSecretRolesBulkDeleteParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretRolesBulkDeleteParams) 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/netbox/client/secrets/secrets_secret_roles_bulk_delete_responses.go b/netbox/client/secrets/secrets_secret_roles_bulk_delete_responses.go deleted file mode 100644 index f49e5f881..000000000 --- a/netbox/client/secrets/secrets_secret_roles_bulk_delete_responses.go +++ /dev/null @@ -1,68 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// SecretsSecretRolesBulkDeleteReader is a Reader for the SecretsSecretRolesBulkDelete structure. -type SecretsSecretRolesBulkDeleteReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SecretsSecretRolesBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewSecretsSecretRolesBulkDeleteNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewSecretsSecretRolesBulkDeleteNoContent creates a SecretsSecretRolesBulkDeleteNoContent with default headers values -func NewSecretsSecretRolesBulkDeleteNoContent() *SecretsSecretRolesBulkDeleteNoContent { - return &SecretsSecretRolesBulkDeleteNoContent{} -} - -/* SecretsSecretRolesBulkDeleteNoContent describes a response with status code 204, with default header values. - -SecretsSecretRolesBulkDeleteNoContent secrets secret roles bulk delete no content -*/ -type SecretsSecretRolesBulkDeleteNoContent struct { -} - -func (o *SecretsSecretRolesBulkDeleteNoContent) Error() string { - return fmt.Sprintf("[DELETE /secrets/secret-roles/][%d] secretsSecretRolesBulkDeleteNoContent ", 204) -} - -func (o *SecretsSecretRolesBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/netbox/client/secrets/secrets_secret_roles_bulk_partial_update_parameters.go b/netbox/client/secrets/secrets_secret_roles_bulk_partial_update_parameters.go deleted file mode 100644 index de09c5337..000000000 --- a/netbox/client/secrets/secrets_secret_roles_bulk_partial_update_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewSecretsSecretRolesBulkPartialUpdateParams creates a new SecretsSecretRolesBulkPartialUpdateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretRolesBulkPartialUpdateParams() *SecretsSecretRolesBulkPartialUpdateParams { - return &SecretsSecretRolesBulkPartialUpdateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretRolesBulkPartialUpdateParamsWithTimeout creates a new SecretsSecretRolesBulkPartialUpdateParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretRolesBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesBulkPartialUpdateParams { - return &SecretsSecretRolesBulkPartialUpdateParams{ - timeout: timeout, - } -} - -// NewSecretsSecretRolesBulkPartialUpdateParamsWithContext creates a new SecretsSecretRolesBulkPartialUpdateParams object -// with the ability to set a context for a request. -func NewSecretsSecretRolesBulkPartialUpdateParamsWithContext(ctx context.Context) *SecretsSecretRolesBulkPartialUpdateParams { - return &SecretsSecretRolesBulkPartialUpdateParams{ - Context: ctx, - } -} - -// NewSecretsSecretRolesBulkPartialUpdateParamsWithHTTPClient creates a new SecretsSecretRolesBulkPartialUpdateParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretRolesBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesBulkPartialUpdateParams { - return &SecretsSecretRolesBulkPartialUpdateParams{ - HTTPClient: client, - } -} - -/* SecretsSecretRolesBulkPartialUpdateParams contains all the parameters to send to the API endpoint - for the secrets secret roles bulk partial update operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretRolesBulkPartialUpdateParams struct { - - // Data. - Data *models.SecretRole - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secret roles bulk partial update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesBulkPartialUpdateParams) WithDefaults() *SecretsSecretRolesBulkPartialUpdateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secret roles bulk partial update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesBulkPartialUpdateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secret roles bulk partial update params -func (o *SecretsSecretRolesBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesBulkPartialUpdateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secret roles bulk partial update params -func (o *SecretsSecretRolesBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secret roles bulk partial update params -func (o *SecretsSecretRolesBulkPartialUpdateParams) WithContext(ctx context.Context) *SecretsSecretRolesBulkPartialUpdateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secret roles bulk partial update params -func (o *SecretsSecretRolesBulkPartialUpdateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secret roles bulk partial update params -func (o *SecretsSecretRolesBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesBulkPartialUpdateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secret roles bulk partial update params -func (o *SecretsSecretRolesBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the secrets secret roles bulk partial update params -func (o *SecretsSecretRolesBulkPartialUpdateParams) WithData(data *models.SecretRole) *SecretsSecretRolesBulkPartialUpdateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the secrets secret roles bulk partial update params -func (o *SecretsSecretRolesBulkPartialUpdateParams) SetData(data *models.SecretRole) { - o.Data = data -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretRolesBulkPartialUpdateParams) 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/netbox/client/secrets/secrets_secret_roles_bulk_update_parameters.go b/netbox/client/secrets/secrets_secret_roles_bulk_update_parameters.go deleted file mode 100644 index 5a39bb4ba..000000000 --- a/netbox/client/secrets/secrets_secret_roles_bulk_update_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewSecretsSecretRolesBulkUpdateParams creates a new SecretsSecretRolesBulkUpdateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretRolesBulkUpdateParams() *SecretsSecretRolesBulkUpdateParams { - return &SecretsSecretRolesBulkUpdateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretRolesBulkUpdateParamsWithTimeout creates a new SecretsSecretRolesBulkUpdateParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretRolesBulkUpdateParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesBulkUpdateParams { - return &SecretsSecretRolesBulkUpdateParams{ - timeout: timeout, - } -} - -// NewSecretsSecretRolesBulkUpdateParamsWithContext creates a new SecretsSecretRolesBulkUpdateParams object -// with the ability to set a context for a request. -func NewSecretsSecretRolesBulkUpdateParamsWithContext(ctx context.Context) *SecretsSecretRolesBulkUpdateParams { - return &SecretsSecretRolesBulkUpdateParams{ - Context: ctx, - } -} - -// NewSecretsSecretRolesBulkUpdateParamsWithHTTPClient creates a new SecretsSecretRolesBulkUpdateParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretRolesBulkUpdateParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesBulkUpdateParams { - return &SecretsSecretRolesBulkUpdateParams{ - HTTPClient: client, - } -} - -/* SecretsSecretRolesBulkUpdateParams contains all the parameters to send to the API endpoint - for the secrets secret roles bulk update operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretRolesBulkUpdateParams struct { - - // Data. - Data *models.SecretRole - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secret roles bulk update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesBulkUpdateParams) WithDefaults() *SecretsSecretRolesBulkUpdateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secret roles bulk update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesBulkUpdateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secret roles bulk update params -func (o *SecretsSecretRolesBulkUpdateParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesBulkUpdateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secret roles bulk update params -func (o *SecretsSecretRolesBulkUpdateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secret roles bulk update params -func (o *SecretsSecretRolesBulkUpdateParams) WithContext(ctx context.Context) *SecretsSecretRolesBulkUpdateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secret roles bulk update params -func (o *SecretsSecretRolesBulkUpdateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secret roles bulk update params -func (o *SecretsSecretRolesBulkUpdateParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesBulkUpdateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secret roles bulk update params -func (o *SecretsSecretRolesBulkUpdateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the secrets secret roles bulk update params -func (o *SecretsSecretRolesBulkUpdateParams) WithData(data *models.SecretRole) *SecretsSecretRolesBulkUpdateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the secrets secret roles bulk update params -func (o *SecretsSecretRolesBulkUpdateParams) SetData(data *models.SecretRole) { - o.Data = data -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretRolesBulkUpdateParams) 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/netbox/client/secrets/secrets_secret_roles_create_parameters.go b/netbox/client/secrets/secrets_secret_roles_create_parameters.go deleted file mode 100644 index f89d87ae1..000000000 --- a/netbox/client/secrets/secrets_secret_roles_create_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewSecretsSecretRolesCreateParams creates a new SecretsSecretRolesCreateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretRolesCreateParams() *SecretsSecretRolesCreateParams { - return &SecretsSecretRolesCreateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretRolesCreateParamsWithTimeout creates a new SecretsSecretRolesCreateParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretRolesCreateParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesCreateParams { - return &SecretsSecretRolesCreateParams{ - timeout: timeout, - } -} - -// NewSecretsSecretRolesCreateParamsWithContext creates a new SecretsSecretRolesCreateParams object -// with the ability to set a context for a request. -func NewSecretsSecretRolesCreateParamsWithContext(ctx context.Context) *SecretsSecretRolesCreateParams { - return &SecretsSecretRolesCreateParams{ - Context: ctx, - } -} - -// NewSecretsSecretRolesCreateParamsWithHTTPClient creates a new SecretsSecretRolesCreateParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretRolesCreateParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesCreateParams { - return &SecretsSecretRolesCreateParams{ - HTTPClient: client, - } -} - -/* SecretsSecretRolesCreateParams contains all the parameters to send to the API endpoint - for the secrets secret roles create operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretRolesCreateParams struct { - - // Data. - Data *models.SecretRole - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secret roles create params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesCreateParams) WithDefaults() *SecretsSecretRolesCreateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secret roles create params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesCreateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secret roles create params -func (o *SecretsSecretRolesCreateParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesCreateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secret roles create params -func (o *SecretsSecretRolesCreateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secret roles create params -func (o *SecretsSecretRolesCreateParams) WithContext(ctx context.Context) *SecretsSecretRolesCreateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secret roles create params -func (o *SecretsSecretRolesCreateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secret roles create params -func (o *SecretsSecretRolesCreateParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesCreateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secret roles create params -func (o *SecretsSecretRolesCreateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the secrets secret roles create params -func (o *SecretsSecretRolesCreateParams) WithData(data *models.SecretRole) *SecretsSecretRolesCreateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the secrets secret roles create params -func (o *SecretsSecretRolesCreateParams) SetData(data *models.SecretRole) { - o.Data = data -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretRolesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Data != nil { - if err := r.SetBodyParam(o.Data); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/secrets/secrets_secret_roles_delete_parameters.go b/netbox/client/secrets/secrets_secret_roles_delete_parameters.go deleted file mode 100644 index be2011afa..000000000 --- a/netbox/client/secrets/secrets_secret_roles_delete_parameters.go +++ /dev/null @@ -1,165 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewSecretsSecretRolesDeleteParams creates a new SecretsSecretRolesDeleteParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretRolesDeleteParams() *SecretsSecretRolesDeleteParams { - return &SecretsSecretRolesDeleteParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretRolesDeleteParamsWithTimeout creates a new SecretsSecretRolesDeleteParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretRolesDeleteParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesDeleteParams { - return &SecretsSecretRolesDeleteParams{ - timeout: timeout, - } -} - -// NewSecretsSecretRolesDeleteParamsWithContext creates a new SecretsSecretRolesDeleteParams object -// with the ability to set a context for a request. -func NewSecretsSecretRolesDeleteParamsWithContext(ctx context.Context) *SecretsSecretRolesDeleteParams { - return &SecretsSecretRolesDeleteParams{ - Context: ctx, - } -} - -// NewSecretsSecretRolesDeleteParamsWithHTTPClient creates a new SecretsSecretRolesDeleteParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretRolesDeleteParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesDeleteParams { - return &SecretsSecretRolesDeleteParams{ - HTTPClient: client, - } -} - -/* SecretsSecretRolesDeleteParams contains all the parameters to send to the API endpoint - for the secrets secret roles delete operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretRolesDeleteParams struct { - - /* ID. - - A unique integer value identifying this secret role. - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secret roles delete params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesDeleteParams) WithDefaults() *SecretsSecretRolesDeleteParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secret roles delete params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesDeleteParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secret roles delete params -func (o *SecretsSecretRolesDeleteParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesDeleteParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secret roles delete params -func (o *SecretsSecretRolesDeleteParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secret roles delete params -func (o *SecretsSecretRolesDeleteParams) WithContext(ctx context.Context) *SecretsSecretRolesDeleteParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secret roles delete params -func (o *SecretsSecretRolesDeleteParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secret roles delete params -func (o *SecretsSecretRolesDeleteParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesDeleteParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secret roles delete params -func (o *SecretsSecretRolesDeleteParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the secrets secret roles delete params -func (o *SecretsSecretRolesDeleteParams) WithID(id int64) *SecretsSecretRolesDeleteParams { - o.SetID(id) - return o -} - -// SetID adds the id to the secrets secret roles delete params -func (o *SecretsSecretRolesDeleteParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretRolesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/secrets/secrets_secret_roles_list_parameters.go b/netbox/client/secrets/secrets_secret_roles_list_parameters.go deleted file mode 100644 index 8da34df74..000000000 --- a/netbox/client/secrets/secrets_secret_roles_list_parameters.go +++ /dev/null @@ -1,1296 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewSecretsSecretRolesListParams creates a new SecretsSecretRolesListParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretRolesListParams() *SecretsSecretRolesListParams { - return &SecretsSecretRolesListParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretRolesListParamsWithTimeout creates a new SecretsSecretRolesListParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretRolesListParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesListParams { - return &SecretsSecretRolesListParams{ - timeout: timeout, - } -} - -// NewSecretsSecretRolesListParamsWithContext creates a new SecretsSecretRolesListParams object -// with the ability to set a context for a request. -func NewSecretsSecretRolesListParamsWithContext(ctx context.Context) *SecretsSecretRolesListParams { - return &SecretsSecretRolesListParams{ - Context: ctx, - } -} - -// NewSecretsSecretRolesListParamsWithHTTPClient creates a new SecretsSecretRolesListParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretRolesListParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesListParams { - return &SecretsSecretRolesListParams{ - HTTPClient: client, - } -} - -/* SecretsSecretRolesListParams contains all the parameters to send to the API endpoint - for the secrets secret roles list operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretRolesListParams struct { - - // Created. - Created *string - - // CreatedGte. - CreatedGte *string - - // CreatedLte. - CreatedLte *string - - // ID. - ID *string - - // IDGt. - IDGt *string - - // IDGte. - IDGte *string - - // IDLt. - IDLt *string - - // IDLte. - IDLte *string - - // IDn. - IDn *string - - // LastUpdated. - LastUpdated *string - - // LastUpdatedGte. - LastUpdatedGte *string - - // LastUpdatedLte. - LastUpdatedLte *string - - /* Limit. - - Number of results to return per page. - */ - Limit *int64 - - // Name. - Name *string - - // NameEmpty. - NameEmpty *string - - // NameIc. - NameIc *string - - // NameIe. - NameIe *string - - // NameIew. - NameIew *string - - // NameIsw. - NameIsw *string - - // Namen. - Namen *string - - // NameNic. - NameNic *string - - // NameNie. - NameNie *string - - // NameNiew. - NameNiew *string - - // NameNisw. - NameNisw *string - - /* Offset. - - The initial index from which to return the results. - */ - Offset *int64 - - // Q. - Q *string - - // Slug. - Slug *string - - // SlugEmpty. - SlugEmpty *string - - // SlugIc. - SlugIc *string - - // SlugIe. - SlugIe *string - - // SlugIew. - SlugIew *string - - // SlugIsw. - SlugIsw *string - - // Slugn. - Slugn *string - - // SlugNic. - SlugNic *string - - // SlugNie. - SlugNie *string - - // SlugNiew. - SlugNiew *string - - // SlugNisw. - SlugNisw *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secret roles list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesListParams) WithDefaults() *SecretsSecretRolesListParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secret roles list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesListParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithContext(ctx context.Context) *SecretsSecretRolesListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCreated adds the created to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithCreated(created *string) *SecretsSecretRolesListParams { - o.SetCreated(created) - return o -} - -// SetCreated adds the created to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetCreated(created *string) { - o.Created = created -} - -// WithCreatedGte adds the createdGte to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithCreatedGte(createdGte *string) *SecretsSecretRolesListParams { - o.SetCreatedGte(createdGte) - return o -} - -// SetCreatedGte adds the createdGte to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetCreatedGte(createdGte *string) { - o.CreatedGte = createdGte -} - -// WithCreatedLte adds the createdLte to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithCreatedLte(createdLte *string) *SecretsSecretRolesListParams { - o.SetCreatedLte(createdLte) - return o -} - -// SetCreatedLte adds the createdLte to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetCreatedLte(createdLte *string) { - o.CreatedLte = createdLte -} - -// WithID adds the id to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithID(id *string) *SecretsSecretRolesListParams { - o.SetID(id) - return o -} - -// SetID adds the id to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetID(id *string) { - o.ID = id -} - -// WithIDGt adds the iDGt to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithIDGt(iDGt *string) *SecretsSecretRolesListParams { - o.SetIDGt(iDGt) - return o -} - -// SetIDGt adds the idGt to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetIDGt(iDGt *string) { - o.IDGt = iDGt -} - -// WithIDGte adds the iDGte to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithIDGte(iDGte *string) *SecretsSecretRolesListParams { - o.SetIDGte(iDGte) - return o -} - -// SetIDGte adds the idGte to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetIDGte(iDGte *string) { - o.IDGte = iDGte -} - -// WithIDLt adds the iDLt to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithIDLt(iDLt *string) *SecretsSecretRolesListParams { - o.SetIDLt(iDLt) - return o -} - -// SetIDLt adds the idLt to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetIDLt(iDLt *string) { - o.IDLt = iDLt -} - -// WithIDLte adds the iDLte to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithIDLte(iDLte *string) *SecretsSecretRolesListParams { - o.SetIDLte(iDLte) - return o -} - -// SetIDLte adds the idLte to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetIDLte(iDLte *string) { - o.IDLte = iDLte -} - -// WithIDn adds the iDn to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithIDn(iDn *string) *SecretsSecretRolesListParams { - o.SetIDn(iDn) - return o -} - -// SetIDn adds the idN to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetIDn(iDn *string) { - o.IDn = iDn -} - -// WithLastUpdated adds the lastUpdated to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithLastUpdated(lastUpdated *string) *SecretsSecretRolesListParams { - o.SetLastUpdated(lastUpdated) - return o -} - -// SetLastUpdated adds the lastUpdated to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetLastUpdated(lastUpdated *string) { - o.LastUpdated = lastUpdated -} - -// WithLastUpdatedGte adds the lastUpdatedGte to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *SecretsSecretRolesListParams { - o.SetLastUpdatedGte(lastUpdatedGte) - return o -} - -// SetLastUpdatedGte adds the lastUpdatedGte to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { - o.LastUpdatedGte = lastUpdatedGte -} - -// WithLastUpdatedLte adds the lastUpdatedLte to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *SecretsSecretRolesListParams { - o.SetLastUpdatedLte(lastUpdatedLte) - return o -} - -// SetLastUpdatedLte adds the lastUpdatedLte to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { - o.LastUpdatedLte = lastUpdatedLte -} - -// WithLimit adds the limit to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithLimit(limit *int64) *SecretsSecretRolesListParams { - o.SetLimit(limit) - return o -} - -// SetLimit adds the limit to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetLimit(limit *int64) { - o.Limit = limit -} - -// WithName adds the name to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithName(name *string) *SecretsSecretRolesListParams { - o.SetName(name) - return o -} - -// SetName adds the name to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetName(name *string) { - o.Name = name -} - -// WithNameEmpty adds the nameEmpty to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithNameEmpty(nameEmpty *string) *SecretsSecretRolesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - -// WithNameIc adds the nameIc to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithNameIc(nameIc *string) *SecretsSecretRolesListParams { - o.SetNameIc(nameIc) - return o -} - -// SetNameIc adds the nameIc to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetNameIc(nameIc *string) { - o.NameIc = nameIc -} - -// WithNameIe adds the nameIe to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithNameIe(nameIe *string) *SecretsSecretRolesListParams { - o.SetNameIe(nameIe) - return o -} - -// SetNameIe adds the nameIe to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetNameIe(nameIe *string) { - o.NameIe = nameIe -} - -// WithNameIew adds the nameIew to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithNameIew(nameIew *string) *SecretsSecretRolesListParams { - o.SetNameIew(nameIew) - return o -} - -// SetNameIew adds the nameIew to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetNameIew(nameIew *string) { - o.NameIew = nameIew -} - -// WithNameIsw adds the nameIsw to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithNameIsw(nameIsw *string) *SecretsSecretRolesListParams { - o.SetNameIsw(nameIsw) - return o -} - -// SetNameIsw adds the nameIsw to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetNameIsw(nameIsw *string) { - o.NameIsw = nameIsw -} - -// WithNamen adds the namen to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithNamen(namen *string) *SecretsSecretRolesListParams { - o.SetNamen(namen) - return o -} - -// SetNamen adds the nameN to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetNamen(namen *string) { - o.Namen = namen -} - -// WithNameNic adds the nameNic to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithNameNic(nameNic *string) *SecretsSecretRolesListParams { - o.SetNameNic(nameNic) - return o -} - -// SetNameNic adds the nameNic to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetNameNic(nameNic *string) { - o.NameNic = nameNic -} - -// WithNameNie adds the nameNie to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithNameNie(nameNie *string) *SecretsSecretRolesListParams { - o.SetNameNie(nameNie) - return o -} - -// SetNameNie adds the nameNie to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetNameNie(nameNie *string) { - o.NameNie = nameNie -} - -// WithNameNiew adds the nameNiew to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithNameNiew(nameNiew *string) *SecretsSecretRolesListParams { - o.SetNameNiew(nameNiew) - return o -} - -// SetNameNiew adds the nameNiew to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetNameNiew(nameNiew *string) { - o.NameNiew = nameNiew -} - -// WithNameNisw adds the nameNisw to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithNameNisw(nameNisw *string) *SecretsSecretRolesListParams { - o.SetNameNisw(nameNisw) - return o -} - -// SetNameNisw adds the nameNisw to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetNameNisw(nameNisw *string) { - o.NameNisw = nameNisw -} - -// WithOffset adds the offset to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithOffset(offset *int64) *SecretsSecretRolesListParams { - o.SetOffset(offset) - return o -} - -// SetOffset adds the offset to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetOffset(offset *int64) { - o.Offset = offset -} - -// WithQ adds the q to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithQ(q *string) *SecretsSecretRolesListParams { - o.SetQ(q) - return o -} - -// SetQ adds the q to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetQ(q *string) { - o.Q = q -} - -// WithSlug adds the slug to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithSlug(slug *string) *SecretsSecretRolesListParams { - o.SetSlug(slug) - return o -} - -// SetSlug adds the slug to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetSlug(slug *string) { - o.Slug = slug -} - -// WithSlugEmpty adds the slugEmpty to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithSlugEmpty(slugEmpty *string) *SecretsSecretRolesListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - -// WithSlugIc adds the slugIc to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithSlugIc(slugIc *string) *SecretsSecretRolesListParams { - o.SetSlugIc(slugIc) - return o -} - -// SetSlugIc adds the slugIc to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetSlugIc(slugIc *string) { - o.SlugIc = slugIc -} - -// WithSlugIe adds the slugIe to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithSlugIe(slugIe *string) *SecretsSecretRolesListParams { - o.SetSlugIe(slugIe) - return o -} - -// SetSlugIe adds the slugIe to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetSlugIe(slugIe *string) { - o.SlugIe = slugIe -} - -// WithSlugIew adds the slugIew to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithSlugIew(slugIew *string) *SecretsSecretRolesListParams { - o.SetSlugIew(slugIew) - return o -} - -// SetSlugIew adds the slugIew to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetSlugIew(slugIew *string) { - o.SlugIew = slugIew -} - -// WithSlugIsw adds the slugIsw to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithSlugIsw(slugIsw *string) *SecretsSecretRolesListParams { - o.SetSlugIsw(slugIsw) - return o -} - -// SetSlugIsw adds the slugIsw to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetSlugIsw(slugIsw *string) { - o.SlugIsw = slugIsw -} - -// WithSlugn adds the slugn to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithSlugn(slugn *string) *SecretsSecretRolesListParams { - o.SetSlugn(slugn) - return o -} - -// SetSlugn adds the slugN to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetSlugn(slugn *string) { - o.Slugn = slugn -} - -// WithSlugNic adds the slugNic to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithSlugNic(slugNic *string) *SecretsSecretRolesListParams { - o.SetSlugNic(slugNic) - return o -} - -// SetSlugNic adds the slugNic to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetSlugNic(slugNic *string) { - o.SlugNic = slugNic -} - -// WithSlugNie adds the slugNie to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithSlugNie(slugNie *string) *SecretsSecretRolesListParams { - o.SetSlugNie(slugNie) - return o -} - -// SetSlugNie adds the slugNie to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetSlugNie(slugNie *string) { - o.SlugNie = slugNie -} - -// WithSlugNiew adds the slugNiew to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithSlugNiew(slugNiew *string) *SecretsSecretRolesListParams { - o.SetSlugNiew(slugNiew) - return o -} - -// SetSlugNiew adds the slugNiew to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetSlugNiew(slugNiew *string) { - o.SlugNiew = slugNiew -} - -// WithSlugNisw adds the slugNisw to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) WithSlugNisw(slugNisw *string) *SecretsSecretRolesListParams { - o.SetSlugNisw(slugNisw) - return o -} - -// SetSlugNisw adds the slugNisw to the secrets secret roles list params -func (o *SecretsSecretRolesListParams) SetSlugNisw(slugNisw *string) { - o.SlugNisw = slugNisw -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Created != nil { - - // query param created - var qrCreated string - - if o.Created != nil { - qrCreated = *o.Created - } - qCreated := qrCreated - if qCreated != "" { - - if err := r.SetQueryParam("created", qCreated); err != nil { - return err - } - } - } - - if o.CreatedGte != nil { - - // query param created__gte - var qrCreatedGte string - - if o.CreatedGte != nil { - qrCreatedGte = *o.CreatedGte - } - qCreatedGte := qrCreatedGte - if qCreatedGte != "" { - - if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { - return err - } - } - } - - if o.CreatedLte != nil { - - // query param created__lte - var qrCreatedLte string - - if o.CreatedLte != nil { - qrCreatedLte = *o.CreatedLte - } - qCreatedLte := qrCreatedLte - if qCreatedLte != "" { - - if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { - return err - } - } - } - - if o.ID != nil { - - // query param id - var qrID string - - if o.ID != nil { - qrID = *o.ID - } - qID := qrID - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if o.IDGt != nil { - - // query param id__gt - var qrIDGt string - - if o.IDGt != nil { - qrIDGt = *o.IDGt - } - qIDGt := qrIDGt - if qIDGt != "" { - - if err := r.SetQueryParam("id__gt", qIDGt); err != nil { - return err - } - } - } - - if o.IDGte != nil { - - // query param id__gte - var qrIDGte string - - if o.IDGte != nil { - qrIDGte = *o.IDGte - } - qIDGte := qrIDGte - if qIDGte != "" { - - if err := r.SetQueryParam("id__gte", qIDGte); err != nil { - return err - } - } - } - - if o.IDLt != nil { - - // query param id__lt - var qrIDLt string - - if o.IDLt != nil { - qrIDLt = *o.IDLt - } - qIDLt := qrIDLt - if qIDLt != "" { - - if err := r.SetQueryParam("id__lt", qIDLt); err != nil { - return err - } - } - } - - if o.IDLte != nil { - - // query param id__lte - var qrIDLte string - - if o.IDLte != nil { - qrIDLte = *o.IDLte - } - qIDLte := qrIDLte - if qIDLte != "" { - - if err := r.SetQueryParam("id__lte", qIDLte); err != nil { - return err - } - } - } - - if o.IDn != nil { - - // query param id__n - var qrIDn string - - if o.IDn != nil { - qrIDn = *o.IDn - } - qIDn := qrIDn - if qIDn != "" { - - if err := r.SetQueryParam("id__n", qIDn); err != nil { - return err - } - } - } - - if o.LastUpdated != nil { - - // query param last_updated - var qrLastUpdated string - - if o.LastUpdated != nil { - qrLastUpdated = *o.LastUpdated - } - qLastUpdated := qrLastUpdated - if qLastUpdated != "" { - - if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { - return err - } - } - } - - if o.LastUpdatedGte != nil { - - // query param last_updated__gte - var qrLastUpdatedGte string - - if o.LastUpdatedGte != nil { - qrLastUpdatedGte = *o.LastUpdatedGte - } - qLastUpdatedGte := qrLastUpdatedGte - if qLastUpdatedGte != "" { - - if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { - return err - } - } - } - - if o.LastUpdatedLte != nil { - - // query param last_updated__lte - var qrLastUpdatedLte string - - if o.LastUpdatedLte != nil { - qrLastUpdatedLte = *o.LastUpdatedLte - } - qLastUpdatedLte := qrLastUpdatedLte - if qLastUpdatedLte != "" { - - if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); 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.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - - if o.NameIc != nil { - - // query param name__ic - var qrNameIc string - - if o.NameIc != nil { - qrNameIc = *o.NameIc - } - qNameIc := qrNameIc - if qNameIc != "" { - - if err := r.SetQueryParam("name__ic", qNameIc); err != nil { - return err - } - } - } - - if o.NameIe != nil { - - // query param name__ie - var qrNameIe string - - if o.NameIe != nil { - qrNameIe = *o.NameIe - } - qNameIe := qrNameIe - if qNameIe != "" { - - if err := r.SetQueryParam("name__ie", qNameIe); err != nil { - return err - } - } - } - - if o.NameIew != nil { - - // query param name__iew - var qrNameIew string - - if o.NameIew != nil { - qrNameIew = *o.NameIew - } - qNameIew := qrNameIew - if qNameIew != "" { - - if err := r.SetQueryParam("name__iew", qNameIew); err != nil { - return err - } - } - } - - if o.NameIsw != nil { - - // query param name__isw - var qrNameIsw string - - if o.NameIsw != nil { - qrNameIsw = *o.NameIsw - } - qNameIsw := qrNameIsw - if qNameIsw != "" { - - if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { - return err - } - } - } - - if o.Namen != nil { - - // query param name__n - var qrNamen string - - if o.Namen != nil { - qrNamen = *o.Namen - } - qNamen := qrNamen - if qNamen != "" { - - if err := r.SetQueryParam("name__n", qNamen); err != nil { - return err - } - } - } - - if o.NameNic != nil { - - // query param name__nic - var qrNameNic string - - if o.NameNic != nil { - qrNameNic = *o.NameNic - } - qNameNic := qrNameNic - if qNameNic != "" { - - if err := r.SetQueryParam("name__nic", qNameNic); err != nil { - return err - } - } - } - - if o.NameNie != nil { - - // query param name__nie - var qrNameNie string - - if o.NameNie != nil { - qrNameNie = *o.NameNie - } - qNameNie := qrNameNie - if qNameNie != "" { - - if err := r.SetQueryParam("name__nie", qNameNie); err != nil { - return err - } - } - } - - if o.NameNiew != nil { - - // query param name__niew - var qrNameNiew string - - if o.NameNiew != nil { - qrNameNiew = *o.NameNiew - } - qNameNiew := qrNameNiew - if qNameNiew != "" { - - if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { - return err - } - } - } - - if o.NameNisw != nil { - - // query param name__nisw - var qrNameNisw string - - if o.NameNisw != nil { - qrNameNisw = *o.NameNisw - } - qNameNisw := qrNameNisw - if qNameNisw != "" { - - if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { - return err - } - } - } - - if o.Offset != nil { - - // query param offset - var qrOffset int64 - - if o.Offset != nil { - qrOffset = *o.Offset - } - qOffset := swag.FormatInt64(qrOffset) - if qOffset != "" { - - if err := r.SetQueryParam("offset", qOffset); err != nil { - return err - } - } - } - - if o.Q != nil { - - // query param q - var qrQ string - - if o.Q != nil { - qrQ = *o.Q - } - qQ := qrQ - if qQ != "" { - - if err := r.SetQueryParam("q", qQ); err != nil { - return err - } - } - } - - if o.Slug != nil { - - // query param slug - var qrSlug string - - if o.Slug != nil { - qrSlug = *o.Slug - } - qSlug := qrSlug - if qSlug != "" { - - if err := r.SetQueryParam("slug", qSlug); err != nil { - return err - } - } - } - - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - - if o.SlugIc != nil { - - // query param slug__ic - var qrSlugIc string - - if o.SlugIc != nil { - qrSlugIc = *o.SlugIc - } - qSlugIc := qrSlugIc - if qSlugIc != "" { - - if err := r.SetQueryParam("slug__ic", qSlugIc); err != nil { - return err - } - } - } - - if o.SlugIe != nil { - - // query param slug__ie - var qrSlugIe string - - if o.SlugIe != nil { - qrSlugIe = *o.SlugIe - } - qSlugIe := qrSlugIe - if qSlugIe != "" { - - if err := r.SetQueryParam("slug__ie", qSlugIe); err != nil { - return err - } - } - } - - if o.SlugIew != nil { - - // query param slug__iew - var qrSlugIew string - - if o.SlugIew != nil { - qrSlugIew = *o.SlugIew - } - qSlugIew := qrSlugIew - if qSlugIew != "" { - - if err := r.SetQueryParam("slug__iew", qSlugIew); err != nil { - return err - } - } - } - - if o.SlugIsw != nil { - - // query param slug__isw - var qrSlugIsw string - - if o.SlugIsw != nil { - qrSlugIsw = *o.SlugIsw - } - qSlugIsw := qrSlugIsw - if qSlugIsw != "" { - - if err := r.SetQueryParam("slug__isw", qSlugIsw); err != nil { - return err - } - } - } - - if o.Slugn != nil { - - // query param slug__n - var qrSlugn string - - if o.Slugn != nil { - qrSlugn = *o.Slugn - } - qSlugn := qrSlugn - if qSlugn != "" { - - if err := r.SetQueryParam("slug__n", qSlugn); err != nil { - return err - } - } - } - - if o.SlugNic != nil { - - // query param slug__nic - var qrSlugNic string - - if o.SlugNic != nil { - qrSlugNic = *o.SlugNic - } - qSlugNic := qrSlugNic - if qSlugNic != "" { - - if err := r.SetQueryParam("slug__nic", qSlugNic); err != nil { - return err - } - } - } - - if o.SlugNie != nil { - - // query param slug__nie - var qrSlugNie string - - if o.SlugNie != nil { - qrSlugNie = *o.SlugNie - } - qSlugNie := qrSlugNie - if qSlugNie != "" { - - if err := r.SetQueryParam("slug__nie", qSlugNie); err != nil { - return err - } - } - } - - if o.SlugNiew != nil { - - // query param slug__niew - var qrSlugNiew string - - if o.SlugNiew != nil { - qrSlugNiew = *o.SlugNiew - } - qSlugNiew := qrSlugNiew - if qSlugNiew != "" { - - if err := r.SetQueryParam("slug__niew", qSlugNiew); err != nil { - return err - } - } - } - - if o.SlugNisw != nil { - - // query param slug__nisw - var qrSlugNisw string - - if o.SlugNisw != nil { - qrSlugNisw = *o.SlugNisw - } - qSlugNisw := qrSlugNisw - if qSlugNisw != "" { - - if err := r.SetQueryParam("slug__nisw", qSlugNisw); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/secrets/secrets_secret_roles_partial_update_parameters.go b/netbox/client/secrets/secrets_secret_roles_partial_update_parameters.go deleted file mode 100644 index b7b07d165..000000000 --- a/netbox/client/secrets/secrets_secret_roles_partial_update_parameters.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewSecretsSecretRolesPartialUpdateParams creates a new SecretsSecretRolesPartialUpdateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretRolesPartialUpdateParams() *SecretsSecretRolesPartialUpdateParams { - return &SecretsSecretRolesPartialUpdateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretRolesPartialUpdateParamsWithTimeout creates a new SecretsSecretRolesPartialUpdateParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretRolesPartialUpdateParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesPartialUpdateParams { - return &SecretsSecretRolesPartialUpdateParams{ - timeout: timeout, - } -} - -// NewSecretsSecretRolesPartialUpdateParamsWithContext creates a new SecretsSecretRolesPartialUpdateParams object -// with the ability to set a context for a request. -func NewSecretsSecretRolesPartialUpdateParamsWithContext(ctx context.Context) *SecretsSecretRolesPartialUpdateParams { - return &SecretsSecretRolesPartialUpdateParams{ - Context: ctx, - } -} - -// NewSecretsSecretRolesPartialUpdateParamsWithHTTPClient creates a new SecretsSecretRolesPartialUpdateParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretRolesPartialUpdateParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesPartialUpdateParams { - return &SecretsSecretRolesPartialUpdateParams{ - HTTPClient: client, - } -} - -/* SecretsSecretRolesPartialUpdateParams contains all the parameters to send to the API endpoint - for the secrets secret roles partial update operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretRolesPartialUpdateParams struct { - - // Data. - Data *models.SecretRole - - /* ID. - - A unique integer value identifying this secret role. - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secret roles partial update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesPartialUpdateParams) WithDefaults() *SecretsSecretRolesPartialUpdateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secret roles partial update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesPartialUpdateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secret roles partial update params -func (o *SecretsSecretRolesPartialUpdateParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesPartialUpdateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secret roles partial update params -func (o *SecretsSecretRolesPartialUpdateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secret roles partial update params -func (o *SecretsSecretRolesPartialUpdateParams) WithContext(ctx context.Context) *SecretsSecretRolesPartialUpdateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secret roles partial update params -func (o *SecretsSecretRolesPartialUpdateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secret roles partial update params -func (o *SecretsSecretRolesPartialUpdateParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesPartialUpdateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secret roles partial update params -func (o *SecretsSecretRolesPartialUpdateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the secrets secret roles partial update params -func (o *SecretsSecretRolesPartialUpdateParams) WithData(data *models.SecretRole) *SecretsSecretRolesPartialUpdateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the secrets secret roles partial update params -func (o *SecretsSecretRolesPartialUpdateParams) SetData(data *models.SecretRole) { - o.Data = data -} - -// WithID adds the id to the secrets secret roles partial update params -func (o *SecretsSecretRolesPartialUpdateParams) WithID(id int64) *SecretsSecretRolesPartialUpdateParams { - o.SetID(id) - return o -} - -// SetID adds the id to the secrets secret roles partial update params -func (o *SecretsSecretRolesPartialUpdateParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretRolesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Data != nil { - if err := r.SetBodyParam(o.Data); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/secrets/secrets_secret_roles_read_parameters.go b/netbox/client/secrets/secrets_secret_roles_read_parameters.go deleted file mode 100644 index 98410a87c..000000000 --- a/netbox/client/secrets/secrets_secret_roles_read_parameters.go +++ /dev/null @@ -1,165 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewSecretsSecretRolesReadParams creates a new SecretsSecretRolesReadParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretRolesReadParams() *SecretsSecretRolesReadParams { - return &SecretsSecretRolesReadParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretRolesReadParamsWithTimeout creates a new SecretsSecretRolesReadParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretRolesReadParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesReadParams { - return &SecretsSecretRolesReadParams{ - timeout: timeout, - } -} - -// NewSecretsSecretRolesReadParamsWithContext creates a new SecretsSecretRolesReadParams object -// with the ability to set a context for a request. -func NewSecretsSecretRolesReadParamsWithContext(ctx context.Context) *SecretsSecretRolesReadParams { - return &SecretsSecretRolesReadParams{ - Context: ctx, - } -} - -// NewSecretsSecretRolesReadParamsWithHTTPClient creates a new SecretsSecretRolesReadParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretRolesReadParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesReadParams { - return &SecretsSecretRolesReadParams{ - HTTPClient: client, - } -} - -/* SecretsSecretRolesReadParams contains all the parameters to send to the API endpoint - for the secrets secret roles read operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretRolesReadParams struct { - - /* ID. - - A unique integer value identifying this secret role. - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secret roles read params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesReadParams) WithDefaults() *SecretsSecretRolesReadParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secret roles read params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesReadParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secret roles read params -func (o *SecretsSecretRolesReadParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesReadParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secret roles read params -func (o *SecretsSecretRolesReadParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secret roles read params -func (o *SecretsSecretRolesReadParams) WithContext(ctx context.Context) *SecretsSecretRolesReadParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secret roles read params -func (o *SecretsSecretRolesReadParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secret roles read params -func (o *SecretsSecretRolesReadParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesReadParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secret roles read params -func (o *SecretsSecretRolesReadParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the secrets secret roles read params -func (o *SecretsSecretRolesReadParams) WithID(id int64) *SecretsSecretRolesReadParams { - o.SetID(id) - return o -} - -// SetID adds the id to the secrets secret roles read params -func (o *SecretsSecretRolesReadParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretRolesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/secrets/secrets_secret_roles_update_parameters.go b/netbox/client/secrets/secrets_secret_roles_update_parameters.go deleted file mode 100644 index c15f986f8..000000000 --- a/netbox/client/secrets/secrets_secret_roles_update_parameters.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewSecretsSecretRolesUpdateParams creates a new SecretsSecretRolesUpdateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretRolesUpdateParams() *SecretsSecretRolesUpdateParams { - return &SecretsSecretRolesUpdateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretRolesUpdateParamsWithTimeout creates a new SecretsSecretRolesUpdateParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretRolesUpdateParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesUpdateParams { - return &SecretsSecretRolesUpdateParams{ - timeout: timeout, - } -} - -// NewSecretsSecretRolesUpdateParamsWithContext creates a new SecretsSecretRolesUpdateParams object -// with the ability to set a context for a request. -func NewSecretsSecretRolesUpdateParamsWithContext(ctx context.Context) *SecretsSecretRolesUpdateParams { - return &SecretsSecretRolesUpdateParams{ - Context: ctx, - } -} - -// NewSecretsSecretRolesUpdateParamsWithHTTPClient creates a new SecretsSecretRolesUpdateParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretRolesUpdateParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesUpdateParams { - return &SecretsSecretRolesUpdateParams{ - HTTPClient: client, - } -} - -/* SecretsSecretRolesUpdateParams contains all the parameters to send to the API endpoint - for the secrets secret roles update operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretRolesUpdateParams struct { - - // Data. - Data *models.SecretRole - - /* ID. - - A unique integer value identifying this secret role. - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secret roles update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesUpdateParams) WithDefaults() *SecretsSecretRolesUpdateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secret roles update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretRolesUpdateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secret roles update params -func (o *SecretsSecretRolesUpdateParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesUpdateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secret roles update params -func (o *SecretsSecretRolesUpdateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secret roles update params -func (o *SecretsSecretRolesUpdateParams) WithContext(ctx context.Context) *SecretsSecretRolesUpdateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secret roles update params -func (o *SecretsSecretRolesUpdateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secret roles update params -func (o *SecretsSecretRolesUpdateParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesUpdateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secret roles update params -func (o *SecretsSecretRolesUpdateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the secrets secret roles update params -func (o *SecretsSecretRolesUpdateParams) WithData(data *models.SecretRole) *SecretsSecretRolesUpdateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the secrets secret roles update params -func (o *SecretsSecretRolesUpdateParams) SetData(data *models.SecretRole) { - o.Data = data -} - -// WithID adds the id to the secrets secret roles update params -func (o *SecretsSecretRolesUpdateParams) WithID(id int64) *SecretsSecretRolesUpdateParams { - o.SetID(id) - return o -} - -// SetID adds the id to the secrets secret roles update params -func (o *SecretsSecretRolesUpdateParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretRolesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Data != nil { - if err := r.SetBodyParam(o.Data); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/secrets/secrets_secrets_bulk_delete_parameters.go b/netbox/client/secrets/secrets_secrets_bulk_delete_parameters.go deleted file mode 100644 index 9cea68ba2..000000000 --- a/netbox/client/secrets/secrets_secrets_bulk_delete_parameters.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewSecretsSecretsBulkDeleteParams creates a new SecretsSecretsBulkDeleteParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretsBulkDeleteParams() *SecretsSecretsBulkDeleteParams { - return &SecretsSecretsBulkDeleteParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretsBulkDeleteParamsWithTimeout creates a new SecretsSecretsBulkDeleteParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretsBulkDeleteParamsWithTimeout(timeout time.Duration) *SecretsSecretsBulkDeleteParams { - return &SecretsSecretsBulkDeleteParams{ - timeout: timeout, - } -} - -// NewSecretsSecretsBulkDeleteParamsWithContext creates a new SecretsSecretsBulkDeleteParams object -// with the ability to set a context for a request. -func NewSecretsSecretsBulkDeleteParamsWithContext(ctx context.Context) *SecretsSecretsBulkDeleteParams { - return &SecretsSecretsBulkDeleteParams{ - Context: ctx, - } -} - -// NewSecretsSecretsBulkDeleteParamsWithHTTPClient creates a new SecretsSecretsBulkDeleteParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretsBulkDeleteParamsWithHTTPClient(client *http.Client) *SecretsSecretsBulkDeleteParams { - return &SecretsSecretsBulkDeleteParams{ - HTTPClient: client, - } -} - -/* SecretsSecretsBulkDeleteParams contains all the parameters to send to the API endpoint - for the secrets secrets bulk delete operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretsBulkDeleteParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secrets bulk delete params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsBulkDeleteParams) WithDefaults() *SecretsSecretsBulkDeleteParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secrets bulk delete params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsBulkDeleteParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secrets bulk delete params -func (o *SecretsSecretsBulkDeleteParams) WithTimeout(timeout time.Duration) *SecretsSecretsBulkDeleteParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secrets bulk delete params -func (o *SecretsSecretsBulkDeleteParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secrets bulk delete params -func (o *SecretsSecretsBulkDeleteParams) WithContext(ctx context.Context) *SecretsSecretsBulkDeleteParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secrets bulk delete params -func (o *SecretsSecretsBulkDeleteParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secrets bulk delete params -func (o *SecretsSecretsBulkDeleteParams) WithHTTPClient(client *http.Client) *SecretsSecretsBulkDeleteParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secrets bulk delete params -func (o *SecretsSecretsBulkDeleteParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretsBulkDeleteParams) 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/netbox/client/secrets/secrets_secrets_bulk_partial_update_parameters.go b/netbox/client/secrets/secrets_secrets_bulk_partial_update_parameters.go deleted file mode 100644 index cf0a858f1..000000000 --- a/netbox/client/secrets/secrets_secrets_bulk_partial_update_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewSecretsSecretsBulkPartialUpdateParams creates a new SecretsSecretsBulkPartialUpdateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretsBulkPartialUpdateParams() *SecretsSecretsBulkPartialUpdateParams { - return &SecretsSecretsBulkPartialUpdateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretsBulkPartialUpdateParamsWithTimeout creates a new SecretsSecretsBulkPartialUpdateParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretsBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *SecretsSecretsBulkPartialUpdateParams { - return &SecretsSecretsBulkPartialUpdateParams{ - timeout: timeout, - } -} - -// NewSecretsSecretsBulkPartialUpdateParamsWithContext creates a new SecretsSecretsBulkPartialUpdateParams object -// with the ability to set a context for a request. -func NewSecretsSecretsBulkPartialUpdateParamsWithContext(ctx context.Context) *SecretsSecretsBulkPartialUpdateParams { - return &SecretsSecretsBulkPartialUpdateParams{ - Context: ctx, - } -} - -// NewSecretsSecretsBulkPartialUpdateParamsWithHTTPClient creates a new SecretsSecretsBulkPartialUpdateParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretsBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *SecretsSecretsBulkPartialUpdateParams { - return &SecretsSecretsBulkPartialUpdateParams{ - HTTPClient: client, - } -} - -/* SecretsSecretsBulkPartialUpdateParams contains all the parameters to send to the API endpoint - for the secrets secrets bulk partial update operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretsBulkPartialUpdateParams struct { - - // Data. - Data *models.WritableSecret - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secrets bulk partial update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsBulkPartialUpdateParams) WithDefaults() *SecretsSecretsBulkPartialUpdateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secrets bulk partial update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsBulkPartialUpdateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secrets bulk partial update params -func (o *SecretsSecretsBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *SecretsSecretsBulkPartialUpdateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secrets bulk partial update params -func (o *SecretsSecretsBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secrets bulk partial update params -func (o *SecretsSecretsBulkPartialUpdateParams) WithContext(ctx context.Context) *SecretsSecretsBulkPartialUpdateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secrets bulk partial update params -func (o *SecretsSecretsBulkPartialUpdateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secrets bulk partial update params -func (o *SecretsSecretsBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *SecretsSecretsBulkPartialUpdateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secrets bulk partial update params -func (o *SecretsSecretsBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the secrets secrets bulk partial update params -func (o *SecretsSecretsBulkPartialUpdateParams) WithData(data *models.WritableSecret) *SecretsSecretsBulkPartialUpdateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the secrets secrets bulk partial update params -func (o *SecretsSecretsBulkPartialUpdateParams) SetData(data *models.WritableSecret) { - o.Data = data -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretsBulkPartialUpdateParams) 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/netbox/client/secrets/secrets_secrets_bulk_partial_update_responses.go b/netbox/client/secrets/secrets_secrets_bulk_partial_update_responses.go deleted file mode 100644 index 8241481f1..000000000 --- a/netbox/client/secrets/secrets_secrets_bulk_partial_update_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// SecretsSecretsBulkPartialUpdateReader is a Reader for the SecretsSecretsBulkPartialUpdate structure. -type SecretsSecretsBulkPartialUpdateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SecretsSecretsBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSecretsSecretsBulkPartialUpdateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewSecretsSecretsBulkPartialUpdateOK creates a SecretsSecretsBulkPartialUpdateOK with default headers values -func NewSecretsSecretsBulkPartialUpdateOK() *SecretsSecretsBulkPartialUpdateOK { - return &SecretsSecretsBulkPartialUpdateOK{} -} - -/* SecretsSecretsBulkPartialUpdateOK describes a response with status code 200, with default header values. - -SecretsSecretsBulkPartialUpdateOK secrets secrets bulk partial update o k -*/ -type SecretsSecretsBulkPartialUpdateOK struct { - Payload *models.Secret -} - -func (o *SecretsSecretsBulkPartialUpdateOK) Error() string { - return fmt.Sprintf("[PATCH /secrets/secrets/][%d] secretsSecretsBulkPartialUpdateOK %+v", 200, o.Payload) -} -func (o *SecretsSecretsBulkPartialUpdateOK) GetPayload() *models.Secret { - return o.Payload -} - -func (o *SecretsSecretsBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Secret) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/netbox/client/secrets/secrets_secrets_bulk_update_parameters.go b/netbox/client/secrets/secrets_secrets_bulk_update_parameters.go deleted file mode 100644 index 1c82146ef..000000000 --- a/netbox/client/secrets/secrets_secrets_bulk_update_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewSecretsSecretsBulkUpdateParams creates a new SecretsSecretsBulkUpdateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretsBulkUpdateParams() *SecretsSecretsBulkUpdateParams { - return &SecretsSecretsBulkUpdateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretsBulkUpdateParamsWithTimeout creates a new SecretsSecretsBulkUpdateParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretsBulkUpdateParamsWithTimeout(timeout time.Duration) *SecretsSecretsBulkUpdateParams { - return &SecretsSecretsBulkUpdateParams{ - timeout: timeout, - } -} - -// NewSecretsSecretsBulkUpdateParamsWithContext creates a new SecretsSecretsBulkUpdateParams object -// with the ability to set a context for a request. -func NewSecretsSecretsBulkUpdateParamsWithContext(ctx context.Context) *SecretsSecretsBulkUpdateParams { - return &SecretsSecretsBulkUpdateParams{ - Context: ctx, - } -} - -// NewSecretsSecretsBulkUpdateParamsWithHTTPClient creates a new SecretsSecretsBulkUpdateParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretsBulkUpdateParamsWithHTTPClient(client *http.Client) *SecretsSecretsBulkUpdateParams { - return &SecretsSecretsBulkUpdateParams{ - HTTPClient: client, - } -} - -/* SecretsSecretsBulkUpdateParams contains all the parameters to send to the API endpoint - for the secrets secrets bulk update operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretsBulkUpdateParams struct { - - // Data. - Data *models.WritableSecret - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secrets bulk update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsBulkUpdateParams) WithDefaults() *SecretsSecretsBulkUpdateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secrets bulk update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsBulkUpdateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secrets bulk update params -func (o *SecretsSecretsBulkUpdateParams) WithTimeout(timeout time.Duration) *SecretsSecretsBulkUpdateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secrets bulk update params -func (o *SecretsSecretsBulkUpdateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secrets bulk update params -func (o *SecretsSecretsBulkUpdateParams) WithContext(ctx context.Context) *SecretsSecretsBulkUpdateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secrets bulk update params -func (o *SecretsSecretsBulkUpdateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secrets bulk update params -func (o *SecretsSecretsBulkUpdateParams) WithHTTPClient(client *http.Client) *SecretsSecretsBulkUpdateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secrets bulk update params -func (o *SecretsSecretsBulkUpdateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the secrets secrets bulk update params -func (o *SecretsSecretsBulkUpdateParams) WithData(data *models.WritableSecret) *SecretsSecretsBulkUpdateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the secrets secrets bulk update params -func (o *SecretsSecretsBulkUpdateParams) SetData(data *models.WritableSecret) { - o.Data = data -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretsBulkUpdateParams) 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/netbox/client/secrets/secrets_secrets_create_parameters.go b/netbox/client/secrets/secrets_secrets_create_parameters.go deleted file mode 100644 index 1a632028c..000000000 --- a/netbox/client/secrets/secrets_secrets_create_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewSecretsSecretsCreateParams creates a new SecretsSecretsCreateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretsCreateParams() *SecretsSecretsCreateParams { - return &SecretsSecretsCreateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretsCreateParamsWithTimeout creates a new SecretsSecretsCreateParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretsCreateParamsWithTimeout(timeout time.Duration) *SecretsSecretsCreateParams { - return &SecretsSecretsCreateParams{ - timeout: timeout, - } -} - -// NewSecretsSecretsCreateParamsWithContext creates a new SecretsSecretsCreateParams object -// with the ability to set a context for a request. -func NewSecretsSecretsCreateParamsWithContext(ctx context.Context) *SecretsSecretsCreateParams { - return &SecretsSecretsCreateParams{ - Context: ctx, - } -} - -// NewSecretsSecretsCreateParamsWithHTTPClient creates a new SecretsSecretsCreateParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretsCreateParamsWithHTTPClient(client *http.Client) *SecretsSecretsCreateParams { - return &SecretsSecretsCreateParams{ - HTTPClient: client, - } -} - -/* SecretsSecretsCreateParams contains all the parameters to send to the API endpoint - for the secrets secrets create operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretsCreateParams struct { - - // Data. - Data *models.WritableSecret - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secrets create params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsCreateParams) WithDefaults() *SecretsSecretsCreateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secrets create params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsCreateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secrets create params -func (o *SecretsSecretsCreateParams) WithTimeout(timeout time.Duration) *SecretsSecretsCreateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secrets create params -func (o *SecretsSecretsCreateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secrets create params -func (o *SecretsSecretsCreateParams) WithContext(ctx context.Context) *SecretsSecretsCreateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secrets create params -func (o *SecretsSecretsCreateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secrets create params -func (o *SecretsSecretsCreateParams) WithHTTPClient(client *http.Client) *SecretsSecretsCreateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secrets create params -func (o *SecretsSecretsCreateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the secrets secrets create params -func (o *SecretsSecretsCreateParams) WithData(data *models.WritableSecret) *SecretsSecretsCreateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the secrets secrets create params -func (o *SecretsSecretsCreateParams) SetData(data *models.WritableSecret) { - o.Data = data -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Data != nil { - if err := r.SetBodyParam(o.Data); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/secrets/secrets_secrets_delete_parameters.go b/netbox/client/secrets/secrets_secrets_delete_parameters.go deleted file mode 100644 index 6bd93b421..000000000 --- a/netbox/client/secrets/secrets_secrets_delete_parameters.go +++ /dev/null @@ -1,165 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewSecretsSecretsDeleteParams creates a new SecretsSecretsDeleteParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretsDeleteParams() *SecretsSecretsDeleteParams { - return &SecretsSecretsDeleteParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretsDeleteParamsWithTimeout creates a new SecretsSecretsDeleteParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretsDeleteParamsWithTimeout(timeout time.Duration) *SecretsSecretsDeleteParams { - return &SecretsSecretsDeleteParams{ - timeout: timeout, - } -} - -// NewSecretsSecretsDeleteParamsWithContext creates a new SecretsSecretsDeleteParams object -// with the ability to set a context for a request. -func NewSecretsSecretsDeleteParamsWithContext(ctx context.Context) *SecretsSecretsDeleteParams { - return &SecretsSecretsDeleteParams{ - Context: ctx, - } -} - -// NewSecretsSecretsDeleteParamsWithHTTPClient creates a new SecretsSecretsDeleteParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretsDeleteParamsWithHTTPClient(client *http.Client) *SecretsSecretsDeleteParams { - return &SecretsSecretsDeleteParams{ - HTTPClient: client, - } -} - -/* SecretsSecretsDeleteParams contains all the parameters to send to the API endpoint - for the secrets secrets delete operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretsDeleteParams struct { - - /* ID. - - A unique integer value identifying this secret. - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secrets delete params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsDeleteParams) WithDefaults() *SecretsSecretsDeleteParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secrets delete params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsDeleteParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secrets delete params -func (o *SecretsSecretsDeleteParams) WithTimeout(timeout time.Duration) *SecretsSecretsDeleteParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secrets delete params -func (o *SecretsSecretsDeleteParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secrets delete params -func (o *SecretsSecretsDeleteParams) WithContext(ctx context.Context) *SecretsSecretsDeleteParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secrets delete params -func (o *SecretsSecretsDeleteParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secrets delete params -func (o *SecretsSecretsDeleteParams) WithHTTPClient(client *http.Client) *SecretsSecretsDeleteParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secrets delete params -func (o *SecretsSecretsDeleteParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the secrets secrets delete params -func (o *SecretsSecretsDeleteParams) WithID(id int64) *SecretsSecretsDeleteParams { - o.SetID(id) - return o -} - -// SetID adds the id to the secrets secrets delete params -func (o *SecretsSecretsDeleteParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/secrets/secrets_secrets_list_parameters.go b/netbox/client/secrets/secrets_secrets_list_parameters.go deleted file mode 100644 index fbd2d8e06..000000000 --- a/netbox/client/secrets/secrets_secrets_list_parameters.go +++ /dev/null @@ -1,1389 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewSecretsSecretsListParams creates a new SecretsSecretsListParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretsListParams() *SecretsSecretsListParams { - return &SecretsSecretsListParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretsListParamsWithTimeout creates a new SecretsSecretsListParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretsListParamsWithTimeout(timeout time.Duration) *SecretsSecretsListParams { - return &SecretsSecretsListParams{ - timeout: timeout, - } -} - -// NewSecretsSecretsListParamsWithContext creates a new SecretsSecretsListParams object -// with the ability to set a context for a request. -func NewSecretsSecretsListParamsWithContext(ctx context.Context) *SecretsSecretsListParams { - return &SecretsSecretsListParams{ - Context: ctx, - } -} - -// NewSecretsSecretsListParamsWithHTTPClient creates a new SecretsSecretsListParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretsListParamsWithHTTPClient(client *http.Client) *SecretsSecretsListParams { - return &SecretsSecretsListParams{ - HTTPClient: client, - } -} - -/* SecretsSecretsListParams contains all the parameters to send to the API endpoint - for the secrets secrets list operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretsListParams struct { - - // Created. - Created *string - - // CreatedGte. - CreatedGte *string - - // CreatedLte. - CreatedLte *string - - // Device. - Device *string - - // Devicen. - Devicen *string - - // DeviceID. - DeviceID *string - - // DeviceIDn. - DeviceIDn *string - - // ID. - ID *string - - // IDGt. - IDGt *string - - // IDGte. - IDGte *string - - // IDLt. - IDLt *string - - // IDLte. - IDLte *string - - // IDn. - IDn *string - - // LastUpdated. - LastUpdated *string - - // LastUpdatedGte. - LastUpdatedGte *string - - // LastUpdatedLte. - LastUpdatedLte *string - - /* Limit. - - Number of results to return per page. - */ - Limit *int64 - - // Name. - Name *string - - // NameEmpty. - NameEmpty *string - - // NameIc. - NameIc *string - - // NameIe. - NameIe *string - - // NameIew. - NameIew *string - - // NameIsw. - NameIsw *string - - // Namen. - Namen *string - - // NameNic. - NameNic *string - - // NameNie. - NameNie *string - - // NameNiew. - NameNiew *string - - // NameNisw. - NameNisw *string - - /* Offset. - - The initial index from which to return the results. - */ - Offset *int64 - - // Q. - Q *string - - // Role. - Role *string - - // Rolen. - Rolen *string - - // RoleID. - RoleID *string - - // RoleIDn. - RoleIDn *string - - // Tag. - Tag *string - - // Tagn. - Tagn *string - - // VirtualMachine. - VirtualMachine *string - - // VirtualMachinen. - VirtualMachinen *string - - // VirtualMachineID. - VirtualMachineID *string - - // VirtualMachineIDn. - VirtualMachineIDn *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secrets list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsListParams) WithDefaults() *SecretsSecretsListParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secrets list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsListParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secrets list params -func (o *SecretsSecretsListParams) WithTimeout(timeout time.Duration) *SecretsSecretsListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secrets list params -func (o *SecretsSecretsListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secrets list params -func (o *SecretsSecretsListParams) WithContext(ctx context.Context) *SecretsSecretsListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secrets list params -func (o *SecretsSecretsListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secrets list params -func (o *SecretsSecretsListParams) WithHTTPClient(client *http.Client) *SecretsSecretsListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secrets list params -func (o *SecretsSecretsListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCreated adds the created to the secrets secrets list params -func (o *SecretsSecretsListParams) WithCreated(created *string) *SecretsSecretsListParams { - o.SetCreated(created) - return o -} - -// SetCreated adds the created to the secrets secrets list params -func (o *SecretsSecretsListParams) SetCreated(created *string) { - o.Created = created -} - -// WithCreatedGte adds the createdGte to the secrets secrets list params -func (o *SecretsSecretsListParams) WithCreatedGte(createdGte *string) *SecretsSecretsListParams { - o.SetCreatedGte(createdGte) - return o -} - -// SetCreatedGte adds the createdGte to the secrets secrets list params -func (o *SecretsSecretsListParams) SetCreatedGte(createdGte *string) { - o.CreatedGte = createdGte -} - -// WithCreatedLte adds the createdLte to the secrets secrets list params -func (o *SecretsSecretsListParams) WithCreatedLte(createdLte *string) *SecretsSecretsListParams { - o.SetCreatedLte(createdLte) - return o -} - -// SetCreatedLte adds the createdLte to the secrets secrets list params -func (o *SecretsSecretsListParams) SetCreatedLte(createdLte *string) { - o.CreatedLte = createdLte -} - -// WithDevice adds the device to the secrets secrets list params -func (o *SecretsSecretsListParams) WithDevice(device *string) *SecretsSecretsListParams { - o.SetDevice(device) - return o -} - -// SetDevice adds the device to the secrets secrets list params -func (o *SecretsSecretsListParams) SetDevice(device *string) { - o.Device = device -} - -// WithDevicen adds the devicen to the secrets secrets list params -func (o *SecretsSecretsListParams) WithDevicen(devicen *string) *SecretsSecretsListParams { - o.SetDevicen(devicen) - return o -} - -// SetDevicen adds the deviceN to the secrets secrets list params -func (o *SecretsSecretsListParams) SetDevicen(devicen *string) { - o.Devicen = devicen -} - -// WithDeviceID adds the deviceID to the secrets secrets list params -func (o *SecretsSecretsListParams) WithDeviceID(deviceID *string) *SecretsSecretsListParams { - o.SetDeviceID(deviceID) - return o -} - -// SetDeviceID adds the deviceId to the secrets secrets list params -func (o *SecretsSecretsListParams) SetDeviceID(deviceID *string) { - o.DeviceID = deviceID -} - -// WithDeviceIDn adds the deviceIDn to the secrets secrets list params -func (o *SecretsSecretsListParams) WithDeviceIDn(deviceIDn *string) *SecretsSecretsListParams { - o.SetDeviceIDn(deviceIDn) - return o -} - -// SetDeviceIDn adds the deviceIdN to the secrets secrets list params -func (o *SecretsSecretsListParams) SetDeviceIDn(deviceIDn *string) { - o.DeviceIDn = deviceIDn -} - -// WithID adds the id to the secrets secrets list params -func (o *SecretsSecretsListParams) WithID(id *string) *SecretsSecretsListParams { - o.SetID(id) - return o -} - -// SetID adds the id to the secrets secrets list params -func (o *SecretsSecretsListParams) SetID(id *string) { - o.ID = id -} - -// WithIDGt adds the iDGt to the secrets secrets list params -func (o *SecretsSecretsListParams) WithIDGt(iDGt *string) *SecretsSecretsListParams { - o.SetIDGt(iDGt) - return o -} - -// SetIDGt adds the idGt to the secrets secrets list params -func (o *SecretsSecretsListParams) SetIDGt(iDGt *string) { - o.IDGt = iDGt -} - -// WithIDGte adds the iDGte to the secrets secrets list params -func (o *SecretsSecretsListParams) WithIDGte(iDGte *string) *SecretsSecretsListParams { - o.SetIDGte(iDGte) - return o -} - -// SetIDGte adds the idGte to the secrets secrets list params -func (o *SecretsSecretsListParams) SetIDGte(iDGte *string) { - o.IDGte = iDGte -} - -// WithIDLt adds the iDLt to the secrets secrets list params -func (o *SecretsSecretsListParams) WithIDLt(iDLt *string) *SecretsSecretsListParams { - o.SetIDLt(iDLt) - return o -} - -// SetIDLt adds the idLt to the secrets secrets list params -func (o *SecretsSecretsListParams) SetIDLt(iDLt *string) { - o.IDLt = iDLt -} - -// WithIDLte adds the iDLte to the secrets secrets list params -func (o *SecretsSecretsListParams) WithIDLte(iDLte *string) *SecretsSecretsListParams { - o.SetIDLte(iDLte) - return o -} - -// SetIDLte adds the idLte to the secrets secrets list params -func (o *SecretsSecretsListParams) SetIDLte(iDLte *string) { - o.IDLte = iDLte -} - -// WithIDn adds the iDn to the secrets secrets list params -func (o *SecretsSecretsListParams) WithIDn(iDn *string) *SecretsSecretsListParams { - o.SetIDn(iDn) - return o -} - -// SetIDn adds the idN to the secrets secrets list params -func (o *SecretsSecretsListParams) SetIDn(iDn *string) { - o.IDn = iDn -} - -// WithLastUpdated adds the lastUpdated to the secrets secrets list params -func (o *SecretsSecretsListParams) WithLastUpdated(lastUpdated *string) *SecretsSecretsListParams { - o.SetLastUpdated(lastUpdated) - return o -} - -// SetLastUpdated adds the lastUpdated to the secrets secrets list params -func (o *SecretsSecretsListParams) SetLastUpdated(lastUpdated *string) { - o.LastUpdated = lastUpdated -} - -// WithLastUpdatedGte adds the lastUpdatedGte to the secrets secrets list params -func (o *SecretsSecretsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *SecretsSecretsListParams { - o.SetLastUpdatedGte(lastUpdatedGte) - return o -} - -// SetLastUpdatedGte adds the lastUpdatedGte to the secrets secrets list params -func (o *SecretsSecretsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { - o.LastUpdatedGte = lastUpdatedGte -} - -// WithLastUpdatedLte adds the lastUpdatedLte to the secrets secrets list params -func (o *SecretsSecretsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *SecretsSecretsListParams { - o.SetLastUpdatedLte(lastUpdatedLte) - return o -} - -// SetLastUpdatedLte adds the lastUpdatedLte to the secrets secrets list params -func (o *SecretsSecretsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { - o.LastUpdatedLte = lastUpdatedLte -} - -// WithLimit adds the limit to the secrets secrets list params -func (o *SecretsSecretsListParams) WithLimit(limit *int64) *SecretsSecretsListParams { - o.SetLimit(limit) - return o -} - -// SetLimit adds the limit to the secrets secrets list params -func (o *SecretsSecretsListParams) SetLimit(limit *int64) { - o.Limit = limit -} - -// WithName adds the name to the secrets secrets list params -func (o *SecretsSecretsListParams) WithName(name *string) *SecretsSecretsListParams { - o.SetName(name) - return o -} - -// SetName adds the name to the secrets secrets list params -func (o *SecretsSecretsListParams) SetName(name *string) { - o.Name = name -} - -// WithNameEmpty adds the nameEmpty to the secrets secrets list params -func (o *SecretsSecretsListParams) WithNameEmpty(nameEmpty *string) *SecretsSecretsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the secrets secrets list params -func (o *SecretsSecretsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - -// WithNameIc adds the nameIc to the secrets secrets list params -func (o *SecretsSecretsListParams) WithNameIc(nameIc *string) *SecretsSecretsListParams { - o.SetNameIc(nameIc) - return o -} - -// SetNameIc adds the nameIc to the secrets secrets list params -func (o *SecretsSecretsListParams) SetNameIc(nameIc *string) { - o.NameIc = nameIc -} - -// WithNameIe adds the nameIe to the secrets secrets list params -func (o *SecretsSecretsListParams) WithNameIe(nameIe *string) *SecretsSecretsListParams { - o.SetNameIe(nameIe) - return o -} - -// SetNameIe adds the nameIe to the secrets secrets list params -func (o *SecretsSecretsListParams) SetNameIe(nameIe *string) { - o.NameIe = nameIe -} - -// WithNameIew adds the nameIew to the secrets secrets list params -func (o *SecretsSecretsListParams) WithNameIew(nameIew *string) *SecretsSecretsListParams { - o.SetNameIew(nameIew) - return o -} - -// SetNameIew adds the nameIew to the secrets secrets list params -func (o *SecretsSecretsListParams) SetNameIew(nameIew *string) { - o.NameIew = nameIew -} - -// WithNameIsw adds the nameIsw to the secrets secrets list params -func (o *SecretsSecretsListParams) WithNameIsw(nameIsw *string) *SecretsSecretsListParams { - o.SetNameIsw(nameIsw) - return o -} - -// SetNameIsw adds the nameIsw to the secrets secrets list params -func (o *SecretsSecretsListParams) SetNameIsw(nameIsw *string) { - o.NameIsw = nameIsw -} - -// WithNamen adds the namen to the secrets secrets list params -func (o *SecretsSecretsListParams) WithNamen(namen *string) *SecretsSecretsListParams { - o.SetNamen(namen) - return o -} - -// SetNamen adds the nameN to the secrets secrets list params -func (o *SecretsSecretsListParams) SetNamen(namen *string) { - o.Namen = namen -} - -// WithNameNic adds the nameNic to the secrets secrets list params -func (o *SecretsSecretsListParams) WithNameNic(nameNic *string) *SecretsSecretsListParams { - o.SetNameNic(nameNic) - return o -} - -// SetNameNic adds the nameNic to the secrets secrets list params -func (o *SecretsSecretsListParams) SetNameNic(nameNic *string) { - o.NameNic = nameNic -} - -// WithNameNie adds the nameNie to the secrets secrets list params -func (o *SecretsSecretsListParams) WithNameNie(nameNie *string) *SecretsSecretsListParams { - o.SetNameNie(nameNie) - return o -} - -// SetNameNie adds the nameNie to the secrets secrets list params -func (o *SecretsSecretsListParams) SetNameNie(nameNie *string) { - o.NameNie = nameNie -} - -// WithNameNiew adds the nameNiew to the secrets secrets list params -func (o *SecretsSecretsListParams) WithNameNiew(nameNiew *string) *SecretsSecretsListParams { - o.SetNameNiew(nameNiew) - return o -} - -// SetNameNiew adds the nameNiew to the secrets secrets list params -func (o *SecretsSecretsListParams) SetNameNiew(nameNiew *string) { - o.NameNiew = nameNiew -} - -// WithNameNisw adds the nameNisw to the secrets secrets list params -func (o *SecretsSecretsListParams) WithNameNisw(nameNisw *string) *SecretsSecretsListParams { - o.SetNameNisw(nameNisw) - return o -} - -// SetNameNisw adds the nameNisw to the secrets secrets list params -func (o *SecretsSecretsListParams) SetNameNisw(nameNisw *string) { - o.NameNisw = nameNisw -} - -// WithOffset adds the offset to the secrets secrets list params -func (o *SecretsSecretsListParams) WithOffset(offset *int64) *SecretsSecretsListParams { - o.SetOffset(offset) - return o -} - -// SetOffset adds the offset to the secrets secrets list params -func (o *SecretsSecretsListParams) SetOffset(offset *int64) { - o.Offset = offset -} - -// WithQ adds the q to the secrets secrets list params -func (o *SecretsSecretsListParams) WithQ(q *string) *SecretsSecretsListParams { - o.SetQ(q) - return o -} - -// SetQ adds the q to the secrets secrets list params -func (o *SecretsSecretsListParams) SetQ(q *string) { - o.Q = q -} - -// WithRole adds the role to the secrets secrets list params -func (o *SecretsSecretsListParams) WithRole(role *string) *SecretsSecretsListParams { - o.SetRole(role) - return o -} - -// SetRole adds the role to the secrets secrets list params -func (o *SecretsSecretsListParams) SetRole(role *string) { - o.Role = role -} - -// WithRolen adds the rolen to the secrets secrets list params -func (o *SecretsSecretsListParams) WithRolen(rolen *string) *SecretsSecretsListParams { - o.SetRolen(rolen) - return o -} - -// SetRolen adds the roleN to the secrets secrets list params -func (o *SecretsSecretsListParams) SetRolen(rolen *string) { - o.Rolen = rolen -} - -// WithRoleID adds the roleID to the secrets secrets list params -func (o *SecretsSecretsListParams) WithRoleID(roleID *string) *SecretsSecretsListParams { - o.SetRoleID(roleID) - return o -} - -// SetRoleID adds the roleId to the secrets secrets list params -func (o *SecretsSecretsListParams) SetRoleID(roleID *string) { - o.RoleID = roleID -} - -// WithRoleIDn adds the roleIDn to the secrets secrets list params -func (o *SecretsSecretsListParams) WithRoleIDn(roleIDn *string) *SecretsSecretsListParams { - o.SetRoleIDn(roleIDn) - return o -} - -// SetRoleIDn adds the roleIdN to the secrets secrets list params -func (o *SecretsSecretsListParams) SetRoleIDn(roleIDn *string) { - o.RoleIDn = roleIDn -} - -// WithTag adds the tag to the secrets secrets list params -func (o *SecretsSecretsListParams) WithTag(tag *string) *SecretsSecretsListParams { - o.SetTag(tag) - return o -} - -// SetTag adds the tag to the secrets secrets list params -func (o *SecretsSecretsListParams) SetTag(tag *string) { - o.Tag = tag -} - -// WithTagn adds the tagn to the secrets secrets list params -func (o *SecretsSecretsListParams) WithTagn(tagn *string) *SecretsSecretsListParams { - o.SetTagn(tagn) - return o -} - -// SetTagn adds the tagN to the secrets secrets list params -func (o *SecretsSecretsListParams) SetTagn(tagn *string) { - o.Tagn = tagn -} - -// WithVirtualMachine adds the virtualMachine to the secrets secrets list params -func (o *SecretsSecretsListParams) WithVirtualMachine(virtualMachine *string) *SecretsSecretsListParams { - o.SetVirtualMachine(virtualMachine) - return o -} - -// SetVirtualMachine adds the virtualMachine to the secrets secrets list params -func (o *SecretsSecretsListParams) SetVirtualMachine(virtualMachine *string) { - o.VirtualMachine = virtualMachine -} - -// WithVirtualMachinen adds the virtualMachinen to the secrets secrets list params -func (o *SecretsSecretsListParams) WithVirtualMachinen(virtualMachinen *string) *SecretsSecretsListParams { - o.SetVirtualMachinen(virtualMachinen) - return o -} - -// SetVirtualMachinen adds the virtualMachineN to the secrets secrets list params -func (o *SecretsSecretsListParams) SetVirtualMachinen(virtualMachinen *string) { - o.VirtualMachinen = virtualMachinen -} - -// WithVirtualMachineID adds the virtualMachineID to the secrets secrets list params -func (o *SecretsSecretsListParams) WithVirtualMachineID(virtualMachineID *string) *SecretsSecretsListParams { - o.SetVirtualMachineID(virtualMachineID) - return o -} - -// SetVirtualMachineID adds the virtualMachineId to the secrets secrets list params -func (o *SecretsSecretsListParams) SetVirtualMachineID(virtualMachineID *string) { - o.VirtualMachineID = virtualMachineID -} - -// WithVirtualMachineIDn adds the virtualMachineIDn to the secrets secrets list params -func (o *SecretsSecretsListParams) WithVirtualMachineIDn(virtualMachineIDn *string) *SecretsSecretsListParams { - o.SetVirtualMachineIDn(virtualMachineIDn) - return o -} - -// SetVirtualMachineIDn adds the virtualMachineIdN to the secrets secrets list params -func (o *SecretsSecretsListParams) SetVirtualMachineIDn(virtualMachineIDn *string) { - o.VirtualMachineIDn = virtualMachineIDn -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Created != nil { - - // query param created - var qrCreated string - - if o.Created != nil { - qrCreated = *o.Created - } - qCreated := qrCreated - if qCreated != "" { - - if err := r.SetQueryParam("created", qCreated); err != nil { - return err - } - } - } - - if o.CreatedGte != nil { - - // query param created__gte - var qrCreatedGte string - - if o.CreatedGte != nil { - qrCreatedGte = *o.CreatedGte - } - qCreatedGte := qrCreatedGte - if qCreatedGte != "" { - - if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { - return err - } - } - } - - if o.CreatedLte != nil { - - // query param created__lte - var qrCreatedLte string - - if o.CreatedLte != nil { - qrCreatedLte = *o.CreatedLte - } - qCreatedLte := qrCreatedLte - if qCreatedLte != "" { - - if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { - return err - } - } - } - - if o.Device != nil { - - // query param device - var qrDevice string - - if o.Device != nil { - qrDevice = *o.Device - } - qDevice := qrDevice - if qDevice != "" { - - if err := r.SetQueryParam("device", qDevice); err != nil { - return err - } - } - } - - if o.Devicen != nil { - - // query param device__n - var qrDevicen string - - if o.Devicen != nil { - qrDevicen = *o.Devicen - } - qDevicen := qrDevicen - if qDevicen != "" { - - if err := r.SetQueryParam("device__n", qDevicen); err != nil { - return err - } - } - } - - if o.DeviceID != nil { - - // query param device_id - var qrDeviceID string - - if o.DeviceID != nil { - qrDeviceID = *o.DeviceID - } - qDeviceID := qrDeviceID - if qDeviceID != "" { - - if err := r.SetQueryParam("device_id", qDeviceID); err != nil { - return err - } - } - } - - if o.DeviceIDn != nil { - - // query param device_id__n - var qrDeviceIDn string - - if o.DeviceIDn != nil { - qrDeviceIDn = *o.DeviceIDn - } - qDeviceIDn := qrDeviceIDn - if qDeviceIDn != "" { - - if err := r.SetQueryParam("device_id__n", qDeviceIDn); err != nil { - return err - } - } - } - - if o.ID != nil { - - // query param id - var qrID string - - if o.ID != nil { - qrID = *o.ID - } - qID := qrID - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if o.IDGt != nil { - - // query param id__gt - var qrIDGt string - - if o.IDGt != nil { - qrIDGt = *o.IDGt - } - qIDGt := qrIDGt - if qIDGt != "" { - - if err := r.SetQueryParam("id__gt", qIDGt); err != nil { - return err - } - } - } - - if o.IDGte != nil { - - // query param id__gte - var qrIDGte string - - if o.IDGte != nil { - qrIDGte = *o.IDGte - } - qIDGte := qrIDGte - if qIDGte != "" { - - if err := r.SetQueryParam("id__gte", qIDGte); err != nil { - return err - } - } - } - - if o.IDLt != nil { - - // query param id__lt - var qrIDLt string - - if o.IDLt != nil { - qrIDLt = *o.IDLt - } - qIDLt := qrIDLt - if qIDLt != "" { - - if err := r.SetQueryParam("id__lt", qIDLt); err != nil { - return err - } - } - } - - if o.IDLte != nil { - - // query param id__lte - var qrIDLte string - - if o.IDLte != nil { - qrIDLte = *o.IDLte - } - qIDLte := qrIDLte - if qIDLte != "" { - - if err := r.SetQueryParam("id__lte", qIDLte); err != nil { - return err - } - } - } - - if o.IDn != nil { - - // query param id__n - var qrIDn string - - if o.IDn != nil { - qrIDn = *o.IDn - } - qIDn := qrIDn - if qIDn != "" { - - if err := r.SetQueryParam("id__n", qIDn); err != nil { - return err - } - } - } - - if o.LastUpdated != nil { - - // query param last_updated - var qrLastUpdated string - - if o.LastUpdated != nil { - qrLastUpdated = *o.LastUpdated - } - qLastUpdated := qrLastUpdated - if qLastUpdated != "" { - - if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { - return err - } - } - } - - if o.LastUpdatedGte != nil { - - // query param last_updated__gte - var qrLastUpdatedGte string - - if o.LastUpdatedGte != nil { - qrLastUpdatedGte = *o.LastUpdatedGte - } - qLastUpdatedGte := qrLastUpdatedGte - if qLastUpdatedGte != "" { - - if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { - return err - } - } - } - - if o.LastUpdatedLte != nil { - - // query param last_updated__lte - var qrLastUpdatedLte string - - if o.LastUpdatedLte != nil { - qrLastUpdatedLte = *o.LastUpdatedLte - } - qLastUpdatedLte := qrLastUpdatedLte - if qLastUpdatedLte != "" { - - if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); 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.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - - if o.NameIc != nil { - - // query param name__ic - var qrNameIc string - - if o.NameIc != nil { - qrNameIc = *o.NameIc - } - qNameIc := qrNameIc - if qNameIc != "" { - - if err := r.SetQueryParam("name__ic", qNameIc); err != nil { - return err - } - } - } - - if o.NameIe != nil { - - // query param name__ie - var qrNameIe string - - if o.NameIe != nil { - qrNameIe = *o.NameIe - } - qNameIe := qrNameIe - if qNameIe != "" { - - if err := r.SetQueryParam("name__ie", qNameIe); err != nil { - return err - } - } - } - - if o.NameIew != nil { - - // query param name__iew - var qrNameIew string - - if o.NameIew != nil { - qrNameIew = *o.NameIew - } - qNameIew := qrNameIew - if qNameIew != "" { - - if err := r.SetQueryParam("name__iew", qNameIew); err != nil { - return err - } - } - } - - if o.NameIsw != nil { - - // query param name__isw - var qrNameIsw string - - if o.NameIsw != nil { - qrNameIsw = *o.NameIsw - } - qNameIsw := qrNameIsw - if qNameIsw != "" { - - if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { - return err - } - } - } - - if o.Namen != nil { - - // query param name__n - var qrNamen string - - if o.Namen != nil { - qrNamen = *o.Namen - } - qNamen := qrNamen - if qNamen != "" { - - if err := r.SetQueryParam("name__n", qNamen); err != nil { - return err - } - } - } - - if o.NameNic != nil { - - // query param name__nic - var qrNameNic string - - if o.NameNic != nil { - qrNameNic = *o.NameNic - } - qNameNic := qrNameNic - if qNameNic != "" { - - if err := r.SetQueryParam("name__nic", qNameNic); err != nil { - return err - } - } - } - - if o.NameNie != nil { - - // query param name__nie - var qrNameNie string - - if o.NameNie != nil { - qrNameNie = *o.NameNie - } - qNameNie := qrNameNie - if qNameNie != "" { - - if err := r.SetQueryParam("name__nie", qNameNie); err != nil { - return err - } - } - } - - if o.NameNiew != nil { - - // query param name__niew - var qrNameNiew string - - if o.NameNiew != nil { - qrNameNiew = *o.NameNiew - } - qNameNiew := qrNameNiew - if qNameNiew != "" { - - if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { - return err - } - } - } - - if o.NameNisw != nil { - - // query param name__nisw - var qrNameNisw string - - if o.NameNisw != nil { - qrNameNisw = *o.NameNisw - } - qNameNisw := qrNameNisw - if qNameNisw != "" { - - if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { - return err - } - } - } - - if o.Offset != nil { - - // query param offset - var qrOffset int64 - - if o.Offset != nil { - qrOffset = *o.Offset - } - qOffset := swag.FormatInt64(qrOffset) - if qOffset != "" { - - if err := r.SetQueryParam("offset", qOffset); err != nil { - return err - } - } - } - - if o.Q != nil { - - // query param q - var qrQ string - - if o.Q != nil { - qrQ = *o.Q - } - qQ := qrQ - if qQ != "" { - - if err := r.SetQueryParam("q", qQ); err != nil { - return err - } - } - } - - if o.Role != nil { - - // query param role - var qrRole string - - if o.Role != nil { - qrRole = *o.Role - } - qRole := qrRole - if qRole != "" { - - if err := r.SetQueryParam("role", qRole); err != nil { - return err - } - } - } - - if o.Rolen != nil { - - // query param role__n - var qrRolen string - - if o.Rolen != nil { - qrRolen = *o.Rolen - } - qRolen := qrRolen - if qRolen != "" { - - if err := r.SetQueryParam("role__n", qRolen); err != nil { - return err - } - } - } - - if o.RoleID != nil { - - // query param role_id - var qrRoleID string - - if o.RoleID != nil { - qrRoleID = *o.RoleID - } - qRoleID := qrRoleID - if qRoleID != "" { - - if err := r.SetQueryParam("role_id", qRoleID); err != nil { - return err - } - } - } - - if o.RoleIDn != nil { - - // query param role_id__n - var qrRoleIDn string - - if o.RoleIDn != nil { - qrRoleIDn = *o.RoleIDn - } - qRoleIDn := qrRoleIDn - if qRoleIDn != "" { - - if err := r.SetQueryParam("role_id__n", qRoleIDn); err != nil { - return err - } - } - } - - if o.Tag != nil { - - // query param tag - var qrTag string - - if o.Tag != nil { - qrTag = *o.Tag - } - qTag := qrTag - if qTag != "" { - - if err := r.SetQueryParam("tag", qTag); err != nil { - return err - } - } - } - - if o.Tagn != nil { - - // query param tag__n - var qrTagn string - - if o.Tagn != nil { - qrTagn = *o.Tagn - } - qTagn := qrTagn - if qTagn != "" { - - if err := r.SetQueryParam("tag__n", qTagn); err != nil { - return err - } - } - } - - if o.VirtualMachine != nil { - - // query param virtual_machine - var qrVirtualMachine string - - if o.VirtualMachine != nil { - qrVirtualMachine = *o.VirtualMachine - } - qVirtualMachine := qrVirtualMachine - if qVirtualMachine != "" { - - if err := r.SetQueryParam("virtual_machine", qVirtualMachine); err != nil { - return err - } - } - } - - if o.VirtualMachinen != nil { - - // query param virtual_machine__n - var qrVirtualMachinen string - - if o.VirtualMachinen != nil { - qrVirtualMachinen = *o.VirtualMachinen - } - qVirtualMachinen := qrVirtualMachinen - if qVirtualMachinen != "" { - - if err := r.SetQueryParam("virtual_machine__n", qVirtualMachinen); err != nil { - return err - } - } - } - - if o.VirtualMachineID != nil { - - // query param virtual_machine_id - var qrVirtualMachineID string - - if o.VirtualMachineID != nil { - qrVirtualMachineID = *o.VirtualMachineID - } - qVirtualMachineID := qrVirtualMachineID - if qVirtualMachineID != "" { - - if err := r.SetQueryParam("virtual_machine_id", qVirtualMachineID); err != nil { - return err - } - } - } - - if o.VirtualMachineIDn != nil { - - // query param virtual_machine_id__n - var qrVirtualMachineIDn string - - if o.VirtualMachineIDn != nil { - qrVirtualMachineIDn = *o.VirtualMachineIDn - } - qVirtualMachineIDn := qrVirtualMachineIDn - if qVirtualMachineIDn != "" { - - if err := r.SetQueryParam("virtual_machine_id__n", qVirtualMachineIDn); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/secrets/secrets_secrets_partial_update_parameters.go b/netbox/client/secrets/secrets_secrets_partial_update_parameters.go deleted file mode 100644 index 804679215..000000000 --- a/netbox/client/secrets/secrets_secrets_partial_update_parameters.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewSecretsSecretsPartialUpdateParams creates a new SecretsSecretsPartialUpdateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretsPartialUpdateParams() *SecretsSecretsPartialUpdateParams { - return &SecretsSecretsPartialUpdateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretsPartialUpdateParamsWithTimeout creates a new SecretsSecretsPartialUpdateParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretsPartialUpdateParamsWithTimeout(timeout time.Duration) *SecretsSecretsPartialUpdateParams { - return &SecretsSecretsPartialUpdateParams{ - timeout: timeout, - } -} - -// NewSecretsSecretsPartialUpdateParamsWithContext creates a new SecretsSecretsPartialUpdateParams object -// with the ability to set a context for a request. -func NewSecretsSecretsPartialUpdateParamsWithContext(ctx context.Context) *SecretsSecretsPartialUpdateParams { - return &SecretsSecretsPartialUpdateParams{ - Context: ctx, - } -} - -// NewSecretsSecretsPartialUpdateParamsWithHTTPClient creates a new SecretsSecretsPartialUpdateParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretsPartialUpdateParamsWithHTTPClient(client *http.Client) *SecretsSecretsPartialUpdateParams { - return &SecretsSecretsPartialUpdateParams{ - HTTPClient: client, - } -} - -/* SecretsSecretsPartialUpdateParams contains all the parameters to send to the API endpoint - for the secrets secrets partial update operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretsPartialUpdateParams struct { - - // Data. - Data *models.WritableSecret - - /* ID. - - A unique integer value identifying this secret. - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secrets partial update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsPartialUpdateParams) WithDefaults() *SecretsSecretsPartialUpdateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secrets partial update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsPartialUpdateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secrets partial update params -func (o *SecretsSecretsPartialUpdateParams) WithTimeout(timeout time.Duration) *SecretsSecretsPartialUpdateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secrets partial update params -func (o *SecretsSecretsPartialUpdateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secrets partial update params -func (o *SecretsSecretsPartialUpdateParams) WithContext(ctx context.Context) *SecretsSecretsPartialUpdateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secrets partial update params -func (o *SecretsSecretsPartialUpdateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secrets partial update params -func (o *SecretsSecretsPartialUpdateParams) WithHTTPClient(client *http.Client) *SecretsSecretsPartialUpdateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secrets partial update params -func (o *SecretsSecretsPartialUpdateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the secrets secrets partial update params -func (o *SecretsSecretsPartialUpdateParams) WithData(data *models.WritableSecret) *SecretsSecretsPartialUpdateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the secrets secrets partial update params -func (o *SecretsSecretsPartialUpdateParams) SetData(data *models.WritableSecret) { - o.Data = data -} - -// WithID adds the id to the secrets secrets partial update params -func (o *SecretsSecretsPartialUpdateParams) WithID(id int64) *SecretsSecretsPartialUpdateParams { - o.SetID(id) - return o -} - -// SetID adds the id to the secrets secrets partial update params -func (o *SecretsSecretsPartialUpdateParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Data != nil { - if err := r.SetBodyParam(o.Data); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/secrets/secrets_secrets_read_parameters.go b/netbox/client/secrets/secrets_secrets_read_parameters.go deleted file mode 100644 index f69f09adf..000000000 --- a/netbox/client/secrets/secrets_secrets_read_parameters.go +++ /dev/null @@ -1,165 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewSecretsSecretsReadParams creates a new SecretsSecretsReadParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretsReadParams() *SecretsSecretsReadParams { - return &SecretsSecretsReadParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretsReadParamsWithTimeout creates a new SecretsSecretsReadParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretsReadParamsWithTimeout(timeout time.Duration) *SecretsSecretsReadParams { - return &SecretsSecretsReadParams{ - timeout: timeout, - } -} - -// NewSecretsSecretsReadParamsWithContext creates a new SecretsSecretsReadParams object -// with the ability to set a context for a request. -func NewSecretsSecretsReadParamsWithContext(ctx context.Context) *SecretsSecretsReadParams { - return &SecretsSecretsReadParams{ - Context: ctx, - } -} - -// NewSecretsSecretsReadParamsWithHTTPClient creates a new SecretsSecretsReadParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretsReadParamsWithHTTPClient(client *http.Client) *SecretsSecretsReadParams { - return &SecretsSecretsReadParams{ - HTTPClient: client, - } -} - -/* SecretsSecretsReadParams contains all the parameters to send to the API endpoint - for the secrets secrets read operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretsReadParams struct { - - /* ID. - - A unique integer value identifying this secret. - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secrets read params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsReadParams) WithDefaults() *SecretsSecretsReadParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secrets read params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsReadParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secrets read params -func (o *SecretsSecretsReadParams) WithTimeout(timeout time.Duration) *SecretsSecretsReadParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secrets read params -func (o *SecretsSecretsReadParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secrets read params -func (o *SecretsSecretsReadParams) WithContext(ctx context.Context) *SecretsSecretsReadParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secrets read params -func (o *SecretsSecretsReadParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secrets read params -func (o *SecretsSecretsReadParams) WithHTTPClient(client *http.Client) *SecretsSecretsReadParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secrets read params -func (o *SecretsSecretsReadParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the secrets secrets read params -func (o *SecretsSecretsReadParams) WithID(id int64) *SecretsSecretsReadParams { - o.SetID(id) - return o -} - -// SetID adds the id to the secrets secrets read params -func (o *SecretsSecretsReadParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/secrets/secrets_secrets_update_parameters.go b/netbox/client/secrets/secrets_secrets_update_parameters.go deleted file mode 100644 index 6ad7958b0..000000000 --- a/netbox/client/secrets/secrets_secrets_update_parameters.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package secrets - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewSecretsSecretsUpdateParams creates a new SecretsSecretsUpdateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewSecretsSecretsUpdateParams() *SecretsSecretsUpdateParams { - return &SecretsSecretsUpdateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSecretsSecretsUpdateParamsWithTimeout creates a new SecretsSecretsUpdateParams object -// with the ability to set a timeout on a request. -func NewSecretsSecretsUpdateParamsWithTimeout(timeout time.Duration) *SecretsSecretsUpdateParams { - return &SecretsSecretsUpdateParams{ - timeout: timeout, - } -} - -// NewSecretsSecretsUpdateParamsWithContext creates a new SecretsSecretsUpdateParams object -// with the ability to set a context for a request. -func NewSecretsSecretsUpdateParamsWithContext(ctx context.Context) *SecretsSecretsUpdateParams { - return &SecretsSecretsUpdateParams{ - Context: ctx, - } -} - -// NewSecretsSecretsUpdateParamsWithHTTPClient creates a new SecretsSecretsUpdateParams object -// with the ability to set a custom HTTPClient for a request. -func NewSecretsSecretsUpdateParamsWithHTTPClient(client *http.Client) *SecretsSecretsUpdateParams { - return &SecretsSecretsUpdateParams{ - HTTPClient: client, - } -} - -/* SecretsSecretsUpdateParams contains all the parameters to send to the API endpoint - for the secrets secrets update operation. - - Typically these are written to a http.Request. -*/ -type SecretsSecretsUpdateParams struct { - - // Data. - Data *models.WritableSecret - - /* ID. - - A unique integer value identifying this secret. - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the secrets secrets update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsUpdateParams) WithDefaults() *SecretsSecretsUpdateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the secrets secrets update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SecretsSecretsUpdateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the secrets secrets update params -func (o *SecretsSecretsUpdateParams) WithTimeout(timeout time.Duration) *SecretsSecretsUpdateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the secrets secrets update params -func (o *SecretsSecretsUpdateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the secrets secrets update params -func (o *SecretsSecretsUpdateParams) WithContext(ctx context.Context) *SecretsSecretsUpdateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the secrets secrets update params -func (o *SecretsSecretsUpdateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the secrets secrets update params -func (o *SecretsSecretsUpdateParams) WithHTTPClient(client *http.Client) *SecretsSecretsUpdateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the secrets secrets update params -func (o *SecretsSecretsUpdateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the secrets secrets update params -func (o *SecretsSecretsUpdateParams) WithData(data *models.WritableSecret) *SecretsSecretsUpdateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the secrets secrets update params -func (o *SecretsSecretsUpdateParams) SetData(data *models.WritableSecret) { - o.Data = data -} - -// WithID adds the id to the secrets secrets update params -func (o *SecretsSecretsUpdateParams) WithID(id int64) *SecretsSecretsUpdateParams { - o.SetID(id) - return o -} - -// SetID adds the id to the secrets secrets update params -func (o *SecretsSecretsUpdateParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *SecretsSecretsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Data != nil { - if err := r.SetBodyParam(o.Data); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/tenancy/tenancy_client.go b/netbox/client/tenancy/tenancy_client.go index f54637197..6714105a9 100644 --- a/netbox/client/tenancy/tenancy_client.go +++ b/netbox/client/tenancy/tenancy_client.go @@ -280,7 +280,7 @@ func (a *Client) TenancyTenantGroupsDelete(params *TenancyTenantGroupsDeletePara } /* - TenancyTenantGroupsList tenancy tenant groups list API + TenancyTenantGroupsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) TenancyTenantGroupsList(params *TenancyTenantGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsListOK, error) { // TODO: Validate the params before sending @@ -631,7 +631,7 @@ func (a *Client) TenancyTenantsDelete(params *TenancyTenantsDeleteParams, authIn } /* - TenancyTenantsList tenancy tenants list API + TenancyTenantsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) TenancyTenantsList(params *TenancyTenantsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsListOK, error) { // TODO: Validate the params before sending diff --git a/netbox/client/users/users_client.go b/netbox/client/users/users_client.go index 7bca45393..66b13ee6c 100644 --- a/netbox/client/users/users_client.go +++ b/netbox/client/users/users_client.go @@ -83,6 +83,26 @@ type ClientService interface { UsersPermissionsUpdate(params *UsersPermissionsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersPermissionsUpdateOK, error) + UsersTokensBulkDelete(params *UsersTokensBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensBulkDeleteNoContent, error) + + UsersTokensBulkPartialUpdate(params *UsersTokensBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensBulkPartialUpdateOK, error) + + UsersTokensBulkUpdate(params *UsersTokensBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensBulkUpdateOK, error) + + UsersTokensCreate(params *UsersTokensCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensCreateCreated, error) + + UsersTokensDelete(params *UsersTokensDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensDeleteNoContent, error) + + UsersTokensList(params *UsersTokensListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensListOK, error) + + UsersTokensPartialUpdate(params *UsersTokensPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensPartialUpdateOK, error) + + UsersTokensProvisionCreate(params *UsersTokensProvisionCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensProvisionCreateCreated, error) + + UsersTokensRead(params *UsersTokensReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensReadOK, error) + + UsersTokensUpdate(params *UsersTokensUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensUpdateOK, error) + UsersUsersBulkDelete(params *UsersUsersBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersUsersBulkDeleteNoContent, error) UsersUsersBulkPartialUpdate(params *UsersUsersBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersUsersBulkPartialUpdateOK, error) @@ -339,7 +359,7 @@ func (a *Client) UsersGroupsDelete(params *UsersGroupsDeleteParams, authInfo run } /* - UsersGroupsList users groups list API + UsersGroupsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) UsersGroupsList(params *UsersGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersGroupsListOK, error) { // TODO: Validate the params before sending @@ -690,7 +710,7 @@ func (a *Client) UsersPermissionsDelete(params *UsersPermissionsDeleteParams, au } /* - UsersPermissionsList users permissions list API + UsersPermissionsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) UsersPermissionsList(params *UsersPermissionsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersPermissionsListOK, error) { // TODO: Validate the params before sending @@ -845,6 +865,396 @@ func (a *Client) UsersPermissionsUpdate(params *UsersPermissionsUpdateParams, au panic(msg) } +/* + UsersTokensBulkDelete users tokens bulk delete API +*/ +func (a *Client) UsersTokensBulkDelete(params *UsersTokensBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUsersTokensBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "users_tokens_bulk_delete", + Method: "DELETE", + PathPattern: "/users/tokens/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UsersTokensBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UsersTokensBulkDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for users_tokens_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UsersTokensBulkPartialUpdate users tokens bulk partial update API +*/ +func (a *Client) UsersTokensBulkPartialUpdate(params *UsersTokensBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUsersTokensBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "users_tokens_bulk_partial_update", + Method: "PATCH", + PathPattern: "/users/tokens/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UsersTokensBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UsersTokensBulkPartialUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for users_tokens_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UsersTokensBulkUpdate users tokens bulk update API +*/ +func (a *Client) UsersTokensBulkUpdate(params *UsersTokensBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUsersTokensBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "users_tokens_bulk_update", + Method: "PUT", + PathPattern: "/users/tokens/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UsersTokensBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UsersTokensBulkUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for users_tokens_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UsersTokensCreate users tokens create API +*/ +func (a *Client) UsersTokensCreate(params *UsersTokensCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUsersTokensCreateParams() + } + op := &runtime.ClientOperation{ + ID: "users_tokens_create", + Method: "POST", + PathPattern: "/users/tokens/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UsersTokensCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UsersTokensCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for users_tokens_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UsersTokensDelete users tokens delete API +*/ +func (a *Client) UsersTokensDelete(params *UsersTokensDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUsersTokensDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "users_tokens_delete", + Method: "DELETE", + PathPattern: "/users/tokens/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UsersTokensDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UsersTokensDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for users_tokens_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UsersTokensList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) UsersTokensList(params *UsersTokensListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUsersTokensListParams() + } + op := &runtime.ClientOperation{ + ID: "users_tokens_list", + Method: "GET", + PathPattern: "/users/tokens/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UsersTokensListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UsersTokensListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for users_tokens_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UsersTokensPartialUpdate users tokens partial update API +*/ +func (a *Client) UsersTokensPartialUpdate(params *UsersTokensPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUsersTokensPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "users_tokens_partial_update", + Method: "PATCH", + PathPattern: "/users/tokens/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UsersTokensPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UsersTokensPartialUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for users_tokens_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UsersTokensProvisionCreate Non-authenticated REST API endpoint via which a user may create a Token. +*/ +func (a *Client) UsersTokensProvisionCreate(params *UsersTokensProvisionCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensProvisionCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUsersTokensProvisionCreateParams() + } + op := &runtime.ClientOperation{ + ID: "users_tokens_provision_create", + Method: "POST", + PathPattern: "/users/tokens/provision/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UsersTokensProvisionCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UsersTokensProvisionCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for users_tokens_provision_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UsersTokensRead users tokens read API +*/ +func (a *Client) UsersTokensRead(params *UsersTokensReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUsersTokensReadParams() + } + op := &runtime.ClientOperation{ + ID: "users_tokens_read", + Method: "GET", + PathPattern: "/users/tokens/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UsersTokensReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UsersTokensReadOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for users_tokens_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UsersTokensUpdate users tokens update API +*/ +func (a *Client) UsersTokensUpdate(params *UsersTokensUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUsersTokensUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "users_tokens_update", + Method: "PUT", + PathPattern: "/users/tokens/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UsersTokensUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UsersTokensUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for users_tokens_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UsersUsersBulkDelete users users bulk delete API */ @@ -1041,7 +1451,7 @@ func (a *Client) UsersUsersDelete(params *UsersUsersDeleteParams, authInfo runti } /* - UsersUsersList users users list API + UsersUsersList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) UsersUsersList(params *UsersUsersListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersUsersListOK, error) { // TODO: Validate the params before sending diff --git a/netbox/client/users/users_tokens_bulk_delete_parameters.go b/netbox/client/users/users_tokens_bulk_delete_parameters.go new file mode 100644 index 000000000..a68eb96c0 --- /dev/null +++ b/netbox/client/users/users_tokens_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package users + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewUsersTokensBulkDeleteParams creates a new UsersTokensBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUsersTokensBulkDeleteParams() *UsersTokensBulkDeleteParams { + return &UsersTokensBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUsersTokensBulkDeleteParamsWithTimeout creates a new UsersTokensBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewUsersTokensBulkDeleteParamsWithTimeout(timeout time.Duration) *UsersTokensBulkDeleteParams { + return &UsersTokensBulkDeleteParams{ + timeout: timeout, + } +} + +// NewUsersTokensBulkDeleteParamsWithContext creates a new UsersTokensBulkDeleteParams object +// with the ability to set a context for a request. +func NewUsersTokensBulkDeleteParamsWithContext(ctx context.Context) *UsersTokensBulkDeleteParams { + return &UsersTokensBulkDeleteParams{ + Context: ctx, + } +} + +// NewUsersTokensBulkDeleteParamsWithHTTPClient creates a new UsersTokensBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewUsersTokensBulkDeleteParamsWithHTTPClient(client *http.Client) *UsersTokensBulkDeleteParams { + return &UsersTokensBulkDeleteParams{ + HTTPClient: client, + } +} + +/* UsersTokensBulkDeleteParams contains all the parameters to send to the API endpoint + for the users tokens bulk delete operation. + + Typically these are written to a http.Request. +*/ +type UsersTokensBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the users tokens bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensBulkDeleteParams) WithDefaults() *UsersTokensBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the users tokens bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the users tokens bulk delete params +func (o *UsersTokensBulkDeleteParams) WithTimeout(timeout time.Duration) *UsersTokensBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the users tokens bulk delete params +func (o *UsersTokensBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the users tokens bulk delete params +func (o *UsersTokensBulkDeleteParams) WithContext(ctx context.Context) *UsersTokensBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the users tokens bulk delete params +func (o *UsersTokensBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the users tokens bulk delete params +func (o *UsersTokensBulkDeleteParams) WithHTTPClient(client *http.Client) *UsersTokensBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the users tokens bulk delete params +func (o *UsersTokensBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *UsersTokensBulkDeleteParams) 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/netbox/client/secrets/secrets_secrets_bulk_delete_responses.go b/netbox/client/users/users_tokens_bulk_delete_responses.go similarity index 54% rename from netbox/client/secrets/secrets_secrets_bulk_delete_responses.go rename to netbox/client/users/users_tokens_bulk_delete_responses.go index 0842f7b9c..988b76691 100644 --- a/netbox/client/secrets/secrets_secrets_bulk_delete_responses.go +++ b/netbox/client/users/users_tokens_bulk_delete_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package users // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -27,16 +27,16 @@ import ( "github.com/go-openapi/strfmt" ) -// SecretsSecretsBulkDeleteReader is a Reader for the SecretsSecretsBulkDelete structure. -type SecretsSecretsBulkDeleteReader struct { +// UsersTokensBulkDeleteReader is a Reader for the UsersTokensBulkDelete structure. +type UsersTokensBulkDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretsBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *UsersTokensBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 204: - result := NewSecretsSecretsBulkDeleteNoContent() + result := NewUsersTokensBulkDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -46,23 +46,23 @@ func (o *SecretsSecretsBulkDeleteReader) ReadResponse(response runtime.ClientRes } } -// NewSecretsSecretsBulkDeleteNoContent creates a SecretsSecretsBulkDeleteNoContent with default headers values -func NewSecretsSecretsBulkDeleteNoContent() *SecretsSecretsBulkDeleteNoContent { - return &SecretsSecretsBulkDeleteNoContent{} +// NewUsersTokensBulkDeleteNoContent creates a UsersTokensBulkDeleteNoContent with default headers values +func NewUsersTokensBulkDeleteNoContent() *UsersTokensBulkDeleteNoContent { + return &UsersTokensBulkDeleteNoContent{} } -/* SecretsSecretsBulkDeleteNoContent describes a response with status code 204, with default header values. +/* UsersTokensBulkDeleteNoContent describes a response with status code 204, with default header values. -SecretsSecretsBulkDeleteNoContent secrets secrets bulk delete no content +UsersTokensBulkDeleteNoContent users tokens bulk delete no content */ -type SecretsSecretsBulkDeleteNoContent struct { +type UsersTokensBulkDeleteNoContent struct { } -func (o *SecretsSecretsBulkDeleteNoContent) Error() string { - return fmt.Sprintf("[DELETE /secrets/secrets/][%d] secretsSecretsBulkDeleteNoContent ", 204) +func (o *UsersTokensBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /users/tokens/][%d] usersTokensBulkDeleteNoContent ", 204) } -func (o *SecretsSecretsBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *UsersTokensBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/users/users_tokens_bulk_partial_update_parameters.go b/netbox/client/users/users_tokens_bulk_partial_update_parameters.go new file mode 100644 index 000000000..d638f841f --- /dev/null +++ b/netbox/client/users/users_tokens_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package users + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewUsersTokensBulkPartialUpdateParams creates a new UsersTokensBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUsersTokensBulkPartialUpdateParams() *UsersTokensBulkPartialUpdateParams { + return &UsersTokensBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUsersTokensBulkPartialUpdateParamsWithTimeout creates a new UsersTokensBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewUsersTokensBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *UsersTokensBulkPartialUpdateParams { + return &UsersTokensBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewUsersTokensBulkPartialUpdateParamsWithContext creates a new UsersTokensBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewUsersTokensBulkPartialUpdateParamsWithContext(ctx context.Context) *UsersTokensBulkPartialUpdateParams { + return &UsersTokensBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewUsersTokensBulkPartialUpdateParamsWithHTTPClient creates a new UsersTokensBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewUsersTokensBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *UsersTokensBulkPartialUpdateParams { + return &UsersTokensBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* UsersTokensBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the users tokens bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type UsersTokensBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableToken + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the users tokens bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensBulkPartialUpdateParams) WithDefaults() *UsersTokensBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the users tokens bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the users tokens bulk partial update params +func (o *UsersTokensBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *UsersTokensBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the users tokens bulk partial update params +func (o *UsersTokensBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the users tokens bulk partial update params +func (o *UsersTokensBulkPartialUpdateParams) WithContext(ctx context.Context) *UsersTokensBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the users tokens bulk partial update params +func (o *UsersTokensBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the users tokens bulk partial update params +func (o *UsersTokensBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *UsersTokensBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the users tokens bulk partial update params +func (o *UsersTokensBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the users tokens bulk partial update params +func (o *UsersTokensBulkPartialUpdateParams) WithData(data *models.WritableToken) *UsersTokensBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the users tokens bulk partial update params +func (o *UsersTokensBulkPartialUpdateParams) SetData(data *models.WritableToken) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *UsersTokensBulkPartialUpdateParams) 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/netbox/client/secrets/secrets_secret_roles_bulk_update_responses.go b/netbox/client/users/users_tokens_bulk_partial_update_responses.go similarity index 62% rename from netbox/client/secrets/secrets_secret_roles_bulk_update_responses.go rename to netbox/client/users/users_tokens_bulk_partial_update_responses.go index 539641257..b396193e9 100644 --- a/netbox/client/secrets/secrets_secret_roles_bulk_update_responses.go +++ b/netbox/client/users/users_tokens_bulk_partial_update_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package users // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// SecretsSecretRolesBulkUpdateReader is a Reader for the SecretsSecretRolesBulkUpdate structure. -type SecretsSecretRolesBulkUpdateReader struct { +// UsersTokensBulkPartialUpdateReader is a Reader for the UsersTokensBulkPartialUpdate structure. +type UsersTokensBulkPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretRolesBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *UsersTokensBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewSecretsSecretRolesBulkUpdateOK() + result := NewUsersTokensBulkPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,29 +49,29 @@ func (o *SecretsSecretRolesBulkUpdateReader) ReadResponse(response runtime.Clien } } -// NewSecretsSecretRolesBulkUpdateOK creates a SecretsSecretRolesBulkUpdateOK with default headers values -func NewSecretsSecretRolesBulkUpdateOK() *SecretsSecretRolesBulkUpdateOK { - return &SecretsSecretRolesBulkUpdateOK{} +// NewUsersTokensBulkPartialUpdateOK creates a UsersTokensBulkPartialUpdateOK with default headers values +func NewUsersTokensBulkPartialUpdateOK() *UsersTokensBulkPartialUpdateOK { + return &UsersTokensBulkPartialUpdateOK{} } -/* SecretsSecretRolesBulkUpdateOK describes a response with status code 200, with default header values. +/* UsersTokensBulkPartialUpdateOK describes a response with status code 200, with default header values. -SecretsSecretRolesBulkUpdateOK secrets secret roles bulk update o k +UsersTokensBulkPartialUpdateOK users tokens bulk partial update o k */ -type SecretsSecretRolesBulkUpdateOK struct { - Payload *models.SecretRole +type UsersTokensBulkPartialUpdateOK struct { + Payload *models.Token } -func (o *SecretsSecretRolesBulkUpdateOK) Error() string { - return fmt.Sprintf("[PUT /secrets/secret-roles/][%d] secretsSecretRolesBulkUpdateOK %+v", 200, o.Payload) +func (o *UsersTokensBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /users/tokens/][%d] usersTokensBulkPartialUpdateOK %+v", 200, o.Payload) } -func (o *SecretsSecretRolesBulkUpdateOK) GetPayload() *models.SecretRole { +func (o *UsersTokensBulkPartialUpdateOK) GetPayload() *models.Token { return o.Payload } -func (o *SecretsSecretRolesBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *UsersTokensBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.SecretRole) + o.Payload = new(models.Token) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/netbox/client/users/users_tokens_bulk_update_parameters.go b/netbox/client/users/users_tokens_bulk_update_parameters.go new file mode 100644 index 000000000..f839b0ef7 --- /dev/null +++ b/netbox/client/users/users_tokens_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package users + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewUsersTokensBulkUpdateParams creates a new UsersTokensBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUsersTokensBulkUpdateParams() *UsersTokensBulkUpdateParams { + return &UsersTokensBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUsersTokensBulkUpdateParamsWithTimeout creates a new UsersTokensBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewUsersTokensBulkUpdateParamsWithTimeout(timeout time.Duration) *UsersTokensBulkUpdateParams { + return &UsersTokensBulkUpdateParams{ + timeout: timeout, + } +} + +// NewUsersTokensBulkUpdateParamsWithContext creates a new UsersTokensBulkUpdateParams object +// with the ability to set a context for a request. +func NewUsersTokensBulkUpdateParamsWithContext(ctx context.Context) *UsersTokensBulkUpdateParams { + return &UsersTokensBulkUpdateParams{ + Context: ctx, + } +} + +// NewUsersTokensBulkUpdateParamsWithHTTPClient creates a new UsersTokensBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewUsersTokensBulkUpdateParamsWithHTTPClient(client *http.Client) *UsersTokensBulkUpdateParams { + return &UsersTokensBulkUpdateParams{ + HTTPClient: client, + } +} + +/* UsersTokensBulkUpdateParams contains all the parameters to send to the API endpoint + for the users tokens bulk update operation. + + Typically these are written to a http.Request. +*/ +type UsersTokensBulkUpdateParams struct { + + // Data. + Data *models.WritableToken + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the users tokens bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensBulkUpdateParams) WithDefaults() *UsersTokensBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the users tokens bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the users tokens bulk update params +func (o *UsersTokensBulkUpdateParams) WithTimeout(timeout time.Duration) *UsersTokensBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the users tokens bulk update params +func (o *UsersTokensBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the users tokens bulk update params +func (o *UsersTokensBulkUpdateParams) WithContext(ctx context.Context) *UsersTokensBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the users tokens bulk update params +func (o *UsersTokensBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the users tokens bulk update params +func (o *UsersTokensBulkUpdateParams) WithHTTPClient(client *http.Client) *UsersTokensBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the users tokens bulk update params +func (o *UsersTokensBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the users tokens bulk update params +func (o *UsersTokensBulkUpdateParams) WithData(data *models.WritableToken) *UsersTokensBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the users tokens bulk update params +func (o *UsersTokensBulkUpdateParams) SetData(data *models.WritableToken) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *UsersTokensBulkUpdateParams) 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/netbox/client/users/users_tokens_bulk_update_responses.go b/netbox/client/users/users_tokens_bulk_update_responses.go new file mode 100644 index 000000000..3cfccb6f8 --- /dev/null +++ b/netbox/client/users/users_tokens_bulk_update_responses.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package users + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// UsersTokensBulkUpdateReader is a Reader for the UsersTokensBulkUpdate structure. +type UsersTokensBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UsersTokensBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUsersTokensBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewUsersTokensBulkUpdateOK creates a UsersTokensBulkUpdateOK with default headers values +func NewUsersTokensBulkUpdateOK() *UsersTokensBulkUpdateOK { + return &UsersTokensBulkUpdateOK{} +} + +/* UsersTokensBulkUpdateOK describes a response with status code 200, with default header values. + +UsersTokensBulkUpdateOK users tokens bulk update o k +*/ +type UsersTokensBulkUpdateOK struct { + Payload *models.Token +} + +func (o *UsersTokensBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /users/tokens/][%d] usersTokensBulkUpdateOK %+v", 200, o.Payload) +} +func (o *UsersTokensBulkUpdateOK) GetPayload() *models.Token { + return o.Payload +} + +func (o *UsersTokensBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Token) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/users/users_tokens_create_parameters.go b/netbox/client/users/users_tokens_create_parameters.go new file mode 100644 index 000000000..8df79d951 --- /dev/null +++ b/netbox/client/users/users_tokens_create_parameters.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package users + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewUsersTokensCreateParams creates a new UsersTokensCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUsersTokensCreateParams() *UsersTokensCreateParams { + return &UsersTokensCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUsersTokensCreateParamsWithTimeout creates a new UsersTokensCreateParams object +// with the ability to set a timeout on a request. +func NewUsersTokensCreateParamsWithTimeout(timeout time.Duration) *UsersTokensCreateParams { + return &UsersTokensCreateParams{ + timeout: timeout, + } +} + +// NewUsersTokensCreateParamsWithContext creates a new UsersTokensCreateParams object +// with the ability to set a context for a request. +func NewUsersTokensCreateParamsWithContext(ctx context.Context) *UsersTokensCreateParams { + return &UsersTokensCreateParams{ + Context: ctx, + } +} + +// NewUsersTokensCreateParamsWithHTTPClient creates a new UsersTokensCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewUsersTokensCreateParamsWithHTTPClient(client *http.Client) *UsersTokensCreateParams { + return &UsersTokensCreateParams{ + HTTPClient: client, + } +} + +/* UsersTokensCreateParams contains all the parameters to send to the API endpoint + for the users tokens create operation. + + Typically these are written to a http.Request. +*/ +type UsersTokensCreateParams struct { + + // Data. + Data *models.WritableToken + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the users tokens create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensCreateParams) WithDefaults() *UsersTokensCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the users tokens create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the users tokens create params +func (o *UsersTokensCreateParams) WithTimeout(timeout time.Duration) *UsersTokensCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the users tokens create params +func (o *UsersTokensCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the users tokens create params +func (o *UsersTokensCreateParams) WithContext(ctx context.Context) *UsersTokensCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the users tokens create params +func (o *UsersTokensCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the users tokens create params +func (o *UsersTokensCreateParams) WithHTTPClient(client *http.Client) *UsersTokensCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the users tokens create params +func (o *UsersTokensCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the users tokens create params +func (o *UsersTokensCreateParams) WithData(data *models.WritableToken) *UsersTokensCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the users tokens create params +func (o *UsersTokensCreateParams) SetData(data *models.WritableToken) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *UsersTokensCreateParams) 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/netbox/client/users/users_tokens_create_responses.go b/netbox/client/users/users_tokens_create_responses.go new file mode 100644 index 000000000..d0458a88f --- /dev/null +++ b/netbox/client/users/users_tokens_create_responses.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package users + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// UsersTokensCreateReader is a Reader for the UsersTokensCreate structure. +type UsersTokensCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UsersTokensCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewUsersTokensCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewUsersTokensCreateCreated creates a UsersTokensCreateCreated with default headers values +func NewUsersTokensCreateCreated() *UsersTokensCreateCreated { + return &UsersTokensCreateCreated{} +} + +/* UsersTokensCreateCreated describes a response with status code 201, with default header values. + +UsersTokensCreateCreated users tokens create created +*/ +type UsersTokensCreateCreated struct { + Payload *models.Token +} + +func (o *UsersTokensCreateCreated) Error() string { + return fmt.Sprintf("[POST /users/tokens/][%d] usersTokensCreateCreated %+v", 201, o.Payload) +} +func (o *UsersTokensCreateCreated) GetPayload() *models.Token { + return o.Payload +} + +func (o *UsersTokensCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Token) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/users/users_tokens_delete_parameters.go b/netbox/client/users/users_tokens_delete_parameters.go new file mode 100644 index 000000000..267bb55ba --- /dev/null +++ b/netbox/client/users/users_tokens_delete_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package users + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewUsersTokensDeleteParams creates a new UsersTokensDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUsersTokensDeleteParams() *UsersTokensDeleteParams { + return &UsersTokensDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUsersTokensDeleteParamsWithTimeout creates a new UsersTokensDeleteParams object +// with the ability to set a timeout on a request. +func NewUsersTokensDeleteParamsWithTimeout(timeout time.Duration) *UsersTokensDeleteParams { + return &UsersTokensDeleteParams{ + timeout: timeout, + } +} + +// NewUsersTokensDeleteParamsWithContext creates a new UsersTokensDeleteParams object +// with the ability to set a context for a request. +func NewUsersTokensDeleteParamsWithContext(ctx context.Context) *UsersTokensDeleteParams { + return &UsersTokensDeleteParams{ + Context: ctx, + } +} + +// NewUsersTokensDeleteParamsWithHTTPClient creates a new UsersTokensDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewUsersTokensDeleteParamsWithHTTPClient(client *http.Client) *UsersTokensDeleteParams { + return &UsersTokensDeleteParams{ + HTTPClient: client, + } +} + +/* UsersTokensDeleteParams contains all the parameters to send to the API endpoint + for the users tokens delete operation. + + Typically these are written to a http.Request. +*/ +type UsersTokensDeleteParams struct { + + /* ID. + + A unique integer value identifying this token. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the users tokens delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensDeleteParams) WithDefaults() *UsersTokensDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the users tokens delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the users tokens delete params +func (o *UsersTokensDeleteParams) WithTimeout(timeout time.Duration) *UsersTokensDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the users tokens delete params +func (o *UsersTokensDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the users tokens delete params +func (o *UsersTokensDeleteParams) WithContext(ctx context.Context) *UsersTokensDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the users tokens delete params +func (o *UsersTokensDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the users tokens delete params +func (o *UsersTokensDeleteParams) WithHTTPClient(client *http.Client) *UsersTokensDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the users tokens delete params +func (o *UsersTokensDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the users tokens delete params +func (o *UsersTokensDeleteParams) WithID(id int64) *UsersTokensDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the users tokens delete params +func (o *UsersTokensDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *UsersTokensDeleteParams) 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/netbox/client/secrets/secrets_secret_roles_delete_responses.go b/netbox/client/users/users_tokens_delete_responses.go similarity index 54% rename from netbox/client/secrets/secrets_secret_roles_delete_responses.go rename to netbox/client/users/users_tokens_delete_responses.go index b1ea4b147..1d79d9dc7 100644 --- a/netbox/client/secrets/secrets_secret_roles_delete_responses.go +++ b/netbox/client/users/users_tokens_delete_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package users // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -27,16 +27,16 @@ import ( "github.com/go-openapi/strfmt" ) -// SecretsSecretRolesDeleteReader is a Reader for the SecretsSecretRolesDelete structure. -type SecretsSecretRolesDeleteReader struct { +// UsersTokensDeleteReader is a Reader for the UsersTokensDelete structure. +type UsersTokensDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretRolesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *UsersTokensDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 204: - result := NewSecretsSecretRolesDeleteNoContent() + result := NewUsersTokensDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -46,23 +46,23 @@ func (o *SecretsSecretRolesDeleteReader) ReadResponse(response runtime.ClientRes } } -// NewSecretsSecretRolesDeleteNoContent creates a SecretsSecretRolesDeleteNoContent with default headers values -func NewSecretsSecretRolesDeleteNoContent() *SecretsSecretRolesDeleteNoContent { - return &SecretsSecretRolesDeleteNoContent{} +// NewUsersTokensDeleteNoContent creates a UsersTokensDeleteNoContent with default headers values +func NewUsersTokensDeleteNoContent() *UsersTokensDeleteNoContent { + return &UsersTokensDeleteNoContent{} } -/* SecretsSecretRolesDeleteNoContent describes a response with status code 204, with default header values. +/* UsersTokensDeleteNoContent describes a response with status code 204, with default header values. -SecretsSecretRolesDeleteNoContent secrets secret roles delete no content +UsersTokensDeleteNoContent users tokens delete no content */ -type SecretsSecretRolesDeleteNoContent struct { +type UsersTokensDeleteNoContent struct { } -func (o *SecretsSecretRolesDeleteNoContent) Error() string { - return fmt.Sprintf("[DELETE /secrets/secret-roles/{id}/][%d] secretsSecretRolesDeleteNoContent ", 204) +func (o *UsersTokensDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /users/tokens/{id}/][%d] usersTokensDeleteNoContent ", 204) } -func (o *SecretsSecretRolesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *UsersTokensDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/users/users_tokens_list_parameters.go b/netbox/client/users/users_tokens_list_parameters.go new file mode 100644 index 000000000..dc2ae9d35 --- /dev/null +++ b/netbox/client/users/users_tokens_list_parameters.go @@ -0,0 +1,1110 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package users + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewUsersTokensListParams creates a new UsersTokensListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUsersTokensListParams() *UsersTokensListParams { + return &UsersTokensListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUsersTokensListParamsWithTimeout creates a new UsersTokensListParams object +// with the ability to set a timeout on a request. +func NewUsersTokensListParamsWithTimeout(timeout time.Duration) *UsersTokensListParams { + return &UsersTokensListParams{ + timeout: timeout, + } +} + +// NewUsersTokensListParamsWithContext creates a new UsersTokensListParams object +// with the ability to set a context for a request. +func NewUsersTokensListParamsWithContext(ctx context.Context) *UsersTokensListParams { + return &UsersTokensListParams{ + Context: ctx, + } +} + +// NewUsersTokensListParamsWithHTTPClient creates a new UsersTokensListParams object +// with the ability to set a custom HTTPClient for a request. +func NewUsersTokensListParamsWithHTTPClient(client *http.Client) *UsersTokensListParams { + return &UsersTokensListParams{ + HTTPClient: client, + } +} + +/* UsersTokensListParams contains all the parameters to send to the API endpoint + for the users tokens list operation. + + Typically these are written to a http.Request. +*/ +type UsersTokensListParams struct { + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // Expires. + Expires *string + + // ExpiresGte. + ExpiresGte *string + + // ExpiresLte. + ExpiresLte *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // Key. + Key *string + + // KeyEmpty. + KeyEmpty *string + + // KeyIc. + KeyIc *string + + // KeyIe. + KeyIe *string + + // KeyIew. + KeyIew *string + + // KeyIsw. + KeyIsw *string + + // Keyn. + Keyn *string + + // KeyNic. + KeyNic *string + + // KeyNie. + KeyNie *string + + // KeyNiew. + KeyNiew *string + + // KeyNisw. + KeyNisw *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Q. + Q *string + + // User. + User *string + + // Usern. + Usern *string + + // UserID. + UserID *string + + // UserIDn. + UserIDn *string + + // WriteEnabled. + WriteEnabled *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the users tokens list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensListParams) WithDefaults() *UsersTokensListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the users tokens list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the users tokens list params +func (o *UsersTokensListParams) WithTimeout(timeout time.Duration) *UsersTokensListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the users tokens list params +func (o *UsersTokensListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the users tokens list params +func (o *UsersTokensListParams) WithContext(ctx context.Context) *UsersTokensListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the users tokens list params +func (o *UsersTokensListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the users tokens list params +func (o *UsersTokensListParams) WithHTTPClient(client *http.Client) *UsersTokensListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the users tokens list params +func (o *UsersTokensListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCreated adds the created to the users tokens list params +func (o *UsersTokensListParams) WithCreated(created *string) *UsersTokensListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the users tokens list params +func (o *UsersTokensListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the users tokens list params +func (o *UsersTokensListParams) WithCreatedGte(createdGte *string) *UsersTokensListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the users tokens list params +func (o *UsersTokensListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the users tokens list params +func (o *UsersTokensListParams) WithCreatedLte(createdLte *string) *UsersTokensListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the users tokens list params +func (o *UsersTokensListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithExpires adds the expires to the users tokens list params +func (o *UsersTokensListParams) WithExpires(expires *string) *UsersTokensListParams { + o.SetExpires(expires) + return o +} + +// SetExpires adds the expires to the users tokens list params +func (o *UsersTokensListParams) SetExpires(expires *string) { + o.Expires = expires +} + +// WithExpiresGte adds the expiresGte to the users tokens list params +func (o *UsersTokensListParams) WithExpiresGte(expiresGte *string) *UsersTokensListParams { + o.SetExpiresGte(expiresGte) + return o +} + +// SetExpiresGte adds the expiresGte to the users tokens list params +func (o *UsersTokensListParams) SetExpiresGte(expiresGte *string) { + o.ExpiresGte = expiresGte +} + +// WithExpiresLte adds the expiresLte to the users tokens list params +func (o *UsersTokensListParams) WithExpiresLte(expiresLte *string) *UsersTokensListParams { + o.SetExpiresLte(expiresLte) + return o +} + +// SetExpiresLte adds the expiresLte to the users tokens list params +func (o *UsersTokensListParams) SetExpiresLte(expiresLte *string) { + o.ExpiresLte = expiresLte +} + +// WithID adds the id to the users tokens list params +func (o *UsersTokensListParams) WithID(id *string) *UsersTokensListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the users tokens list params +func (o *UsersTokensListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the users tokens list params +func (o *UsersTokensListParams) WithIDGt(iDGt *string) *UsersTokensListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the users tokens list params +func (o *UsersTokensListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the users tokens list params +func (o *UsersTokensListParams) WithIDGte(iDGte *string) *UsersTokensListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the users tokens list params +func (o *UsersTokensListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the users tokens list params +func (o *UsersTokensListParams) WithIDLt(iDLt *string) *UsersTokensListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the users tokens list params +func (o *UsersTokensListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the users tokens list params +func (o *UsersTokensListParams) WithIDLte(iDLte *string) *UsersTokensListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the users tokens list params +func (o *UsersTokensListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the users tokens list params +func (o *UsersTokensListParams) WithIDn(iDn *string) *UsersTokensListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the users tokens list params +func (o *UsersTokensListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithKey adds the key to the users tokens list params +func (o *UsersTokensListParams) WithKey(key *string) *UsersTokensListParams { + o.SetKey(key) + return o +} + +// SetKey adds the key to the users tokens list params +func (o *UsersTokensListParams) SetKey(key *string) { + o.Key = key +} + +// WithKeyEmpty adds the keyEmpty to the users tokens list params +func (o *UsersTokensListParams) WithKeyEmpty(keyEmpty *string) *UsersTokensListParams { + o.SetKeyEmpty(keyEmpty) + return o +} + +// SetKeyEmpty adds the keyEmpty to the users tokens list params +func (o *UsersTokensListParams) SetKeyEmpty(keyEmpty *string) { + o.KeyEmpty = keyEmpty +} + +// WithKeyIc adds the keyIc to the users tokens list params +func (o *UsersTokensListParams) WithKeyIc(keyIc *string) *UsersTokensListParams { + o.SetKeyIc(keyIc) + return o +} + +// SetKeyIc adds the keyIc to the users tokens list params +func (o *UsersTokensListParams) SetKeyIc(keyIc *string) { + o.KeyIc = keyIc +} + +// WithKeyIe adds the keyIe to the users tokens list params +func (o *UsersTokensListParams) WithKeyIe(keyIe *string) *UsersTokensListParams { + o.SetKeyIe(keyIe) + return o +} + +// SetKeyIe adds the keyIe to the users tokens list params +func (o *UsersTokensListParams) SetKeyIe(keyIe *string) { + o.KeyIe = keyIe +} + +// WithKeyIew adds the keyIew to the users tokens list params +func (o *UsersTokensListParams) WithKeyIew(keyIew *string) *UsersTokensListParams { + o.SetKeyIew(keyIew) + return o +} + +// SetKeyIew adds the keyIew to the users tokens list params +func (o *UsersTokensListParams) SetKeyIew(keyIew *string) { + o.KeyIew = keyIew +} + +// WithKeyIsw adds the keyIsw to the users tokens list params +func (o *UsersTokensListParams) WithKeyIsw(keyIsw *string) *UsersTokensListParams { + o.SetKeyIsw(keyIsw) + return o +} + +// SetKeyIsw adds the keyIsw to the users tokens list params +func (o *UsersTokensListParams) SetKeyIsw(keyIsw *string) { + o.KeyIsw = keyIsw +} + +// WithKeyn adds the keyn to the users tokens list params +func (o *UsersTokensListParams) WithKeyn(keyn *string) *UsersTokensListParams { + o.SetKeyn(keyn) + return o +} + +// SetKeyn adds the keyN to the users tokens list params +func (o *UsersTokensListParams) SetKeyn(keyn *string) { + o.Keyn = keyn +} + +// WithKeyNic adds the keyNic to the users tokens list params +func (o *UsersTokensListParams) WithKeyNic(keyNic *string) *UsersTokensListParams { + o.SetKeyNic(keyNic) + return o +} + +// SetKeyNic adds the keyNic to the users tokens list params +func (o *UsersTokensListParams) SetKeyNic(keyNic *string) { + o.KeyNic = keyNic +} + +// WithKeyNie adds the keyNie to the users tokens list params +func (o *UsersTokensListParams) WithKeyNie(keyNie *string) *UsersTokensListParams { + o.SetKeyNie(keyNie) + return o +} + +// SetKeyNie adds the keyNie to the users tokens list params +func (o *UsersTokensListParams) SetKeyNie(keyNie *string) { + o.KeyNie = keyNie +} + +// WithKeyNiew adds the keyNiew to the users tokens list params +func (o *UsersTokensListParams) WithKeyNiew(keyNiew *string) *UsersTokensListParams { + o.SetKeyNiew(keyNiew) + return o +} + +// SetKeyNiew adds the keyNiew to the users tokens list params +func (o *UsersTokensListParams) SetKeyNiew(keyNiew *string) { + o.KeyNiew = keyNiew +} + +// WithKeyNisw adds the keyNisw to the users tokens list params +func (o *UsersTokensListParams) WithKeyNisw(keyNisw *string) *UsersTokensListParams { + o.SetKeyNisw(keyNisw) + return o +} + +// SetKeyNisw adds the keyNisw to the users tokens list params +func (o *UsersTokensListParams) SetKeyNisw(keyNisw *string) { + o.KeyNisw = keyNisw +} + +// WithLimit adds the limit to the users tokens list params +func (o *UsersTokensListParams) WithLimit(limit *int64) *UsersTokensListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the users tokens list params +func (o *UsersTokensListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the users tokens list params +func (o *UsersTokensListParams) WithOffset(offset *int64) *UsersTokensListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the users tokens list params +func (o *UsersTokensListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithQ adds the q to the users tokens list params +func (o *UsersTokensListParams) WithQ(q *string) *UsersTokensListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the users tokens list params +func (o *UsersTokensListParams) SetQ(q *string) { + o.Q = q +} + +// WithUser adds the user to the users tokens list params +func (o *UsersTokensListParams) WithUser(user *string) *UsersTokensListParams { + o.SetUser(user) + return o +} + +// SetUser adds the user to the users tokens list params +func (o *UsersTokensListParams) SetUser(user *string) { + o.User = user +} + +// WithUsern adds the usern to the users tokens list params +func (o *UsersTokensListParams) WithUsern(usern *string) *UsersTokensListParams { + o.SetUsern(usern) + return o +} + +// SetUsern adds the userN to the users tokens list params +func (o *UsersTokensListParams) SetUsern(usern *string) { + o.Usern = usern +} + +// WithUserID adds the userID to the users tokens list params +func (o *UsersTokensListParams) WithUserID(userID *string) *UsersTokensListParams { + o.SetUserID(userID) + return o +} + +// SetUserID adds the userId to the users tokens list params +func (o *UsersTokensListParams) SetUserID(userID *string) { + o.UserID = userID +} + +// WithUserIDn adds the userIDn to the users tokens list params +func (o *UsersTokensListParams) WithUserIDn(userIDn *string) *UsersTokensListParams { + o.SetUserIDn(userIDn) + return o +} + +// SetUserIDn adds the userIdN to the users tokens list params +func (o *UsersTokensListParams) SetUserIDn(userIDn *string) { + o.UserIDn = userIDn +} + +// WithWriteEnabled adds the writeEnabled to the users tokens list params +func (o *UsersTokensListParams) WithWriteEnabled(writeEnabled *string) *UsersTokensListParams { + o.SetWriteEnabled(writeEnabled) + return o +} + +// SetWriteEnabled adds the writeEnabled to the users tokens list params +func (o *UsersTokensListParams) SetWriteEnabled(writeEnabled *string) { + o.WriteEnabled = writeEnabled +} + +// WriteToRequest writes these params to a swagger request +func (o *UsersTokensListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.Expires != nil { + + // query param expires + var qrExpires string + + if o.Expires != nil { + qrExpires = *o.Expires + } + qExpires := qrExpires + if qExpires != "" { + + if err := r.SetQueryParam("expires", qExpires); err != nil { + return err + } + } + } + + if o.ExpiresGte != nil { + + // query param expires__gte + var qrExpiresGte string + + if o.ExpiresGte != nil { + qrExpiresGte = *o.ExpiresGte + } + qExpiresGte := qrExpiresGte + if qExpiresGte != "" { + + if err := r.SetQueryParam("expires__gte", qExpiresGte); err != nil { + return err + } + } + } + + if o.ExpiresLte != nil { + + // query param expires__lte + var qrExpiresLte string + + if o.ExpiresLte != nil { + qrExpiresLte = *o.ExpiresLte + } + qExpiresLte := qrExpiresLte + if qExpiresLte != "" { + + if err := r.SetQueryParam("expires__lte", qExpiresLte); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.Key != nil { + + // query param key + var qrKey string + + if o.Key != nil { + qrKey = *o.Key + } + qKey := qrKey + if qKey != "" { + + if err := r.SetQueryParam("key", qKey); err != nil { + return err + } + } + } + + if o.KeyEmpty != nil { + + // query param key__empty + var qrKeyEmpty string + + if o.KeyEmpty != nil { + qrKeyEmpty = *o.KeyEmpty + } + qKeyEmpty := qrKeyEmpty + if qKeyEmpty != "" { + + if err := r.SetQueryParam("key__empty", qKeyEmpty); err != nil { + return err + } + } + } + + if o.KeyIc != nil { + + // query param key__ic + var qrKeyIc string + + if o.KeyIc != nil { + qrKeyIc = *o.KeyIc + } + qKeyIc := qrKeyIc + if qKeyIc != "" { + + if err := r.SetQueryParam("key__ic", qKeyIc); err != nil { + return err + } + } + } + + if o.KeyIe != nil { + + // query param key__ie + var qrKeyIe string + + if o.KeyIe != nil { + qrKeyIe = *o.KeyIe + } + qKeyIe := qrKeyIe + if qKeyIe != "" { + + if err := r.SetQueryParam("key__ie", qKeyIe); err != nil { + return err + } + } + } + + if o.KeyIew != nil { + + // query param key__iew + var qrKeyIew string + + if o.KeyIew != nil { + qrKeyIew = *o.KeyIew + } + qKeyIew := qrKeyIew + if qKeyIew != "" { + + if err := r.SetQueryParam("key__iew", qKeyIew); err != nil { + return err + } + } + } + + if o.KeyIsw != nil { + + // query param key__isw + var qrKeyIsw string + + if o.KeyIsw != nil { + qrKeyIsw = *o.KeyIsw + } + qKeyIsw := qrKeyIsw + if qKeyIsw != "" { + + if err := r.SetQueryParam("key__isw", qKeyIsw); err != nil { + return err + } + } + } + + if o.Keyn != nil { + + // query param key__n + var qrKeyn string + + if o.Keyn != nil { + qrKeyn = *o.Keyn + } + qKeyn := qrKeyn + if qKeyn != "" { + + if err := r.SetQueryParam("key__n", qKeyn); err != nil { + return err + } + } + } + + if o.KeyNic != nil { + + // query param key__nic + var qrKeyNic string + + if o.KeyNic != nil { + qrKeyNic = *o.KeyNic + } + qKeyNic := qrKeyNic + if qKeyNic != "" { + + if err := r.SetQueryParam("key__nic", qKeyNic); err != nil { + return err + } + } + } + + if o.KeyNie != nil { + + // query param key__nie + var qrKeyNie string + + if o.KeyNie != nil { + qrKeyNie = *o.KeyNie + } + qKeyNie := qrKeyNie + if qKeyNie != "" { + + if err := r.SetQueryParam("key__nie", qKeyNie); err != nil { + return err + } + } + } + + if o.KeyNiew != nil { + + // query param key__niew + var qrKeyNiew string + + if o.KeyNiew != nil { + qrKeyNiew = *o.KeyNiew + } + qKeyNiew := qrKeyNiew + if qKeyNiew != "" { + + if err := r.SetQueryParam("key__niew", qKeyNiew); err != nil { + return err + } + } + } + + if o.KeyNisw != nil { + + // query param key__nisw + var qrKeyNisw string + + if o.KeyNisw != nil { + qrKeyNisw = *o.KeyNisw + } + qKeyNisw := qrKeyNisw + if qKeyNisw != "" { + + if err := r.SetQueryParam("key__nisw", qKeyNisw); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.User != nil { + + // query param user + var qrUser string + + if o.User != nil { + qrUser = *o.User + } + qUser := qrUser + if qUser != "" { + + if err := r.SetQueryParam("user", qUser); err != nil { + return err + } + } + } + + if o.Usern != nil { + + // query param user__n + var qrUsern string + + if o.Usern != nil { + qrUsern = *o.Usern + } + qUsern := qrUsern + if qUsern != "" { + + if err := r.SetQueryParam("user__n", qUsern); err != nil { + return err + } + } + } + + if o.UserID != nil { + + // query param user_id + var qrUserID string + + if o.UserID != nil { + qrUserID = *o.UserID + } + qUserID := qrUserID + if qUserID != "" { + + if err := r.SetQueryParam("user_id", qUserID); err != nil { + return err + } + } + } + + if o.UserIDn != nil { + + // query param user_id__n + var qrUserIDn string + + if o.UserIDn != nil { + qrUserIDn = *o.UserIDn + } + qUserIDn := qrUserIDn + if qUserIDn != "" { + + if err := r.SetQueryParam("user_id__n", qUserIDn); err != nil { + return err + } + } + } + + if o.WriteEnabled != nil { + + // query param write_enabled + var qrWriteEnabled string + + if o.WriteEnabled != nil { + qrWriteEnabled = *o.WriteEnabled + } + qWriteEnabled := qrWriteEnabled + if qWriteEnabled != "" { + + if err := r.SetQueryParam("write_enabled", qWriteEnabled); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/secrets/secrets_secrets_list_responses.go b/netbox/client/users/users_tokens_list_responses.go similarity index 55% rename from netbox/client/secrets/secrets_secrets_list_responses.go rename to netbox/client/users/users_tokens_list_responses.go index 88103d8f2..a7a58a35a 100644 --- a/netbox/client/secrets/secrets_secrets_list_responses.go +++ b/netbox/client/users/users_tokens_list_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package users // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -35,16 +35,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// SecretsSecretsListReader is a Reader for the SecretsSecretsList structure. -type SecretsSecretsListReader struct { +// UsersTokensListReader is a Reader for the UsersTokensList structure. +type UsersTokensListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *UsersTokensListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewSecretsSecretsListOK() + result := NewUsersTokensListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -54,29 +54,29 @@ func (o *SecretsSecretsListReader) ReadResponse(response runtime.ClientResponse, } } -// NewSecretsSecretsListOK creates a SecretsSecretsListOK with default headers values -func NewSecretsSecretsListOK() *SecretsSecretsListOK { - return &SecretsSecretsListOK{} +// NewUsersTokensListOK creates a UsersTokensListOK with default headers values +func NewUsersTokensListOK() *UsersTokensListOK { + return &UsersTokensListOK{} } -/* SecretsSecretsListOK describes a response with status code 200, with default header values. +/* UsersTokensListOK describes a response with status code 200, with default header values. -SecretsSecretsListOK secrets secrets list o k +UsersTokensListOK users tokens list o k */ -type SecretsSecretsListOK struct { - Payload *SecretsSecretsListOKBody +type UsersTokensListOK struct { + Payload *UsersTokensListOKBody } -func (o *SecretsSecretsListOK) Error() string { - return fmt.Sprintf("[GET /secrets/secrets/][%d] secretsSecretsListOK %+v", 200, o.Payload) +func (o *UsersTokensListOK) Error() string { + return fmt.Sprintf("[GET /users/tokens/][%d] usersTokensListOK %+v", 200, o.Payload) } -func (o *SecretsSecretsListOK) GetPayload() *SecretsSecretsListOKBody { +func (o *UsersTokensListOK) GetPayload() *UsersTokensListOKBody { return o.Payload } -func (o *SecretsSecretsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *UsersTokensListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SecretsSecretsListOKBody) + o.Payload = new(UsersTokensListOKBody) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -86,10 +86,10 @@ func (o *SecretsSecretsListOK) readResponse(response runtime.ClientResponse, con return nil } -/*SecretsSecretsListOKBody secrets secrets list o k body -swagger:model SecretsSecretsListOKBody +/*UsersTokensListOKBody users tokens list o k body +swagger:model UsersTokensListOKBody */ -type SecretsSecretsListOKBody struct { +type UsersTokensListOKBody struct { // count // Required: true @@ -105,11 +105,11 @@ type SecretsSecretsListOKBody struct { // results // Required: true - Results []*models.Secret `json:"results"` + Results []*models.Token `json:"results"` } -// Validate validates this secrets secrets list o k body -func (o *SecretsSecretsListOKBody) Validate(formats strfmt.Registry) error { +// Validate validates this users tokens list o k body +func (o *UsersTokensListOKBody) Validate(formats strfmt.Registry) error { var res []error if err := o.validateCount(formats); err != nil { @@ -134,42 +134,42 @@ func (o *SecretsSecretsListOKBody) Validate(formats strfmt.Registry) error { return nil } -func (o *SecretsSecretsListOKBody) validateCount(formats strfmt.Registry) error { +func (o *UsersTokensListOKBody) validateCount(formats strfmt.Registry) error { - if err := validate.Required("secretsSecretsListOK"+"."+"count", "body", o.Count); err != nil { + if err := validate.Required("usersTokensListOK"+"."+"count", "body", o.Count); err != nil { return err } return nil } -func (o *SecretsSecretsListOKBody) validateNext(formats strfmt.Registry) error { +func (o *UsersTokensListOKBody) validateNext(formats strfmt.Registry) error { if swag.IsZero(o.Next) { // not required return nil } - if err := validate.FormatOf("secretsSecretsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + if err := validate.FormatOf("usersTokensListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { return err } return nil } -func (o *SecretsSecretsListOKBody) validatePrevious(formats strfmt.Registry) error { +func (o *UsersTokensListOKBody) validatePrevious(formats strfmt.Registry) error { if swag.IsZero(o.Previous) { // not required return nil } - if err := validate.FormatOf("secretsSecretsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + if err := validate.FormatOf("usersTokensListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { return err } return nil } -func (o *SecretsSecretsListOKBody) validateResults(formats strfmt.Registry) error { +func (o *UsersTokensListOKBody) validateResults(formats strfmt.Registry) error { - if err := validate.Required("secretsSecretsListOK"+"."+"results", "body", o.Results); err != nil { + if err := validate.Required("usersTokensListOK"+"."+"results", "body", o.Results); err != nil { return err } @@ -181,7 +181,7 @@ func (o *SecretsSecretsListOKBody) validateResults(formats strfmt.Registry) erro if o.Results[i] != nil { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secretsSecretsListOK" + "." + "results" + "." + strconv.Itoa(i)) + return ve.ValidateName("usersTokensListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -192,8 +192,8 @@ func (o *SecretsSecretsListOKBody) validateResults(formats strfmt.Registry) erro return nil } -// ContextValidate validate this secrets secrets list o k body based on the context it is used -func (o *SecretsSecretsListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this users tokens list o k body based on the context it is used +func (o *UsersTokensListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateResults(ctx, formats); err != nil { @@ -206,14 +206,14 @@ func (o *SecretsSecretsListOKBody) ContextValidate(ctx context.Context, formats return nil } -func (o *SecretsSecretsListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { +func (o *UsersTokensListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(o.Results); i++ { if o.Results[i] != nil { if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secretsSecretsListOK" + "." + "results" + "." + strconv.Itoa(i)) + return ve.ValidateName("usersTokensListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -225,7 +225,7 @@ func (o *SecretsSecretsListOKBody) contextValidateResults(ctx context.Context, f } // MarshalBinary interface implementation -func (o *SecretsSecretsListOKBody) MarshalBinary() ([]byte, error) { +func (o *UsersTokensListOKBody) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -233,8 +233,8 @@ func (o *SecretsSecretsListOKBody) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *SecretsSecretsListOKBody) UnmarshalBinary(b []byte) error { - var res SecretsSecretsListOKBody +func (o *UsersTokensListOKBody) UnmarshalBinary(b []byte) error { + var res UsersTokensListOKBody if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/netbox/client/users/users_tokens_partial_update_parameters.go b/netbox/client/users/users_tokens_partial_update_parameters.go new file mode 100644 index 000000000..8fc0eb203 --- /dev/null +++ b/netbox/client/users/users_tokens_partial_update_parameters.go @@ -0,0 +1,186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package users + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewUsersTokensPartialUpdateParams creates a new UsersTokensPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUsersTokensPartialUpdateParams() *UsersTokensPartialUpdateParams { + return &UsersTokensPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUsersTokensPartialUpdateParamsWithTimeout creates a new UsersTokensPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewUsersTokensPartialUpdateParamsWithTimeout(timeout time.Duration) *UsersTokensPartialUpdateParams { + return &UsersTokensPartialUpdateParams{ + timeout: timeout, + } +} + +// NewUsersTokensPartialUpdateParamsWithContext creates a new UsersTokensPartialUpdateParams object +// with the ability to set a context for a request. +func NewUsersTokensPartialUpdateParamsWithContext(ctx context.Context) *UsersTokensPartialUpdateParams { + return &UsersTokensPartialUpdateParams{ + Context: ctx, + } +} + +// NewUsersTokensPartialUpdateParamsWithHTTPClient creates a new UsersTokensPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewUsersTokensPartialUpdateParamsWithHTTPClient(client *http.Client) *UsersTokensPartialUpdateParams { + return &UsersTokensPartialUpdateParams{ + HTTPClient: client, + } +} + +/* UsersTokensPartialUpdateParams contains all the parameters to send to the API endpoint + for the users tokens partial update operation. + + Typically these are written to a http.Request. +*/ +type UsersTokensPartialUpdateParams struct { + + // Data. + Data *models.WritableToken + + /* ID. + + A unique integer value identifying this token. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the users tokens partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensPartialUpdateParams) WithDefaults() *UsersTokensPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the users tokens partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the users tokens partial update params +func (o *UsersTokensPartialUpdateParams) WithTimeout(timeout time.Duration) *UsersTokensPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the users tokens partial update params +func (o *UsersTokensPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the users tokens partial update params +func (o *UsersTokensPartialUpdateParams) WithContext(ctx context.Context) *UsersTokensPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the users tokens partial update params +func (o *UsersTokensPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the users tokens partial update params +func (o *UsersTokensPartialUpdateParams) WithHTTPClient(client *http.Client) *UsersTokensPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the users tokens partial update params +func (o *UsersTokensPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the users tokens partial update params +func (o *UsersTokensPartialUpdateParams) WithData(data *models.WritableToken) *UsersTokensPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the users tokens partial update params +func (o *UsersTokensPartialUpdateParams) SetData(data *models.WritableToken) { + o.Data = data +} + +// WithID adds the id to the users tokens partial update params +func (o *UsersTokensPartialUpdateParams) WithID(id int64) *UsersTokensPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the users tokens partial update params +func (o *UsersTokensPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *UsersTokensPartialUpdateParams) 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/netbox/client/secrets/secrets_secrets_bulk_update_responses.go b/netbox/client/users/users_tokens_partial_update_responses.go similarity index 65% rename from netbox/client/secrets/secrets_secrets_bulk_update_responses.go rename to netbox/client/users/users_tokens_partial_update_responses.go index f44ea7bd2..3be133383 100644 --- a/netbox/client/secrets/secrets_secrets_bulk_update_responses.go +++ b/netbox/client/users/users_tokens_partial_update_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package users // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// SecretsSecretsBulkUpdateReader is a Reader for the SecretsSecretsBulkUpdate structure. -type SecretsSecretsBulkUpdateReader struct { +// UsersTokensPartialUpdateReader is a Reader for the UsersTokensPartialUpdate structure. +type UsersTokensPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsSecretsBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *UsersTokensPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewSecretsSecretsBulkUpdateOK() + result := NewUsersTokensPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,29 +49,29 @@ func (o *SecretsSecretsBulkUpdateReader) ReadResponse(response runtime.ClientRes } } -// NewSecretsSecretsBulkUpdateOK creates a SecretsSecretsBulkUpdateOK with default headers values -func NewSecretsSecretsBulkUpdateOK() *SecretsSecretsBulkUpdateOK { - return &SecretsSecretsBulkUpdateOK{} +// NewUsersTokensPartialUpdateOK creates a UsersTokensPartialUpdateOK with default headers values +func NewUsersTokensPartialUpdateOK() *UsersTokensPartialUpdateOK { + return &UsersTokensPartialUpdateOK{} } -/* SecretsSecretsBulkUpdateOK describes a response with status code 200, with default header values. +/* UsersTokensPartialUpdateOK describes a response with status code 200, with default header values. -SecretsSecretsBulkUpdateOK secrets secrets bulk update o k +UsersTokensPartialUpdateOK users tokens partial update o k */ -type SecretsSecretsBulkUpdateOK struct { - Payload *models.Secret +type UsersTokensPartialUpdateOK struct { + Payload *models.Token } -func (o *SecretsSecretsBulkUpdateOK) Error() string { - return fmt.Sprintf("[PUT /secrets/secrets/][%d] secretsSecretsBulkUpdateOK %+v", 200, o.Payload) +func (o *UsersTokensPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /users/tokens/{id}/][%d] usersTokensPartialUpdateOK %+v", 200, o.Payload) } -func (o *SecretsSecretsBulkUpdateOK) GetPayload() *models.Secret { +func (o *UsersTokensPartialUpdateOK) GetPayload() *models.Token { return o.Payload } -func (o *SecretsSecretsBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *UsersTokensPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.Secret) + o.Payload = new(models.Token) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/netbox/client/users/users_tokens_provision_create_parameters.go b/netbox/client/users/users_tokens_provision_create_parameters.go new file mode 100644 index 000000000..dc3c861a1 --- /dev/null +++ b/netbox/client/users/users_tokens_provision_create_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package users + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewUsersTokensProvisionCreateParams creates a new UsersTokensProvisionCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUsersTokensProvisionCreateParams() *UsersTokensProvisionCreateParams { + return &UsersTokensProvisionCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUsersTokensProvisionCreateParamsWithTimeout creates a new UsersTokensProvisionCreateParams object +// with the ability to set a timeout on a request. +func NewUsersTokensProvisionCreateParamsWithTimeout(timeout time.Duration) *UsersTokensProvisionCreateParams { + return &UsersTokensProvisionCreateParams{ + timeout: timeout, + } +} + +// NewUsersTokensProvisionCreateParamsWithContext creates a new UsersTokensProvisionCreateParams object +// with the ability to set a context for a request. +func NewUsersTokensProvisionCreateParamsWithContext(ctx context.Context) *UsersTokensProvisionCreateParams { + return &UsersTokensProvisionCreateParams{ + Context: ctx, + } +} + +// NewUsersTokensProvisionCreateParamsWithHTTPClient creates a new UsersTokensProvisionCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewUsersTokensProvisionCreateParamsWithHTTPClient(client *http.Client) *UsersTokensProvisionCreateParams { + return &UsersTokensProvisionCreateParams{ + HTTPClient: client, + } +} + +/* UsersTokensProvisionCreateParams contains all the parameters to send to the API endpoint + for the users tokens provision create operation. + + Typically these are written to a http.Request. +*/ +type UsersTokensProvisionCreateParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the users tokens provision create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensProvisionCreateParams) WithDefaults() *UsersTokensProvisionCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the users tokens provision create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensProvisionCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the users tokens provision create params +func (o *UsersTokensProvisionCreateParams) WithTimeout(timeout time.Duration) *UsersTokensProvisionCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the users tokens provision create params +func (o *UsersTokensProvisionCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the users tokens provision create params +func (o *UsersTokensProvisionCreateParams) WithContext(ctx context.Context) *UsersTokensProvisionCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the users tokens provision create params +func (o *UsersTokensProvisionCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the users tokens provision create params +func (o *UsersTokensProvisionCreateParams) WithHTTPClient(client *http.Client) *UsersTokensProvisionCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the users tokens provision create params +func (o *UsersTokensProvisionCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *UsersTokensProvisionCreateParams) 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/netbox/client/secrets/secrets_get_session_key_create_responses.go b/netbox/client/users/users_tokens_provision_create_responses.go similarity index 62% rename from netbox/client/secrets/secrets_get_session_key_create_responses.go rename to netbox/client/users/users_tokens_provision_create_responses.go index 0e70054e8..8c82c9ff5 100644 --- a/netbox/client/secrets/secrets_get_session_key_create_responses.go +++ b/netbox/client/users/users_tokens_provision_create_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package secrets +package users // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -27,16 +27,16 @@ import ( "github.com/go-openapi/strfmt" ) -// SecretsGetSessionKeyCreateReader is a Reader for the SecretsGetSessionKeyCreate structure. -type SecretsGetSessionKeyCreateReader struct { +// UsersTokensProvisionCreateReader is a Reader for the UsersTokensProvisionCreate structure. +type UsersTokensProvisionCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsGetSessionKeyCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *UsersTokensProvisionCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 201: - result := NewSecretsGetSessionKeyCreateCreated() + result := NewUsersTokensProvisionCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -46,23 +46,23 @@ func (o *SecretsGetSessionKeyCreateReader) ReadResponse(response runtime.ClientR } } -// NewSecretsGetSessionKeyCreateCreated creates a SecretsGetSessionKeyCreateCreated with default headers values -func NewSecretsGetSessionKeyCreateCreated() *SecretsGetSessionKeyCreateCreated { - return &SecretsGetSessionKeyCreateCreated{} +// NewUsersTokensProvisionCreateCreated creates a UsersTokensProvisionCreateCreated with default headers values +func NewUsersTokensProvisionCreateCreated() *UsersTokensProvisionCreateCreated { + return &UsersTokensProvisionCreateCreated{} } -/* SecretsGetSessionKeyCreateCreated describes a response with status code 201, with default header values. +/* UsersTokensProvisionCreateCreated describes a response with status code 201, with default header values. -SecretsGetSessionKeyCreateCreated secrets get session key create created +UsersTokensProvisionCreateCreated users tokens provision create created */ -type SecretsGetSessionKeyCreateCreated struct { +type UsersTokensProvisionCreateCreated struct { } -func (o *SecretsGetSessionKeyCreateCreated) Error() string { - return fmt.Sprintf("[POST /secrets/get-session-key/][%d] secretsGetSessionKeyCreateCreated ", 201) +func (o *UsersTokensProvisionCreateCreated) Error() string { + return fmt.Sprintf("[POST /users/tokens/provision/][%d] usersTokensProvisionCreateCreated ", 201) } -func (o *SecretsGetSessionKeyCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *UsersTokensProvisionCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/users/users_tokens_read_parameters.go b/netbox/client/users/users_tokens_read_parameters.go new file mode 100644 index 000000000..081e5ce18 --- /dev/null +++ b/netbox/client/users/users_tokens_read_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package users + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewUsersTokensReadParams creates a new UsersTokensReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUsersTokensReadParams() *UsersTokensReadParams { + return &UsersTokensReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUsersTokensReadParamsWithTimeout creates a new UsersTokensReadParams object +// with the ability to set a timeout on a request. +func NewUsersTokensReadParamsWithTimeout(timeout time.Duration) *UsersTokensReadParams { + return &UsersTokensReadParams{ + timeout: timeout, + } +} + +// NewUsersTokensReadParamsWithContext creates a new UsersTokensReadParams object +// with the ability to set a context for a request. +func NewUsersTokensReadParamsWithContext(ctx context.Context) *UsersTokensReadParams { + return &UsersTokensReadParams{ + Context: ctx, + } +} + +// NewUsersTokensReadParamsWithHTTPClient creates a new UsersTokensReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewUsersTokensReadParamsWithHTTPClient(client *http.Client) *UsersTokensReadParams { + return &UsersTokensReadParams{ + HTTPClient: client, + } +} + +/* UsersTokensReadParams contains all the parameters to send to the API endpoint + for the users tokens read operation. + + Typically these are written to a http.Request. +*/ +type UsersTokensReadParams struct { + + /* ID. + + A unique integer value identifying this token. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the users tokens read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensReadParams) WithDefaults() *UsersTokensReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the users tokens read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the users tokens read params +func (o *UsersTokensReadParams) WithTimeout(timeout time.Duration) *UsersTokensReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the users tokens read params +func (o *UsersTokensReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the users tokens read params +func (o *UsersTokensReadParams) WithContext(ctx context.Context) *UsersTokensReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the users tokens read params +func (o *UsersTokensReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the users tokens read params +func (o *UsersTokensReadParams) WithHTTPClient(client *http.Client) *UsersTokensReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the users tokens read params +func (o *UsersTokensReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the users tokens read params +func (o *UsersTokensReadParams) WithID(id int64) *UsersTokensReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the users tokens read params +func (o *UsersTokensReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *UsersTokensReadParams) 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/netbox/client/users/users_tokens_read_responses.go b/netbox/client/users/users_tokens_read_responses.go new file mode 100644 index 000000000..4a1f2f39a --- /dev/null +++ b/netbox/client/users/users_tokens_read_responses.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package users + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// UsersTokensReadReader is a Reader for the UsersTokensRead structure. +type UsersTokensReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UsersTokensReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUsersTokensReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewUsersTokensReadOK creates a UsersTokensReadOK with default headers values +func NewUsersTokensReadOK() *UsersTokensReadOK { + return &UsersTokensReadOK{} +} + +/* UsersTokensReadOK describes a response with status code 200, with default header values. + +UsersTokensReadOK users tokens read o k +*/ +type UsersTokensReadOK struct { + Payload *models.Token +} + +func (o *UsersTokensReadOK) Error() string { + return fmt.Sprintf("[GET /users/tokens/{id}/][%d] usersTokensReadOK %+v", 200, o.Payload) +} +func (o *UsersTokensReadOK) GetPayload() *models.Token { + return o.Payload +} + +func (o *UsersTokensReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Token) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/users/users_tokens_update_parameters.go b/netbox/client/users/users_tokens_update_parameters.go new file mode 100644 index 000000000..73bbb693d --- /dev/null +++ b/netbox/client/users/users_tokens_update_parameters.go @@ -0,0 +1,186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package users + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewUsersTokensUpdateParams creates a new UsersTokensUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUsersTokensUpdateParams() *UsersTokensUpdateParams { + return &UsersTokensUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUsersTokensUpdateParamsWithTimeout creates a new UsersTokensUpdateParams object +// with the ability to set a timeout on a request. +func NewUsersTokensUpdateParamsWithTimeout(timeout time.Duration) *UsersTokensUpdateParams { + return &UsersTokensUpdateParams{ + timeout: timeout, + } +} + +// NewUsersTokensUpdateParamsWithContext creates a new UsersTokensUpdateParams object +// with the ability to set a context for a request. +func NewUsersTokensUpdateParamsWithContext(ctx context.Context) *UsersTokensUpdateParams { + return &UsersTokensUpdateParams{ + Context: ctx, + } +} + +// NewUsersTokensUpdateParamsWithHTTPClient creates a new UsersTokensUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewUsersTokensUpdateParamsWithHTTPClient(client *http.Client) *UsersTokensUpdateParams { + return &UsersTokensUpdateParams{ + HTTPClient: client, + } +} + +/* UsersTokensUpdateParams contains all the parameters to send to the API endpoint + for the users tokens update operation. + + Typically these are written to a http.Request. +*/ +type UsersTokensUpdateParams struct { + + // Data. + Data *models.WritableToken + + /* ID. + + A unique integer value identifying this token. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the users tokens update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensUpdateParams) WithDefaults() *UsersTokensUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the users tokens update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UsersTokensUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the users tokens update params +func (o *UsersTokensUpdateParams) WithTimeout(timeout time.Duration) *UsersTokensUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the users tokens update params +func (o *UsersTokensUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the users tokens update params +func (o *UsersTokensUpdateParams) WithContext(ctx context.Context) *UsersTokensUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the users tokens update params +func (o *UsersTokensUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the users tokens update params +func (o *UsersTokensUpdateParams) WithHTTPClient(client *http.Client) *UsersTokensUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the users tokens update params +func (o *UsersTokensUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the users tokens update params +func (o *UsersTokensUpdateParams) WithData(data *models.WritableToken) *UsersTokensUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the users tokens update params +func (o *UsersTokensUpdateParams) SetData(data *models.WritableToken) { + o.Data = data +} + +// WithID adds the id to the users tokens update params +func (o *UsersTokensUpdateParams) WithID(id int64) *UsersTokensUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the users tokens update params +func (o *UsersTokensUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *UsersTokensUpdateParams) 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/netbox/client/users/users_tokens_update_responses.go b/netbox/client/users/users_tokens_update_responses.go new file mode 100644 index 000000000..4f088d1f0 --- /dev/null +++ b/netbox/client/users/users_tokens_update_responses.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package users + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// UsersTokensUpdateReader is a Reader for the UsersTokensUpdate structure. +type UsersTokensUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UsersTokensUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUsersTokensUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewUsersTokensUpdateOK creates a UsersTokensUpdateOK with default headers values +func NewUsersTokensUpdateOK() *UsersTokensUpdateOK { + return &UsersTokensUpdateOK{} +} + +/* UsersTokensUpdateOK describes a response with status code 200, with default header values. + +UsersTokensUpdateOK users tokens update o k +*/ +type UsersTokensUpdateOK struct { + Payload *models.Token +} + +func (o *UsersTokensUpdateOK) Error() string { + return fmt.Sprintf("[PUT /users/tokens/{id}/][%d] usersTokensUpdateOK %+v", 200, o.Payload) +} +func (o *UsersTokensUpdateOK) GetPayload() *models.Token { + return o.Payload +} + +func (o *UsersTokensUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Token) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/virtualization/virtualization_client.go b/netbox/client/virtualization/virtualization_client.go index a098b652b..dd6a9c76a 100644 --- a/netbox/client/virtualization/virtualization_client.go +++ b/netbox/client/virtualization/virtualization_client.go @@ -334,7 +334,7 @@ func (a *Client) VirtualizationClusterGroupsDelete(params *VirtualizationCluster } /* - VirtualizationClusterGroupsList virtualization cluster groups list API + VirtualizationClusterGroupsList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) VirtualizationClusterGroupsList(params *VirtualizationClusterGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VirtualizationClusterGroupsListOK, error) { // TODO: Validate the params before sending @@ -685,7 +685,7 @@ func (a *Client) VirtualizationClusterTypesDelete(params *VirtualizationClusterT } /* - VirtualizationClusterTypesList virtualization cluster types list API + VirtualizationClusterTypesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) VirtualizationClusterTypesList(params *VirtualizationClusterTypesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VirtualizationClusterTypesListOK, error) { // TODO: Validate the params before sending @@ -1036,7 +1036,7 @@ func (a *Client) VirtualizationClustersDelete(params *VirtualizationClustersDele } /* - VirtualizationClustersList virtualization clusters list API + VirtualizationClustersList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) VirtualizationClustersList(params *VirtualizationClustersListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VirtualizationClustersListOK, error) { // TODO: Validate the params before sending @@ -1387,7 +1387,7 @@ func (a *Client) VirtualizationInterfacesDelete(params *VirtualizationInterfaces } /* - VirtualizationInterfacesList virtualization interfaces list API + VirtualizationInterfacesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) VirtualizationInterfacesList(params *VirtualizationInterfacesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VirtualizationInterfacesListOK, error) { // TODO: Validate the params before sending @@ -1738,7 +1738,7 @@ func (a *Client) VirtualizationVirtualMachinesDelete(params *VirtualizationVirtu } /* - VirtualizationVirtualMachinesList virtualization virtual machines list API + VirtualizationVirtualMachinesList Overrides ListModelMixin to allow processing ExportTemplates. */ func (a *Client) VirtualizationVirtualMachinesList(params *VirtualizationVirtualMachinesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VirtualizationVirtualMachinesListOK, error) { // TODO: Validate the params before sending diff --git a/netbox/models/cable.go b/netbox/models/cable.go index c06667cc6..67565caf6 100644 --- a/netbox/models/cable.go +++ b/netbox/models/cable.go @@ -57,9 +57,7 @@ type Cable struct { Label string `json:"label,omitempty"` // Length - // Maximum: 32767 - // Minimum: 0 - Length *int64 `json:"length,omitempty"` + Length *float64 `json:"length,omitempty"` // length unit LengthUnit *CableLengthUnit `json:"length_unit,omitempty"` @@ -72,7 +70,7 @@ type Cable struct { // Termination a // Read Only: true - Terminationa map[string]*string `json:"termination_a,omitempty"` + Terminationa interface{} `json:"termination_a,omitempty"` // Termination a id // Required: true @@ -86,7 +84,7 @@ type Cable struct { // Termination b // Read Only: true - Terminationb map[string]*string `json:"termination_b,omitempty"` + Terminationb interface{} `json:"termination_b,omitempty"` // Termination b id // Required: true @@ -120,10 +118,6 @@ func (m *Cable) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateLength(formats); err != nil { - res = append(res, err) - } - if err := m.validateLengthUnit(formats); err != nil { res = append(res, err) } @@ -194,22 +188,6 @@ func (m *Cable) validateLabel(formats strfmt.Registry) error { return nil } -func (m *Cable) validateLength(formats strfmt.Registry) error { - if swag.IsZero(m.Length) { // not required - return nil - } - - if err := validate.MinimumInt("length", "body", *m.Length, 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("length", "body", *m.Length, 32767, false); err != nil { - return err - } - - return nil -} - func (m *Cable) validateLengthUnit(formats strfmt.Registry) error { if swag.IsZero(m.LengthUnit) { // not required return nil @@ -461,14 +439,6 @@ func (m *Cable) ContextValidate(ctx context.Context, formats strfmt.Registry) er res = append(res, err) } - if err := m.contextValidateTerminationa(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTerminationb(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -543,16 +513,6 @@ func (m *Cable) contextValidateTags(ctx context.Context, formats strfmt.Registry return nil } -func (m *Cable) contextValidateTerminationa(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *Cable) contextValidateTerminationb(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *Cable) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { @@ -587,12 +547,12 @@ type CableLengthUnit struct { // label // Required: true - // Enum: [Meters Centimeters Feet Inches] + // Enum: [Kilometers Meters Centimeters Miles Feet Inches] Label *string `json:"label"` // value // Required: true - // Enum: [m cm ft in] + // Enum: [km m cm mi ft in] Value *string `json:"value"` } @@ -618,7 +578,7 @@ var cableLengthUnitTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Meters","Centimeters","Feet","Inches"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Kilometers","Meters","Centimeters","Miles","Feet","Inches"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -628,12 +588,18 @@ func init() { const ( + // CableLengthUnitLabelKilometers captures enum value "Kilometers" + CableLengthUnitLabelKilometers string = "Kilometers" + // CableLengthUnitLabelMeters captures enum value "Meters" CableLengthUnitLabelMeters string = "Meters" // CableLengthUnitLabelCentimeters captures enum value "Centimeters" CableLengthUnitLabelCentimeters string = "Centimeters" + // CableLengthUnitLabelMiles captures enum value "Miles" + CableLengthUnitLabelMiles string = "Miles" + // CableLengthUnitLabelFeet captures enum value "Feet" CableLengthUnitLabelFeet string = "Feet" @@ -667,7 +633,7 @@ var cableLengthUnitTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["m","cm","ft","in"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["km","m","cm","mi","ft","in"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -677,12 +643,18 @@ func init() { const ( + // CableLengthUnitValueKm captures enum value "km" + CableLengthUnitValueKm string = "km" + // CableLengthUnitValueM captures enum value "m" CableLengthUnitValueM string = "m" // CableLengthUnitValueCm captures enum value "cm" CableLengthUnitValueCm string = "cm" + // CableLengthUnitValueMi captures enum value "mi" + CableLengthUnitValueMi string = "mi" + // CableLengthUnitValueFt captures enum value "ft" CableLengthUnitValueFt string = "ft" diff --git a/netbox/models/circuit_termination.go b/netbox/models/circuit_termination.go index 9f54092e4..77b2148fb 100644 --- a/netbox/models/circuit_termination.go +++ b/netbox/models/circuit_termination.go @@ -48,7 +48,7 @@ type CircuitTermination struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true @@ -370,10 +370,6 @@ func (m *CircuitTermination) ContextValidate(ctx context.Context, formats strfmt res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } @@ -431,11 +427,6 @@ func (m *CircuitTermination) contextValidateCable(ctx context.Context, formats s return nil } -func (m *CircuitTermination) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *CircuitTermination) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { diff --git a/netbox/models/console_port.go b/netbox/models/console_port.go index e312a7c60..55ee3a4d3 100644 --- a/netbox/models/console_port.go +++ b/netbox/models/console_port.go @@ -49,7 +49,7 @@ type ConsolePort struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true @@ -61,7 +61,7 @@ type ConsolePort struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -368,18 +368,10 @@ func (m *ConsolePort) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { res = append(res, err) } @@ -453,11 +445,6 @@ func (m *ConsolePort) contextValidateCable(ctx context.Context, formats strfmt.R return nil } -func (m *ConsolePort) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *ConsolePort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { @@ -467,11 +454,6 @@ func (m *ConsolePort) contextValidateCablePeerType(ctx context.Context, formats return nil } -func (m *ConsolePort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *ConsolePort) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { diff --git a/netbox/models/console_server_port.go b/netbox/models/console_server_port.go index ec62d846f..065c44f3a 100644 --- a/netbox/models/console_server_port.go +++ b/netbox/models/console_server_port.go @@ -49,7 +49,7 @@ type ConsoleServerPort struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true @@ -61,7 +61,7 @@ type ConsoleServerPort struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -368,18 +368,10 @@ func (m *ConsoleServerPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { res = append(res, err) } @@ -453,11 +445,6 @@ func (m *ConsoleServerPort) contextValidateCable(ctx context.Context, formats st return nil } -func (m *ConsoleServerPort) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *ConsoleServerPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { @@ -467,11 +454,6 @@ func (m *ConsoleServerPort) contextValidateCablePeerType(ctx context.Context, fo return nil } -func (m *ConsoleServerPort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *ConsoleServerPort) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { diff --git a/netbox/models/content_type.go b/netbox/models/content_type.go index 08a35ff65..8fa03de07 100644 --- a/netbox/models/content_type.go +++ b/netbox/models/content_type.go @@ -44,11 +44,6 @@ type ContentType struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - // Min Length: 1 - DisplayName string `json:"display_name,omitempty"` - // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -73,10 +68,6 @@ func (m *ContentType) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateDisplayName(formats); err != nil { - res = append(res, err) - } - if err := m.validateModel(formats); err != nil { res = append(res, err) } @@ -108,18 +99,6 @@ func (m *ContentType) validateAppLabel(formats strfmt.Registry) error { return nil } -func (m *ContentType) validateDisplayName(formats strfmt.Registry) error { - if swag.IsZero(m.DisplayName) { // not required - return nil - } - - if err := validate.MinLength("display_name", "body", m.DisplayName, 1); err != nil { - return err - } - - return nil -} - func (m *ContentType) validateModel(formats strfmt.Registry) error { if err := validate.Required("model", "body", m.Model); err != nil { @@ -157,10 +136,6 @@ func (m *ContentType) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } @@ -184,15 +159,6 @@ func (m *ContentType) contextValidateDisplay(ctx context.Context, formats strfmt return nil } -func (m *ContentType) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *ContentType) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { diff --git a/netbox/models/custom_link.go b/netbox/models/custom_link.go index 68d0e75ed..9a80b29a8 100644 --- a/netbox/models/custom_link.go +++ b/netbox/models/custom_link.go @@ -38,7 +38,7 @@ type CustomLink struct { // Button class // // The class of the first link in a group will be used for the dropdown button - // Enum: [default primary success info warning danger link] + // Enum: [outline-dark ghost-dark blue indigo purple pink red orange yellow green teal cyan secondary] ButtonClass string `json:"button_class,omitempty"` // Content type @@ -143,7 +143,7 @@ var customLinkTypeButtonClassPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["default","primary","success","info","warning","danger","link"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["outline-dark","ghost-dark","blue","indigo","purple","pink","red","orange","yellow","green","teal","cyan","secondary"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -153,26 +153,44 @@ func init() { const ( - // CustomLinkButtonClassDefault captures enum value "default" - CustomLinkButtonClassDefault string = "default" + // CustomLinkButtonClassOutlineDashDark captures enum value "outline-dark" + CustomLinkButtonClassOutlineDashDark string = "outline-dark" - // CustomLinkButtonClassPrimary captures enum value "primary" - CustomLinkButtonClassPrimary string = "primary" + // CustomLinkButtonClassGhostDashDark captures enum value "ghost-dark" + CustomLinkButtonClassGhostDashDark string = "ghost-dark" - // CustomLinkButtonClassSuccess captures enum value "success" - CustomLinkButtonClassSuccess string = "success" + // CustomLinkButtonClassBlue captures enum value "blue" + CustomLinkButtonClassBlue string = "blue" - // CustomLinkButtonClassInfo captures enum value "info" - CustomLinkButtonClassInfo string = "info" + // CustomLinkButtonClassIndigo captures enum value "indigo" + CustomLinkButtonClassIndigo string = "indigo" - // CustomLinkButtonClassWarning captures enum value "warning" - CustomLinkButtonClassWarning string = "warning" + // CustomLinkButtonClassPurple captures enum value "purple" + CustomLinkButtonClassPurple string = "purple" - // CustomLinkButtonClassDanger captures enum value "danger" - CustomLinkButtonClassDanger string = "danger" + // CustomLinkButtonClassPink captures enum value "pink" + CustomLinkButtonClassPink string = "pink" - // CustomLinkButtonClassLink captures enum value "link" - CustomLinkButtonClassLink string = "link" + // CustomLinkButtonClassRed captures enum value "red" + CustomLinkButtonClassRed string = "red" + + // CustomLinkButtonClassOrange captures enum value "orange" + CustomLinkButtonClassOrange string = "orange" + + // CustomLinkButtonClassYellow captures enum value "yellow" + CustomLinkButtonClassYellow string = "yellow" + + // CustomLinkButtonClassGreen captures enum value "green" + CustomLinkButtonClassGreen string = "green" + + // CustomLinkButtonClassTeal captures enum value "teal" + CustomLinkButtonClassTeal string = "teal" + + // CustomLinkButtonClassCyan captures enum value "cyan" + CustomLinkButtonClassCyan string = "cyan" + + // CustomLinkButtonClassSecondary captures enum value "secondary" + CustomLinkButtonClassSecondary string = "secondary" ) // prop value enum diff --git a/netbox/models/device.go b/netbox/models/device.go index 566e1d760..d7b094e77 100644 --- a/netbox/models/device.go +++ b/netbox/models/device.go @@ -68,10 +68,6 @@ type Device struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // face Face *DeviceFace `json:"face,omitempty"` @@ -691,10 +687,6 @@ func (m *Device) ContextValidate(ctx context.Context, formats strfmt.Registry) e res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateFace(ctx, formats); err != nil { res = append(res, err) } @@ -825,15 +817,6 @@ func (m *Device) contextValidateDisplay(ctx context.Context, formats strfmt.Regi return nil } -func (m *Device) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *Device) contextValidateFace(ctx context.Context, formats strfmt.Registry) error { if m.Face != nil { diff --git a/netbox/models/device_n_a_p_a_l_m.go b/netbox/models/device_n_a_p_a_l_m.go index 316a10dcc..49d7d4377 100644 --- a/netbox/models/device_n_a_p_a_l_m.go +++ b/netbox/models/device_n_a_p_a_l_m.go @@ -26,7 +26,6 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // DeviceNAPALM device n a p a l m @@ -36,7 +35,7 @@ type DeviceNAPALM struct { // Method // Required: true - Method map[string]*string `json:"method"` + Method interface{} `json:"method"` } // Validate validates this device n a p a l m @@ -55,8 +54,8 @@ func (m *DeviceNAPALM) Validate(formats strfmt.Registry) error { func (m *DeviceNAPALM) validateMethod(formats strfmt.Registry) error { - if err := validate.Required("method", "body", m.Method); err != nil { - return err + if m.Method == nil { + return errors.Required("method", "body", nil) } return nil diff --git a/netbox/models/device_type.go b/netbox/models/device_type.go index 562cdde42..eb7a5f70a 100644 --- a/netbox/models/device_type.go +++ b/netbox/models/device_type.go @@ -55,10 +55,6 @@ type DeviceType struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // Front image // Read Only: true // Format: uri @@ -382,10 +378,6 @@ func (m *DeviceType) ContextValidate(ctx context.Context, formats strfmt.Registr res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateFrontImage(ctx, formats); err != nil { res = append(res, err) } @@ -451,15 +443,6 @@ func (m *DeviceType) contextValidateDisplay(ctx context.Context, formats strfmt. return nil } -func (m *DeviceType) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *DeviceType) contextValidateFrontImage(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "front_image", "body", strfmt.URI(m.FrontImage)); err != nil { diff --git a/netbox/models/device_with_config_context.go b/netbox/models/device_with_config_context.go index 357f076b8..57784413f 100644 --- a/netbox/models/device_with_config_context.go +++ b/netbox/models/device_with_config_context.go @@ -50,7 +50,7 @@ type DeviceWithConfigContext struct { // Config context // Read Only: true - ConfigContext map[string]*string `json:"config_context,omitempty"` + ConfigContext interface{} `json:"config_context,omitempty"` // Created // Read Only: true @@ -72,10 +72,6 @@ type DeviceWithConfigContext struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // face Face *DeviceWithConfigContextFace `json:"face,omitempty"` @@ -679,10 +675,6 @@ func (m *DeviceWithConfigContext) ContextValidate(ctx context.Context, formats s res = append(res, err) } - if err := m.contextValidateConfigContext(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -699,10 +691,6 @@ func (m *DeviceWithConfigContext) ContextValidate(ctx context.Context, formats s res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateFace(ctx, formats); err != nil { res = append(res, err) } @@ -787,11 +775,6 @@ func (m *DeviceWithConfigContext) contextValidateCluster(ctx context.Context, fo return nil } -func (m *DeviceWithConfigContext) contextValidateConfigContext(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *DeviceWithConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { @@ -838,15 +821,6 @@ func (m *DeviceWithConfigContext) contextValidateDisplay(ctx context.Context, fo return nil } -func (m *DeviceWithConfigContext) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *DeviceWithConfigContext) contextValidateFace(ctx context.Context, formats strfmt.Registry) error { if m.Face != nil { diff --git a/netbox/models/export_template.go b/netbox/models/export_template.go index 03bdf8374..303567e5f 100644 --- a/netbox/models/export_template.go +++ b/netbox/models/export_template.go @@ -75,7 +75,7 @@ type ExportTemplate struct { // Template code // - // The list of objects being exported is passed as a context variable named queryset. + // Jinja2 template code. The list of objects being exported is passed as a context variable named queryset. // Required: true // Min Length: 1 TemplateCode *string `json:"template_code"` diff --git a/netbox/models/front_port.go b/netbox/models/front_port.go index 30c115371..cee864efa 100644 --- a/netbox/models/front_port.go +++ b/netbox/models/front_port.go @@ -49,12 +49,17 @@ type FrontPort struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true CablePeerType string `json:"cable_peer_type,omitempty"` + // Color + // Max Length: 6 + // Pattern: ^[0-9a-f]{6}$ + Color string `json:"color,omitempty"` + // Created // Read Only: true // Format: date @@ -131,6 +136,10 @@ func (m *FrontPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateColor(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -198,6 +207,22 @@ func (m *FrontPort) validateCable(formats strfmt.Registry) error { return nil } +func (m *FrontPort) validateColor(formats strfmt.Registry) error { + if swag.IsZero(m.Color) { // not required + return nil + } + + if err := validate.MaxLength("color", "body", m.Color, 6); err != nil { + return err + } + + if err := validate.Pattern("color", "body", m.Color, `^[0-9a-f]{6}$`); err != nil { + return err + } + + return nil +} + func (m *FrontPort) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -381,10 +406,6 @@ func (m *FrontPort) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } @@ -454,11 +475,6 @@ func (m *FrontPort) contextValidateCable(ctx context.Context, formats strfmt.Reg return nil } -func (m *FrontPort) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *FrontPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { diff --git a/netbox/models/front_port_template.go b/netbox/models/front_port_template.go index 2a2b65433..f2692e256 100644 --- a/netbox/models/front_port_template.go +++ b/netbox/models/front_port_template.go @@ -35,6 +35,11 @@ import ( // swagger:model FrontPortTemplate type FrontPortTemplate struct { + // Color + // Max Length: 6 + // Pattern: ^[0-9a-f]{6}$ + Color string `json:"color,omitempty"` + // Created // Read Only: true // Format: date @@ -96,6 +101,10 @@ type FrontPortTemplate struct { func (m *FrontPortTemplate) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateColor(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -142,6 +151,22 @@ func (m *FrontPortTemplate) Validate(formats strfmt.Registry) error { return nil } +func (m *FrontPortTemplate) validateColor(formats strfmt.Registry) error { + if swag.IsZero(m.Color) { // not required + return nil + } + + if err := validate.MaxLength("color", "body", m.Color, 6); err != nil { + return err + } + + if err := validate.Pattern("color", "body", m.Color, `^[0-9a-f]{6}$`); err != nil { + return err + } + + return nil +} + func (m *FrontPortTemplate) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil diff --git a/netbox/models/image_attachment.go b/netbox/models/image_attachment.go index f622a1294..fc6f246d4 100644 --- a/netbox/models/image_attachment.go +++ b/netbox/models/image_attachment.go @@ -80,7 +80,7 @@ type ImageAttachment struct { // Parent // Read Only: true - Parent map[string]*string `json:"parent,omitempty"` + Parent interface{} `json:"parent,omitempty"` // Url // Read Only: true @@ -258,10 +258,6 @@ func (m *ImageAttachment) ContextValidate(ctx context.Context, formats strfmt.Re res = append(res, err) } - if err := m.contextValidateParent(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -308,11 +304,6 @@ func (m *ImageAttachment) contextValidateImage(ctx context.Context, formats strf return nil } -func (m *ImageAttachment) contextValidateParent(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *ImageAttachment) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/interface.go b/netbox/models/interface.go index 56a919c38..fcdc6896c 100644 --- a/netbox/models/interface.go +++ b/netbox/models/interface.go @@ -49,7 +49,7 @@ type Interface struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true @@ -61,7 +61,7 @@ type Interface struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -518,18 +518,10 @@ func (m *Interface) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { res = append(res, err) } @@ -623,11 +615,6 @@ func (m *Interface) contextValidateCable(ctx context.Context, formats strfmt.Reg return nil } -func (m *Interface) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *Interface) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { @@ -637,11 +624,6 @@ func (m *Interface) contextValidateCablePeerType(ctx context.Context, formats st return nil } -func (m *Interface) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *Interface) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { diff --git a/netbox/models/interface_connection.go b/netbox/models/interface_connection.go deleted file mode 100644 index 4fe3ed9eb..000000000 --- a/netbox/models/interface_connection.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// InterfaceConnection interface connection -// -// swagger:model InterfaceConnection -type InterfaceConnection struct { - - // Connected endpoint reachable - // Read Only: true - ConnectedEndpointReachable *bool `json:"connected_endpoint_reachable,omitempty"` - - // interface a - Interfacea *NestedInterface `json:"interface_a,omitempty"` - - // interface b - // Required: true - Interfaceb *NestedInterface `json:"interface_b"` -} - -// Validate validates this interface connection -func (m *InterfaceConnection) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInterfacea(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInterfaceb(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InterfaceConnection) validateInterfacea(formats strfmt.Registry) error { - if swag.IsZero(m.Interfacea) { // not required - return nil - } - - if m.Interfacea != nil { - if err := m.Interfacea.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interface_a") - } - return err - } - } - - return nil -} - -func (m *InterfaceConnection) validateInterfaceb(formats strfmt.Registry) error { - - if err := validate.Required("interface_b", "body", m.Interfaceb); err != nil { - return err - } - - if m.Interfaceb != nil { - if err := m.Interfaceb.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interface_b") - } - return err - } - } - - return nil -} - -// ContextValidate validate this interface connection based on the context it is used -func (m *InterfaceConnection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInterfacea(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInterfaceb(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InterfaceConnection) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { - return err - } - - return nil -} - -func (m *InterfaceConnection) contextValidateInterfacea(ctx context.Context, formats strfmt.Registry) error { - - if m.Interfacea != nil { - if err := m.Interfacea.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interface_a") - } - return err - } - } - - return nil -} - -func (m *InterfaceConnection) contextValidateInterfaceb(ctx context.Context, formats strfmt.Registry) error { - - if m.Interfaceb != nil { - if err := m.Interfaceb.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interface_b") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InterfaceConnection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InterfaceConnection) UnmarshalBinary(b []byte) error { - var res InterfaceConnection - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/netbox/models/ip_address.go b/netbox/models/ip_address.go index 5e48444e4..6801273bc 100644 --- a/netbox/models/ip_address.go +++ b/netbox/models/ip_address.go @@ -44,7 +44,7 @@ type IPAddress struct { // Assigned object // Read Only: true - AssignedObject map[string]*string `json:"assigned_object,omitempty"` + AssignedObject interface{} `json:"assigned_object,omitempty"` // Assigned object id // Maximum: 2.147483647e+09 @@ -422,10 +422,6 @@ func (m *IPAddress) validateVrf(formats strfmt.Registry) error { func (m *IPAddress) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateAssignedObject(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -484,11 +480,6 @@ func (m *IPAddress) ContextValidate(ctx context.Context, formats strfmt.Registry return nil } -func (m *IPAddress) contextValidateAssignedObject(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *IPAddress) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { diff --git a/netbox/models/ip_range.go b/netbox/models/ip_range.go new file mode 100644 index 000000000..d3d75957e --- /dev/null +++ b/netbox/models/ip_range.go @@ -0,0 +1,858 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// IPRange IP range +// +// swagger:model IPRange +type IPRange struct { + + // Children + // Read Only: true + Children int64 `json:"children,omitempty"` + + // Created + // Read Only: true + // Format: date + Created strfmt.Date `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // End address + // + // IPv4 or IPv6 address (with mask) + // Required: true + EndAddress *string `json:"end_address"` + + // family + Family *IPRangeFamily `json:"family,omitempty"` + + // Id + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // role + Role *NestedRole `json:"role,omitempty"` + + // Size + // Read Only: true + Size int64 `json:"size,omitempty"` + + // Start address + // + // IPv4 or IPv6 address (with mask) + // Required: true + StartAddress *string `json:"start_address"` + + // status + Status *IPRangeStatus `json:"status,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // tenant + Tenant *NestedTenant `json:"tenant,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` + + // vrf + Vrf *NestedVRF `json:"vrf,omitempty"` +} + +// Validate validates this IP range +func (m *IPRange) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFamily(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRole(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTenant(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVrf(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *IPRange) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *IPRange) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *IPRange) validateEndAddress(formats strfmt.Registry) error { + + if err := validate.Required("end_address", "body", m.EndAddress); err != nil { + return err + } + + return nil +} + +func (m *IPRange) validateFamily(formats strfmt.Registry) error { + if swag.IsZero(m.Family) { // not required + return nil + } + + if m.Family != nil { + if err := m.Family.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("family") + } + return err + } + } + + return nil +} + +func (m *IPRange) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *IPRange) validateRole(formats strfmt.Registry) error { + if swag.IsZero(m.Role) { // not required + return nil + } + + if m.Role != nil { + if err := m.Role.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("role") + } + return err + } + } + + return nil +} + +func (m *IPRange) validateStartAddress(formats strfmt.Registry) error { + + if err := validate.Required("start_address", "body", m.StartAddress); err != nil { + return err + } + + return nil +} + +func (m *IPRange) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +func (m *IPRange) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *IPRange) validateTenant(formats strfmt.Registry) error { + if swag.IsZero(m.Tenant) { // not required + return nil + } + + if m.Tenant != nil { + if err := m.Tenant.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } + return err + } + } + + return nil +} + +func (m *IPRange) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *IPRange) validateVrf(formats strfmt.Registry) error { + if swag.IsZero(m.Vrf) { // not required + return nil + } + + if m.Vrf != nil { + if err := m.Vrf.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vrf") + } + return err + } + } + + return nil +} + +// ContextValidate validate this IP range based on the context it is used +func (m *IPRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateChildren(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateFamily(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRole(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSize(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTenant(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVrf(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *IPRange) contextValidateChildren(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "children", "body", int64(m.Children)); err != nil { + return err + } + + return nil +} + +func (m *IPRange) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *IPRange) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *IPRange) contextValidateFamily(ctx context.Context, formats strfmt.Registry) error { + + if m.Family != nil { + if err := m.Family.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("family") + } + return err + } + } + + return nil +} + +func (m *IPRange) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *IPRange) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *IPRange) contextValidateRole(ctx context.Context, formats strfmt.Registry) error { + + if m.Role != nil { + if err := m.Role.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("role") + } + return err + } + } + + return nil +} + +func (m *IPRange) contextValidateSize(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "size", "body", int64(m.Size)); err != nil { + return err + } + + return nil +} + +func (m *IPRange) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.Status != nil { + if err := m.Status.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +func (m *IPRange) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *IPRange) contextValidateTenant(ctx context.Context, formats strfmt.Registry) error { + + if m.Tenant != nil { + if err := m.Tenant.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } + return err + } + } + + return nil +} + +func (m *IPRange) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +func (m *IPRange) contextValidateVrf(ctx context.Context, formats strfmt.Registry) error { + + if m.Vrf != nil { + if err := m.Vrf.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vrf") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *IPRange) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *IPRange) UnmarshalBinary(b []byte) error { + var res IPRange + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// IPRangeFamily Family +// +// swagger:model IPRangeFamily +type IPRangeFamily struct { + + // label + // Required: true + // Enum: [IPv4 IPv6] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [4 6] + Value *int64 `json:"value"` +} + +// Validate validates this IP range family +func (m *IPRangeFamily) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var ipRangeFamilyTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["IPv4","IPv6"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + ipRangeFamilyTypeLabelPropEnum = append(ipRangeFamilyTypeLabelPropEnum, v) + } +} + +const ( + + // IPRangeFamilyLabelIPV4 captures enum value "IPv4" + IPRangeFamilyLabelIPV4 string = "IPv4" + + // IPRangeFamilyLabelIPV6 captures enum value "IPv6" + IPRangeFamilyLabelIPV6 string = "IPv6" +) + +// prop value enum +func (m *IPRangeFamily) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, ipRangeFamilyTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *IPRangeFamily) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("family"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("family"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var ipRangeFamilyTypeValuePropEnum []interface{} + +func init() { + var res []int64 + if err := json.Unmarshal([]byte(`[4,6]`), &res); err != nil { + panic(err) + } + for _, v := range res { + ipRangeFamilyTypeValuePropEnum = append(ipRangeFamilyTypeValuePropEnum, v) + } +} + +// prop value enum +func (m *IPRangeFamily) validateValueEnum(path, location string, value int64) error { + if err := validate.EnumCase(path, location, value, ipRangeFamilyTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *IPRangeFamily) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("family"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("family"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this IP range family based on the context it is used +func (m *IPRangeFamily) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// MarshalBinary interface implementation +func (m *IPRangeFamily) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *IPRangeFamily) UnmarshalBinary(b []byte) error { + var res IPRangeFamily + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// IPRangeStatus Status +// +// swagger:model IPRangeStatus +type IPRangeStatus struct { + + // label + // Required: true + // Enum: [Active Reserved Deprecated] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [active reserved deprecated] + Value *string `json:"value"` +} + +// Validate validates this IP range status +func (m *IPRangeStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var ipRangeStatusTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Active","Reserved","Deprecated"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + ipRangeStatusTypeLabelPropEnum = append(ipRangeStatusTypeLabelPropEnum, v) + } +} + +const ( + + // IPRangeStatusLabelActive captures enum value "Active" + IPRangeStatusLabelActive string = "Active" + + // IPRangeStatusLabelReserved captures enum value "Reserved" + IPRangeStatusLabelReserved string = "Reserved" + + // IPRangeStatusLabelDeprecated captures enum value "Deprecated" + IPRangeStatusLabelDeprecated string = "Deprecated" +) + +// prop value enum +func (m *IPRangeStatus) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, ipRangeStatusTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *IPRangeStatus) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("status"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("status"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var ipRangeStatusTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["active","reserved","deprecated"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + ipRangeStatusTypeValuePropEnum = append(ipRangeStatusTypeValuePropEnum, v) + } +} + +const ( + + // IPRangeStatusValueActive captures enum value "active" + IPRangeStatusValueActive string = "active" + + // IPRangeStatusValueReserved captures enum value "reserved" + IPRangeStatusValueReserved string = "reserved" + + // IPRangeStatusValueDeprecated captures enum value "deprecated" + IPRangeStatusValueDeprecated string = "deprecated" +) + +// prop value enum +func (m *IPRangeStatus) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, ipRangeStatusTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *IPRangeStatus) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("status"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("status"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this IP range status based on context it is used +func (m *IPRangeStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *IPRangeStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *IPRangeStatus) UnmarshalBinary(b []byte) error { + var res IPRangeStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/journal_entry.go b/netbox/models/journal_entry.go index 4c7f1c83c..e1f1b4fa5 100644 --- a/netbox/models/journal_entry.go +++ b/netbox/models/journal_entry.go @@ -37,7 +37,7 @@ type JournalEntry struct { // Assigned object // Read Only: true - AssignedObject map[string]*string `json:"assigned_object,omitempty"` + AssignedObject interface{} `json:"assigned_object,omitempty"` // Assigned object id // Required: true @@ -197,10 +197,6 @@ func (m *JournalEntry) validateURL(formats strfmt.Registry) error { func (m *JournalEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateAssignedObject(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -227,11 +223,6 @@ func (m *JournalEntry) ContextValidate(ctx context.Context, formats strfmt.Regis return nil } -func (m *JournalEntry) contextValidateAssignedObject(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *JournalEntry) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { diff --git a/netbox/models/nested_device.go b/netbox/models/nested_device.go index 3d6693b6f..2419d4ac9 100644 --- a/netbox/models/nested_device.go +++ b/netbox/models/nested_device.go @@ -38,10 +38,6 @@ type NestedDevice struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // Id // Read Only: true ID int64 `json:"id,omitempty"` @@ -106,10 +102,6 @@ func (m *NestedDevice) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } @@ -133,15 +125,6 @@ func (m *NestedDevice) contextValidateDisplay(ctx context.Context, formats strfm return nil } -func (m *NestedDevice) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *NestedDevice) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { diff --git a/netbox/models/nested_device_type.go b/netbox/models/nested_device_type.go index 2491e2a5f..ec95a6b4a 100644 --- a/netbox/models/nested_device_type.go +++ b/netbox/models/nested_device_type.go @@ -42,10 +42,6 @@ type NestedDeviceType struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // Id // Read Only: true ID int64 `json:"id,omitempty"` @@ -177,10 +173,6 @@ func (m *NestedDeviceType) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } @@ -217,15 +209,6 @@ func (m *NestedDeviceType) contextValidateDisplay(ctx context.Context, formats s return nil } -func (m *NestedDeviceType) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *NestedDeviceType) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { diff --git a/netbox/models/nested_rack.go b/netbox/models/nested_rack.go index 37ba16244..69b3aff79 100644 --- a/netbox/models/nested_rack.go +++ b/netbox/models/nested_rack.go @@ -42,10 +42,6 @@ type NestedRack struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // Id // Read Only: true ID int64 `json:"id,omitempty"` @@ -121,10 +117,6 @@ func (m *NestedRack) ContextValidate(ctx context.Context, formats strfmt.Registr res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } @@ -157,15 +149,6 @@ func (m *NestedRack) contextValidateDisplay(ctx context.Context, formats strfmt. return nil } -func (m *NestedRack) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *NestedRack) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { diff --git a/netbox/models/nested_secret_role.go b/netbox/models/nested_secret_role.go deleted file mode 100644 index 7e56e9e11..000000000 --- a/netbox/models/nested_secret_role.go +++ /dev/null @@ -1,218 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NestedSecretRole nested secret role -// -// swagger:model NestedSecretRole -type NestedSecretRole struct { - - // Display - // Read Only: true - Display string `json:"display,omitempty"` - - // Id - // Read Only: true - ID int64 `json:"id,omitempty"` - - // Name - // Required: true - // Max Length: 100 - // Min Length: 1 - Name *string `json:"name"` - - // Secret count - // Read Only: true - SecretCount int64 `json:"secret_count,omitempty"` - - // Slug - // Required: true - // Max Length: 100 - // Min Length: 1 - // Pattern: ^[-a-zA-Z0-9_]+$ - Slug *string `json:"slug"` - - // Url - // Read Only: true - // Format: uri - URL strfmt.URI `json:"url,omitempty"` -} - -// Validate validates this nested secret role -func (m *NestedSecretRole) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSlug(formats); err != nil { - res = append(res, err) - } - - if err := m.validateURL(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NestedSecretRole) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { - return err - } - - if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { - return err - } - - return nil -} - -func (m *NestedSecretRole) validateSlug(formats strfmt.Registry) error { - - if err := validate.Required("slug", "body", m.Slug); err != nil { - return err - } - - if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { - return err - } - - if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { - return err - } - - if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { - return err - } - - return nil -} - -func (m *NestedSecretRole) validateURL(formats strfmt.Registry) error { - if swag.IsZero(m.URL) { // not required - return nil - } - - if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this nested secret role based on the context it is used -func (m *NestedSecretRole) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDisplay(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSecretCount(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateURL(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NestedSecretRole) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { - return err - } - - return nil -} - -func (m *NestedSecretRole) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { - return err - } - - return nil -} - -func (m *NestedSecretRole) contextValidateSecretCount(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "secret_count", "body", int64(m.SecretCount)); err != nil { - return err - } - - return nil -} - -func (m *NestedSecretRole) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NestedSecretRole) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NestedSecretRole) UnmarshalBinary(b []byte) error { - var res NestedSecretRole - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/netbox/models/nested_v_l_a_n.go b/netbox/models/nested_v_l_a_n.go index 00a3275f7..71043014d 100644 --- a/netbox/models/nested_v_l_a_n.go +++ b/netbox/models/nested_v_l_a_n.go @@ -38,10 +38,6 @@ type NestedVLAN struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // Id // Read Only: true ID int64 `json:"id,omitempty"` @@ -140,10 +136,6 @@ func (m *NestedVLAN) ContextValidate(ctx context.Context, formats strfmt.Registr res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } @@ -167,15 +159,6 @@ func (m *NestedVLAN) contextValidateDisplay(ctx context.Context, formats strfmt. return nil } -func (m *NestedVLAN) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *NestedVLAN) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { diff --git a/netbox/models/nested_v_r_f.go b/netbox/models/nested_v_r_f.go index 47257d925..4250633bf 100644 --- a/netbox/models/nested_v_r_f.go +++ b/netbox/models/nested_v_r_f.go @@ -38,10 +38,6 @@ type NestedVRF struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // Id // Read Only: true ID int64 `json:"id,omitempty"` @@ -139,10 +135,6 @@ func (m *NestedVRF) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } @@ -170,15 +162,6 @@ func (m *NestedVRF) contextValidateDisplay(ctx context.Context, formats strfmt.R return nil } -func (m *NestedVRF) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *NestedVRF) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { diff --git a/netbox/models/object_change.go b/netbox/models/object_change.go index 4f9cfb8bc..be7936d4a 100644 --- a/netbox/models/object_change.go +++ b/netbox/models/object_change.go @@ -44,7 +44,7 @@ type ObjectChange struct { // Serialize a nested representation of the changed object. // // Read Only: true - ChangedObject map[string]*string `json:"changed_object,omitempty"` + ChangedObject interface{} `json:"changed_object,omitempty"` // Changed object id // Required: true @@ -241,10 +241,6 @@ func (m *ObjectChange) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } - if err := m.contextValidateChangedObject(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateChangedObjectType(ctx, formats); err != nil { res = append(res, err) } @@ -305,11 +301,6 @@ func (m *ObjectChange) contextValidateAction(ctx context.Context, formats strfmt return nil } -func (m *ObjectChange) contextValidateChangedObject(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *ObjectChange) contextValidateChangedObjectType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "changed_object_type", "body", string(m.ChangedObjectType)); err != nil { diff --git a/netbox/models/power_feed.go b/netbox/models/power_feed.go index 989be9e21..80b23f08e 100644 --- a/netbox/models/power_feed.go +++ b/netbox/models/power_feed.go @@ -54,7 +54,7 @@ type PowerFeed struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true @@ -69,7 +69,7 @@ type PowerFeed struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -478,18 +478,10 @@ func (m *PowerFeed) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { res = append(res, err) } @@ -575,11 +567,6 @@ func (m *PowerFeed) contextValidateCable(ctx context.Context, formats strfmt.Reg return nil } -func (m *PowerFeed) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *PowerFeed) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { @@ -589,11 +576,6 @@ func (m *PowerFeed) contextValidateCablePeerType(ctx context.Context, formats st return nil } -func (m *PowerFeed) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *PowerFeed) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { diff --git a/netbox/models/power_outlet.go b/netbox/models/power_outlet.go index 100c3c7a8..eff412581 100644 --- a/netbox/models/power_outlet.go +++ b/netbox/models/power_outlet.go @@ -49,7 +49,7 @@ type PowerOutlet struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true @@ -61,7 +61,7 @@ type PowerOutlet struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -392,18 +392,10 @@ func (m *PowerOutlet) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { res = append(res, err) } @@ -481,11 +473,6 @@ func (m *PowerOutlet) contextValidateCable(ctx context.Context, formats strfmt.R return nil } -func (m *PowerOutlet) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *PowerOutlet) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { @@ -495,11 +482,6 @@ func (m *PowerOutlet) contextValidateCablePeerType(ctx context.Context, formats return nil } -func (m *PowerOutlet) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *PowerOutlet) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { @@ -811,12 +793,12 @@ type PowerOutletType struct { // label // Required: true - // Enum: [C5 C7 C13 C15 C19 C21 P+N+E 4H P+N+E 6H P+N+E 9H 2P+E 4H 2P+E 6H 2P+E 9H 3P+E 4H 3P+E 6H 3P+E 9H 3P+N+E 4H 3P+N+E 6H 3P+N+E 9H NEMA 1-15R NEMA 5-15R NEMA 5-20R NEMA 5-30R NEMA 5-50R NEMA 6-15R NEMA 6-20R NEMA 6-30R NEMA 6-50R NEMA 10-30R NEMA 10-50R NEMA 14-20R NEMA 14-30R NEMA 14-50R NEMA 14-60R NEMA 15-15R NEMA 15-20R NEMA 15-30R NEMA 15-50R NEMA 15-60R NEMA L1-15R NEMA L5-15R NEMA L5-20R NEMA L5-30R NEMA L5-50R NEMA L6-15R NEMA L6-20R NEMA L6-30R NEMA L6-50R NEMA L10-30R NEMA L14-20R NEMA L14-30R NEMA L14-50R NEMA L14-60R NEMA L15-20R NEMA L15-30R NEMA L15-50R NEMA L15-60R NEMA L21-20R NEMA L21-30R CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ITA Type E (CEE7/5) ITA Type F (CEE7/3) ITA Type G (BS 1363) ITA Type H ITA Type I ITA Type J ITA Type K ITA Type L (CEI 23-50) ITA Type M (BS 546) ITA Type N ITA Type O USB Type A USB Micro B USB Type C DC Terminal HDOT Cx Saf-D-Grid] + // Enum: [C5 C7 C13 C15 C19 C21 P+N+E 4H P+N+E 6H P+N+E 9H 2P+E 4H 2P+E 6H 2P+E 9H 3P+E 4H 3P+E 6H 3P+E 9H 3P+N+E 4H 3P+N+E 6H 3P+N+E 9H NEMA 1-15R NEMA 5-15R NEMA 5-20R NEMA 5-30R NEMA 5-50R NEMA 6-15R NEMA 6-20R NEMA 6-30R NEMA 6-50R NEMA 10-30R NEMA 10-50R NEMA 14-20R NEMA 14-30R NEMA 14-50R NEMA 14-60R NEMA 15-15R NEMA 15-20R NEMA 15-30R NEMA 15-50R NEMA 15-60R NEMA L1-15R NEMA L5-15R NEMA L5-20R NEMA L5-30R NEMA L5-50R NEMA L6-15R NEMA L6-20R NEMA L6-30R NEMA L6-50R NEMA L10-30R NEMA L14-20R NEMA L14-30R NEMA L14-50R NEMA L14-60R NEMA L15-20R NEMA L15-30R NEMA L15-50R NEMA L15-60R NEMA L21-20R NEMA L21-30R CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ITA Type E (CEE7/5) ITA Type F (CEE7/3) ITA Type G (BS 1363) ITA Type H ITA Type I ITA Type J ITA Type K ITA Type L (CEI 23-50) ITA Type M (BS 546) ITA Type N ITA Type O USB Type A USB Micro B USB Type C DC Terminal HDOT Cx Saf-D-Grid Hardwired] Label *string `json:"label"` // value // Required: true - // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid] + // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid hardwired] Value *string `json:"value"` } @@ -842,7 +824,7 @@ var powerOutletTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["C5","C7","C13","C15","C19","C21","P+N+E 4H","P+N+E 6H","P+N+E 9H","2P+E 4H","2P+E 6H","2P+E 9H","3P+E 4H","3P+E 6H","3P+E 9H","3P+N+E 4H","3P+N+E 6H","3P+N+E 9H","NEMA 1-15R","NEMA 5-15R","NEMA 5-20R","NEMA 5-30R","NEMA 5-50R","NEMA 6-15R","NEMA 6-20R","NEMA 6-30R","NEMA 6-50R","NEMA 10-30R","NEMA 10-50R","NEMA 14-20R","NEMA 14-30R","NEMA 14-50R","NEMA 14-60R","NEMA 15-15R","NEMA 15-20R","NEMA 15-30R","NEMA 15-50R","NEMA 15-60R","NEMA L1-15R","NEMA L5-15R","NEMA L5-20R","NEMA L5-30R","NEMA L5-50R","NEMA L6-15R","NEMA L6-20R","NEMA L6-30R","NEMA L6-50R","NEMA L10-30R","NEMA L14-20R","NEMA L14-30R","NEMA L14-50R","NEMA L14-60R","NEMA L15-20R","NEMA L15-30R","NEMA L15-50R","NEMA L15-60R","NEMA L21-20R","NEMA L21-30R","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ITA Type E (CEE7/5)","ITA Type F (CEE7/3)","ITA Type G (BS 1363)","ITA Type H","ITA Type I","ITA Type J","ITA Type K","ITA Type L (CEI 23-50)","ITA Type M (BS 546)","ITA Type N","ITA Type O","USB Type A","USB Micro B","USB Type C","DC Terminal","HDOT Cx","Saf-D-Grid"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["C5","C7","C13","C15","C19","C21","P+N+E 4H","P+N+E 6H","P+N+E 9H","2P+E 4H","2P+E 6H","2P+E 9H","3P+E 4H","3P+E 6H","3P+E 9H","3P+N+E 4H","3P+N+E 6H","3P+N+E 9H","NEMA 1-15R","NEMA 5-15R","NEMA 5-20R","NEMA 5-30R","NEMA 5-50R","NEMA 6-15R","NEMA 6-20R","NEMA 6-30R","NEMA 6-50R","NEMA 10-30R","NEMA 10-50R","NEMA 14-20R","NEMA 14-30R","NEMA 14-50R","NEMA 14-60R","NEMA 15-15R","NEMA 15-20R","NEMA 15-30R","NEMA 15-50R","NEMA 15-60R","NEMA L1-15R","NEMA L5-15R","NEMA L5-20R","NEMA L5-30R","NEMA L5-50R","NEMA L6-15R","NEMA L6-20R","NEMA L6-30R","NEMA L6-50R","NEMA L10-30R","NEMA L14-20R","NEMA L14-30R","NEMA L14-50R","NEMA L14-60R","NEMA L15-20R","NEMA L15-30R","NEMA L15-50R","NEMA L15-60R","NEMA L21-20R","NEMA L21-30R","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ITA Type E (CEE7/5)","ITA Type F (CEE7/3)","ITA Type G (BS 1363)","ITA Type H","ITA Type I","ITA Type J","ITA Type K","ITA Type L (CEI 23-50)","ITA Type M (BS 546)","ITA Type N","ITA Type O","USB Type A","USB Micro B","USB Type C","DC Terminal","HDOT Cx","Saf-D-Grid","Hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -1094,6 +1076,9 @@ const ( // PowerOutletTypeLabelSafDashDDashGrid captures enum value "Saf-D-Grid" PowerOutletTypeLabelSafDashDDashGrid string = "Saf-D-Grid" + + // PowerOutletTypeLabelHardwired captures enum value "Hardwired" + PowerOutletTypeLabelHardwired string = "Hardwired" ) // prop value enum @@ -1122,7 +1107,7 @@ var powerOutletTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid","hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -1374,6 +1359,9 @@ const ( // PowerOutletTypeValueSafDashdDashGrid captures enum value "saf-d-grid" PowerOutletTypeValueSafDashdDashGrid string = "saf-d-grid" + + // PowerOutletTypeValueHardwired captures enum value "hardwired" + PowerOutletTypeValueHardwired string = "hardwired" ) // prop value enum diff --git a/netbox/models/power_outlet_template.go b/netbox/models/power_outlet_template.go index 75ad96a6e..b7cc817c3 100644 --- a/netbox/models/power_outlet_template.go +++ b/netbox/models/power_outlet_template.go @@ -605,12 +605,12 @@ type PowerOutletTemplateType struct { // label // Required: true - // Enum: [C5 C7 C13 C15 C19 C21 P+N+E 4H P+N+E 6H P+N+E 9H 2P+E 4H 2P+E 6H 2P+E 9H 3P+E 4H 3P+E 6H 3P+E 9H 3P+N+E 4H 3P+N+E 6H 3P+N+E 9H NEMA 1-15R NEMA 5-15R NEMA 5-20R NEMA 5-30R NEMA 5-50R NEMA 6-15R NEMA 6-20R NEMA 6-30R NEMA 6-50R NEMA 10-30R NEMA 10-50R NEMA 14-20R NEMA 14-30R NEMA 14-50R NEMA 14-60R NEMA 15-15R NEMA 15-20R NEMA 15-30R NEMA 15-50R NEMA 15-60R NEMA L1-15R NEMA L5-15R NEMA L5-20R NEMA L5-30R NEMA L5-50R NEMA L6-15R NEMA L6-20R NEMA L6-30R NEMA L6-50R NEMA L10-30R NEMA L14-20R NEMA L14-30R NEMA L14-50R NEMA L14-60R NEMA L15-20R NEMA L15-30R NEMA L15-50R NEMA L15-60R NEMA L21-20R NEMA L21-30R CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ITA Type E (CEE7/5) ITA Type F (CEE7/3) ITA Type G (BS 1363) ITA Type H ITA Type I ITA Type J ITA Type K ITA Type L (CEI 23-50) ITA Type M (BS 546) ITA Type N ITA Type O USB Type A USB Micro B USB Type C DC Terminal HDOT Cx Saf-D-Grid] + // Enum: [C5 C7 C13 C15 C19 C21 P+N+E 4H P+N+E 6H P+N+E 9H 2P+E 4H 2P+E 6H 2P+E 9H 3P+E 4H 3P+E 6H 3P+E 9H 3P+N+E 4H 3P+N+E 6H 3P+N+E 9H NEMA 1-15R NEMA 5-15R NEMA 5-20R NEMA 5-30R NEMA 5-50R NEMA 6-15R NEMA 6-20R NEMA 6-30R NEMA 6-50R NEMA 10-30R NEMA 10-50R NEMA 14-20R NEMA 14-30R NEMA 14-50R NEMA 14-60R NEMA 15-15R NEMA 15-20R NEMA 15-30R NEMA 15-50R NEMA 15-60R NEMA L1-15R NEMA L5-15R NEMA L5-20R NEMA L5-30R NEMA L5-50R NEMA L6-15R NEMA L6-20R NEMA L6-30R NEMA L6-50R NEMA L10-30R NEMA L14-20R NEMA L14-30R NEMA L14-50R NEMA L14-60R NEMA L15-20R NEMA L15-30R NEMA L15-50R NEMA L15-60R NEMA L21-20R NEMA L21-30R CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ITA Type E (CEE7/5) ITA Type F (CEE7/3) ITA Type G (BS 1363) ITA Type H ITA Type I ITA Type J ITA Type K ITA Type L (CEI 23-50) ITA Type M (BS 546) ITA Type N ITA Type O USB Type A USB Micro B USB Type C DC Terminal HDOT Cx Saf-D-Grid Hardwired] Label *string `json:"label"` // value // Required: true - // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid] + // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid hardwired] Value *string `json:"value"` } @@ -636,7 +636,7 @@ var powerOutletTemplateTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["C5","C7","C13","C15","C19","C21","P+N+E 4H","P+N+E 6H","P+N+E 9H","2P+E 4H","2P+E 6H","2P+E 9H","3P+E 4H","3P+E 6H","3P+E 9H","3P+N+E 4H","3P+N+E 6H","3P+N+E 9H","NEMA 1-15R","NEMA 5-15R","NEMA 5-20R","NEMA 5-30R","NEMA 5-50R","NEMA 6-15R","NEMA 6-20R","NEMA 6-30R","NEMA 6-50R","NEMA 10-30R","NEMA 10-50R","NEMA 14-20R","NEMA 14-30R","NEMA 14-50R","NEMA 14-60R","NEMA 15-15R","NEMA 15-20R","NEMA 15-30R","NEMA 15-50R","NEMA 15-60R","NEMA L1-15R","NEMA L5-15R","NEMA L5-20R","NEMA L5-30R","NEMA L5-50R","NEMA L6-15R","NEMA L6-20R","NEMA L6-30R","NEMA L6-50R","NEMA L10-30R","NEMA L14-20R","NEMA L14-30R","NEMA L14-50R","NEMA L14-60R","NEMA L15-20R","NEMA L15-30R","NEMA L15-50R","NEMA L15-60R","NEMA L21-20R","NEMA L21-30R","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ITA Type E (CEE7/5)","ITA Type F (CEE7/3)","ITA Type G (BS 1363)","ITA Type H","ITA Type I","ITA Type J","ITA Type K","ITA Type L (CEI 23-50)","ITA Type M (BS 546)","ITA Type N","ITA Type O","USB Type A","USB Micro B","USB Type C","DC Terminal","HDOT Cx","Saf-D-Grid"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["C5","C7","C13","C15","C19","C21","P+N+E 4H","P+N+E 6H","P+N+E 9H","2P+E 4H","2P+E 6H","2P+E 9H","3P+E 4H","3P+E 6H","3P+E 9H","3P+N+E 4H","3P+N+E 6H","3P+N+E 9H","NEMA 1-15R","NEMA 5-15R","NEMA 5-20R","NEMA 5-30R","NEMA 5-50R","NEMA 6-15R","NEMA 6-20R","NEMA 6-30R","NEMA 6-50R","NEMA 10-30R","NEMA 10-50R","NEMA 14-20R","NEMA 14-30R","NEMA 14-50R","NEMA 14-60R","NEMA 15-15R","NEMA 15-20R","NEMA 15-30R","NEMA 15-50R","NEMA 15-60R","NEMA L1-15R","NEMA L5-15R","NEMA L5-20R","NEMA L5-30R","NEMA L5-50R","NEMA L6-15R","NEMA L6-20R","NEMA L6-30R","NEMA L6-50R","NEMA L10-30R","NEMA L14-20R","NEMA L14-30R","NEMA L14-50R","NEMA L14-60R","NEMA L15-20R","NEMA L15-30R","NEMA L15-50R","NEMA L15-60R","NEMA L21-20R","NEMA L21-30R","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ITA Type E (CEE7/5)","ITA Type F (CEE7/3)","ITA Type G (BS 1363)","ITA Type H","ITA Type I","ITA Type J","ITA Type K","ITA Type L (CEI 23-50)","ITA Type M (BS 546)","ITA Type N","ITA Type O","USB Type A","USB Micro B","USB Type C","DC Terminal","HDOT Cx","Saf-D-Grid","Hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -888,6 +888,9 @@ const ( // PowerOutletTemplateTypeLabelSafDashDDashGrid captures enum value "Saf-D-Grid" PowerOutletTemplateTypeLabelSafDashDDashGrid string = "Saf-D-Grid" + + // PowerOutletTemplateTypeLabelHardwired captures enum value "Hardwired" + PowerOutletTemplateTypeLabelHardwired string = "Hardwired" ) // prop value enum @@ -916,7 +919,7 @@ var powerOutletTemplateTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid","hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -1168,6 +1171,9 @@ const ( // PowerOutletTemplateTypeValueSafDashdDashGrid captures enum value "saf-d-grid" PowerOutletTemplateTypeValueSafDashdDashGrid string = "saf-d-grid" + + // PowerOutletTemplateTypeValueHardwired captures enum value "hardwired" + PowerOutletTemplateTypeValueHardwired string = "hardwired" ) // prop value enum diff --git a/netbox/models/power_port.go b/netbox/models/power_port.go index bde3f1e2f..3b469e3a5 100644 --- a/netbox/models/power_port.go +++ b/netbox/models/power_port.go @@ -56,7 +56,7 @@ type PowerPort struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true @@ -68,7 +68,7 @@ type PowerPort struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -398,18 +398,10 @@ func (m *PowerPort) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { res = append(res, err) } @@ -479,11 +471,6 @@ func (m *PowerPort) contextValidateCable(ctx context.Context, formats strfmt.Reg return nil } -func (m *PowerPort) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *PowerPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { @@ -493,11 +480,6 @@ func (m *PowerPort) contextValidateCablePeerType(ctx context.Context, formats st return nil } -func (m *PowerPort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *PowerPort) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { diff --git a/netbox/models/prefix.go b/netbox/models/prefix.go index 5c6933834..765b5113f 100644 --- a/netbox/models/prefix.go +++ b/netbox/models/prefix.go @@ -77,6 +77,11 @@ type Prefix struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Mark utilized + // + // Treat as 100% utilized + MarkUtilized bool `json:"mark_utilized,omitempty"` + // Prefix // // IPv4 or IPv6 network with mask diff --git a/netbox/models/rack.go b/netbox/models/rack.go index d110f10d0..409d2b9de 100644 --- a/netbox/models/rack.go +++ b/netbox/models/rack.go @@ -66,10 +66,6 @@ type Rack struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // Facility ID // // Locally-assigned identifier @@ -554,10 +550,6 @@ func (m *Rack) ContextValidate(ctx context.Context, formats strfmt.Registry) err res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } @@ -643,15 +635,6 @@ func (m *Rack) contextValidateDisplay(ctx context.Context, formats strfmt.Regist return nil } -func (m *Rack) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *Rack) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { diff --git a/netbox/models/rear_port.go b/netbox/models/rear_port.go index a75317e48..96d8be890 100644 --- a/netbox/models/rear_port.go +++ b/netbox/models/rear_port.go @@ -49,12 +49,17 @@ type RearPort struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true CablePeerType string `json:"cable_peer_type,omitempty"` + // Color + // Max Length: 6 + // Pattern: ^[0-9a-f]{6}$ + Color string `json:"color,omitempty"` + // Created // Read Only: true // Format: date @@ -127,6 +132,10 @@ func (m *RearPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateColor(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -190,6 +199,22 @@ func (m *RearPort) validateCable(formats strfmt.Registry) error { return nil } +func (m *RearPort) validateColor(formats strfmt.Registry) error { + if swag.IsZero(m.Color) { // not required + return nil + } + + if err := validate.MaxLength("color", "body", m.Color, 6); err != nil { + return err + } + + if err := validate.Pattern("color", "body", m.Color, `^[0-9a-f]{6}$`); err != nil { + return err + } + + return nil +} + func (m *RearPort) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -355,10 +380,6 @@ func (m *RearPort) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } @@ -424,11 +445,6 @@ func (m *RearPort) contextValidateCable(ctx context.Context, formats strfmt.Regi return nil } -func (m *RearPort) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *RearPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { diff --git a/netbox/models/rear_port_template.go b/netbox/models/rear_port_template.go index 9b149a197..64bb7e781 100644 --- a/netbox/models/rear_port_template.go +++ b/netbox/models/rear_port_template.go @@ -35,6 +35,11 @@ import ( // swagger:model RearPortTemplate type RearPortTemplate struct { + // Color + // Max Length: 6 + // Pattern: ^[0-9a-f]{6}$ + Color string `json:"color,omitempty"` + // Created // Read Only: true // Format: date @@ -92,6 +97,10 @@ type RearPortTemplate struct { func (m *RearPortTemplate) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateColor(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -134,6 +143,22 @@ func (m *RearPortTemplate) Validate(formats strfmt.Registry) error { return nil } +func (m *RearPortTemplate) validateColor(formats strfmt.Registry) error { + if swag.IsZero(m.Color) { // not required + return nil + } + + if err := validate.MaxLength("color", "body", m.Color, 6); err != nil { + return err + } + + if err := validate.Pattern("color", "body", m.Color, `^[0-9a-f]{6}$`); err != nil { + return err + } + + return nil +} + func (m *RearPortTemplate) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil diff --git a/netbox/models/saved_topology.go b/netbox/models/saved_topology.go new file mode 100644 index 000000000..dacc519f8 --- /dev/null +++ b/netbox/models/saved_topology.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SavedTopology saved topology +// +// swagger:model SavedTopology +type SavedTopology struct { + + // Created by + // Read Only: true + // Min Length: 1 + CreatedBy string `json:"created_by,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Layout context + LayoutContext *string `json:"layout_context,omitempty"` + + // Name + // Max Length: 100 + Name string `json:"name,omitempty"` + + // Timestamp + // Read Only: true + // Format: date-time + Timestamp strfmt.DateTime `json:"timestamp,omitempty"` + + // Topology + // Required: true + Topology *string `json:"topology"` +} + +// Validate validates this saved topology +func (m *SavedTopology) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreatedBy(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTimestamp(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTopology(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SavedTopology) validateCreatedBy(formats strfmt.Registry) error { + if swag.IsZero(m.CreatedBy) { // not required + return nil + } + + if err := validate.MinLength("created_by", "body", m.CreatedBy, 1); err != nil { + return err + } + + return nil +} + +func (m *SavedTopology) validateName(formats strfmt.Registry) error { + if swag.IsZero(m.Name) { // not required + return nil + } + + if err := validate.MaxLength("name", "body", m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *SavedTopology) validateTimestamp(formats strfmt.Registry) error { + if swag.IsZero(m.Timestamp) { // not required + return nil + } + + if err := validate.FormatOf("timestamp", "body", "date-time", m.Timestamp.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *SavedTopology) validateTopology(formats strfmt.Registry) error { + + if err := validate.Required("topology", "body", m.Topology); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this saved topology based on the context it is used +func (m *SavedTopology) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreatedBy(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTimestamp(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SavedTopology) contextValidateCreatedBy(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created_by", "body", string(m.CreatedBy)); err != nil { + return err + } + + return nil +} + +func (m *SavedTopology) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *SavedTopology) contextValidateTimestamp(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "timestamp", "body", strfmt.DateTime(m.Timestamp)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SavedTopology) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SavedTopology) UnmarshalBinary(b []byte) error { + var res SavedTopology + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/secret.go b/netbox/models/secret.go deleted file mode 100644 index 8d6b7760a..000000000 --- a/netbox/models/secret.go +++ /dev/null @@ -1,444 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Secret secret -// -// swagger:model Secret -type Secret struct { - - // Assigned object - // Read Only: true - AssignedObject map[string]*string `json:"assigned_object,omitempty"` - - // Assigned object id - // Required: true - // Maximum: 2.147483647e+09 - // Minimum: 0 - AssignedObjectID *int64 `json:"assigned_object_id"` - - // Assigned object type - // Required: true - AssignedObjectType *string `json:"assigned_object_type"` - - // Created - // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` - - // Custom fields - CustomFields interface{} `json:"custom_fields,omitempty"` - - // Display - // Read Only: true - Display string `json:"display,omitempty"` - - // Hash - // Read Only: true - // Min Length: 1 - Hash string `json:"hash,omitempty"` - - // Id - // Read Only: true - ID int64 `json:"id,omitempty"` - - // Last updated - // Read Only: true - // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` - - // Name - // Max Length: 100 - Name string `json:"name,omitempty"` - - // Plaintext - // Required: true - // Min Length: 1 - Plaintext *string `json:"plaintext"` - - // role - // Required: true - Role *NestedSecretRole `json:"role"` - - // tags - Tags []*NestedTag `json:"tags"` - - // Url - // Read Only: true - // Format: uri - URL strfmt.URI `json:"url,omitempty"` -} - -// Validate validates this secret -func (m *Secret) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAssignedObjectID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAssignedObjectType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCreated(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHash(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastUpdated(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePlaintext(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRole(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTags(formats); err != nil { - res = append(res, err) - } - - if err := m.validateURL(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Secret) validateAssignedObjectID(formats strfmt.Registry) error { - - if err := validate.Required("assigned_object_id", "body", m.AssignedObjectID); err != nil { - return err - } - - if err := validate.MinimumInt("assigned_object_id", "body", *m.AssignedObjectID, 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("assigned_object_id", "body", *m.AssignedObjectID, 2.147483647e+09, false); err != nil { - return err - } - - return nil -} - -func (m *Secret) validateAssignedObjectType(formats strfmt.Registry) error { - - if err := validate.Required("assigned_object_type", "body", m.AssignedObjectType); err != nil { - return err - } - - return nil -} - -func (m *Secret) validateCreated(formats strfmt.Registry) error { - if swag.IsZero(m.Created) { // not required - return nil - } - - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *Secret) validateHash(formats strfmt.Registry) error { - if swag.IsZero(m.Hash) { // not required - return nil - } - - if err := validate.MinLength("hash", "body", m.Hash, 1); err != nil { - return err - } - - return nil -} - -func (m *Secret) validateLastUpdated(formats strfmt.Registry) error { - if swag.IsZero(m.LastUpdated) { // not required - return nil - } - - if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *Secret) validateName(formats strfmt.Registry) error { - if swag.IsZero(m.Name) { // not required - return nil - } - - if err := validate.MaxLength("name", "body", m.Name, 100); err != nil { - return err - } - - return nil -} - -func (m *Secret) validatePlaintext(formats strfmt.Registry) error { - - if err := validate.Required("plaintext", "body", m.Plaintext); err != nil { - return err - } - - if err := validate.MinLength("plaintext", "body", *m.Plaintext, 1); err != nil { - return err - } - - return nil -} - -func (m *Secret) validateRole(formats strfmt.Registry) error { - - if err := validate.Required("role", "body", m.Role); err != nil { - return err - } - - if m.Role != nil { - if err := m.Role.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("role") - } - return err - } - } - - return nil -} - -func (m *Secret) validateTags(formats strfmt.Registry) error { - if swag.IsZero(m.Tags) { // not required - return nil - } - - for i := 0; i < len(m.Tags); i++ { - if swag.IsZero(m.Tags[i]) { // not required - continue - } - - if m.Tags[i] != nil { - if err := m.Tags[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Secret) validateURL(formats strfmt.Registry) error { - if swag.IsZero(m.URL) { // not required - return nil - } - - if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this secret based on the context it is used -func (m *Secret) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAssignedObject(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCreated(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDisplay(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHash(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastUpdated(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRole(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTags(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateURL(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Secret) contextValidateAssignedObject(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *Secret) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { - return err - } - - return nil -} - -func (m *Secret) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { - return err - } - - return nil -} - -func (m *Secret) contextValidateHash(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "hash", "body", string(m.Hash)); err != nil { - return err - } - - return nil -} - -func (m *Secret) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { - return err - } - - return nil -} - -func (m *Secret) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { - return err - } - - return nil -} - -func (m *Secret) contextValidateRole(ctx context.Context, formats strfmt.Registry) error { - - if m.Role != nil { - if err := m.Role.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("role") - } - return err - } - } - - return nil -} - -func (m *Secret) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tags); i++ { - - if m.Tags[i] != nil { - if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Secret) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Secret) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Secret) UnmarshalBinary(b []byte) error { - var res Secret - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/netbox/models/site.go b/netbox/models/site.go index a80860f02..fad6488d3 100644 --- a/netbox/models/site.go +++ b/netbox/models/site.go @@ -104,12 +104,12 @@ type Site struct { // Latitude // // GPS coordinate (latitude) - Latitude *string `json:"latitude,omitempty"` + Latitude *float64 `json:"latitude,omitempty"` // Longitude // // GPS coordinate (longitude) - Longitude *string `json:"longitude,omitempty"` + Longitude *float64 `json:"longitude,omitempty"` // Name // Required: true diff --git a/netbox/models/secret_role.go b/netbox/models/token.go similarity index 51% rename from netbox/models/secret_role.go rename to netbox/models/token.go index 7a59afe6f..9a672c48e 100644 --- a/netbox/models/secret_role.go +++ b/netbox/models/token.go @@ -29,18 +29,15 @@ import ( "github.com/go-openapi/validate" ) -// SecretRole secret role +// Token token // -// swagger:model SecretRole -type SecretRole struct { +// swagger:model Token +type Token struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` - - // Custom fields - CustomFields interface{} `json:"custom_fields,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -50,40 +47,36 @@ type SecretRole struct { // Read Only: true Display string `json:"display,omitempty"` - // Id - // Read Only: true - ID int64 `json:"id,omitempty"` - - // Last updated - // Read Only: true + // Expires // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + Expires *strfmt.DateTime `json:"expires,omitempty"` - // Name - // Required: true - // Max Length: 100 - // Min Length: 1 - Name *string `json:"name"` - - // Secret count + // Id // Read Only: true - SecretCount int64 `json:"secret_count,omitempty"` + ID int64 `json:"id,omitempty"` - // Slug - // Required: true - // Max Length: 100 - // Min Length: 1 - // Pattern: ^[-a-zA-Z0-9_]+$ - Slug *string `json:"slug"` + // Key + // Max Length: 40 + // Min Length: 40 + Key string `json:"key,omitempty"` // Url // Read Only: true // Format: uri URL strfmt.URI `json:"url,omitempty"` + + // user + // Required: true + User *NestedUser `json:"user"` + + // Write enabled + // + // Permit create/update/delete operations using this key + WriteEnabled bool `json:"write_enabled,omitempty"` } -// Validate validates this secret role -func (m *SecretRole) Validate(formats strfmt.Registry) error { +// Validate validates this token +func (m *Token) Validate(formats strfmt.Registry) error { var res []error if err := m.validateCreated(formats); err != nil { @@ -94,19 +87,19 @@ func (m *SecretRole) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateLastUpdated(formats); err != nil { + if err := m.validateExpires(formats); err != nil { res = append(res, err) } - if err := m.validateName(formats); err != nil { + if err := m.validateKey(formats); err != nil { res = append(res, err) } - if err := m.validateSlug(formats); err != nil { + if err := m.validateURL(formats); err != nil { res = append(res, err) } - if err := m.validateURL(formats); err != nil { + if err := m.validateUser(formats); err != nil { res = append(res, err) } @@ -116,19 +109,19 @@ func (m *SecretRole) Validate(formats strfmt.Registry) error { return nil } -func (m *SecretRole) validateCreated(formats strfmt.Registry) error { +func (m *Token) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } return nil } -func (m *SecretRole) validateDescription(formats strfmt.Registry) error { +func (m *Token) validateDescription(formats strfmt.Registry) error { if swag.IsZero(m.Description) { // not required return nil } @@ -140,70 +133,66 @@ func (m *SecretRole) validateDescription(formats strfmt.Registry) error { return nil } -func (m *SecretRole) validateLastUpdated(formats strfmt.Registry) error { - if swag.IsZero(m.LastUpdated) { // not required +func (m *Token) validateExpires(formats strfmt.Registry) error { + if swag.IsZero(m.Expires) { // not required return nil } - if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + if err := validate.FormatOf("expires", "body", "date-time", m.Expires.String(), formats); err != nil { return err } return nil } -func (m *SecretRole) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err +func (m *Token) validateKey(formats strfmt.Registry) error { + if swag.IsZero(m.Key) { // not required + return nil } - if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + if err := validate.MinLength("key", "body", m.Key, 40); err != nil { return err } - if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + if err := validate.MaxLength("key", "body", m.Key, 40); err != nil { return err } return nil } -func (m *SecretRole) validateSlug(formats strfmt.Registry) error { - - if err := validate.Required("slug", "body", m.Slug); err != nil { - return err - } - - if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { - return err - } - - if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { - return err +func (m *Token) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil } - if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { return err } return nil } -func (m *SecretRole) validateURL(formats strfmt.Registry) error { - if swag.IsZero(m.URL) { // not required - return nil - } +func (m *Token) validateUser(formats strfmt.Registry) error { - if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + if err := validate.Required("user", "body", m.User); err != nil { return err } + if m.User != nil { + if err := m.User.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("user") + } + return err + } + } + return nil } -// ContextValidate validate this secret role based on the context it is used -func (m *SecretRole) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this token based on the context it is used +func (m *Token) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateCreated(ctx, formats); err != nil { @@ -218,15 +207,11 @@ func (m *SecretRole) ContextValidate(ctx context.Context, formats strfmt.Registr res = append(res, err) } - if err := m.contextValidateLastUpdated(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSecretCount(ctx, formats); err != nil { + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateURL(ctx, formats); err != nil { + if err := m.contextValidateUser(ctx, formats); err != nil { res = append(res, err) } @@ -236,16 +221,16 @@ func (m *SecretRole) ContextValidate(ctx context.Context, formats strfmt.Registr return nil } -func (m *SecretRole) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { +func (m *Token) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } return nil } -func (m *SecretRole) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { +func (m *Token) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { return err @@ -254,7 +239,7 @@ func (m *SecretRole) contextValidateDisplay(ctx context.Context, formats strfmt. return nil } -func (m *SecretRole) contextValidateID(ctx context.Context, formats strfmt.Registry) error { +func (m *Token) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { return err @@ -263,35 +248,31 @@ func (m *SecretRole) contextValidateID(ctx context.Context, formats strfmt.Regis return nil } -func (m *SecretRole) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { +func (m *Token) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { - return err - } - - return nil -} - -func (m *SecretRole) contextValidateSecretCount(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "secret_count", "body", int64(m.SecretCount)); err != nil { + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { return err } return nil } -func (m *SecretRole) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { +func (m *Token) contextValidateUser(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { - return err + if m.User != nil { + if err := m.User.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("user") + } + return err + } } return nil } // MarshalBinary interface implementation -func (m *SecretRole) MarshalBinary() ([]byte, error) { +func (m *Token) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -299,8 +280,8 @@ func (m *SecretRole) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *SecretRole) UnmarshalBinary(b []byte) error { - var res SecretRole +func (m *Token) UnmarshalBinary(b []byte) error { + var res Token if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/netbox/models/v_l_a_n.go b/netbox/models/v_l_a_n.go index 8f2dee2c0..84260e5dd 100644 --- a/netbox/models/v_l_a_n.go +++ b/netbox/models/v_l_a_n.go @@ -52,10 +52,6 @@ type VLAN struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // group Group *NestedVLANGroup `json:"group,omitempty"` @@ -366,10 +362,6 @@ func (m *VLAN) ContextValidate(ctx context.Context, formats strfmt.Registry) err res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateGroup(ctx, formats); err != nil { res = append(res, err) } @@ -434,15 +426,6 @@ func (m *VLAN) contextValidateDisplay(ctx context.Context, formats strfmt.Regist return nil } -func (m *VLAN) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *VLAN) contextValidateGroup(ctx context.Context, formats strfmt.Registry) error { if m.Group != nil { diff --git a/netbox/models/v_r_f.go b/netbox/models/v_r_f.go index 89c35aa39..3818b0e10 100644 --- a/netbox/models/v_r_f.go +++ b/netbox/models/v_r_f.go @@ -51,10 +51,6 @@ type VRF struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // Enforce unique space // // Prevent duplicate prefixes/IP addresses within this VRF @@ -345,10 +341,6 @@ func (m *VRF) ContextValidate(ctx context.Context, formats strfmt.Registry) erro res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateExportTargets(ctx, formats); err != nil { res = append(res, err) } @@ -409,15 +401,6 @@ func (m *VRF) contextValidateDisplay(ctx context.Context, formats strfmt.Registr return nil } -func (m *VRF) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *VRF) contextValidateExportTargets(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.ExportTargets); i++ { diff --git a/netbox/models/virtual_machine_with_config_context.go b/netbox/models/virtual_machine_with_config_context.go index c397496c9..c8320d347 100644 --- a/netbox/models/virtual_machine_with_config_context.go +++ b/netbox/models/virtual_machine_with_config_context.go @@ -45,7 +45,7 @@ type VirtualMachineWithConfigContext struct { // Config context // Read Only: true - ConfigContext map[string]*string `json:"config_context,omitempty"` + ConfigContext interface{} `json:"config_context,omitempty"` // Created // Read Only: true @@ -120,7 +120,8 @@ type VirtualMachineWithConfigContext struct { URL strfmt.URI `json:"url,omitempty"` // VCPUs - Vcpus *string `json:"vcpus,omitempty"` + // Minimum: 0.01 + Vcpus *float64 `json:"vcpus,omitempty"` } // Validate validates this virtual machine with config context @@ -191,6 +192,10 @@ func (m *VirtualMachineWithConfigContext) Validate(formats strfmt.Registry) erro res = append(res, err) } + if err := m.validateVcpus(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -460,6 +465,18 @@ func (m *VirtualMachineWithConfigContext) validateURL(formats strfmt.Registry) e return nil } +func (m *VirtualMachineWithConfigContext) validateVcpus(formats strfmt.Registry) error { + if swag.IsZero(m.Vcpus) { // not required + return nil + } + + if err := validate.Minimum("vcpus", "body", *m.Vcpus, 0.01, false); err != nil { + return err + } + + return nil +} + // ContextValidate validate this virtual machine with config context based on the context it is used func (m *VirtualMachineWithConfigContext) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -468,10 +485,6 @@ func (m *VirtualMachineWithConfigContext) ContextValidate(ctx context.Context, f res = append(res, err) } - if err := m.contextValidateConfigContext(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -548,11 +561,6 @@ func (m *VirtualMachineWithConfigContext) contextValidateCluster(ctx context.Con return nil } -func (m *VirtualMachineWithConfigContext) contextValidateConfigContext(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *VirtualMachineWithConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { diff --git a/netbox/models/webhook.go b/netbox/models/webhook.go index b7fcfba04..b098cd3bc 100644 --- a/netbox/models/webhook.go +++ b/netbox/models/webhook.go @@ -37,7 +37,7 @@ type Webhook struct { // Additional headers // - // User-supplied HTTP headers to be sent with the request in addition to the HTTP content type. Headers should be defined in the format Name: Value. Jinja2 template processing is support with the same context as the request body (below). + // User-supplied HTTP headers to be sent with the request in addition to the HTTP content type. Headers should be defined in the format Name: Value. Jinja2 template processing is supported with the same context as the request body (below). AdditionalHeaders string `json:"additional_headers,omitempty"` // Body template diff --git a/netbox/models/writable_cable.go b/netbox/models/writable_cable.go index 03402ca5f..210c28e90 100644 --- a/netbox/models/writable_cable.go +++ b/netbox/models/writable_cable.go @@ -57,12 +57,10 @@ type WritableCable struct { Label string `json:"label,omitempty"` // Length - // Maximum: 32767 - // Minimum: 0 - Length *int64 `json:"length,omitempty"` + Length *float64 `json:"length,omitempty"` // Length unit - // Enum: [m cm ft in] + // Enum: [km m cm mi ft in] LengthUnit string `json:"length_unit,omitempty"` // Status @@ -74,7 +72,7 @@ type WritableCable struct { // Termination a // Read Only: true - Terminationa map[string]*string `json:"termination_a,omitempty"` + Terminationa interface{} `json:"termination_a,omitempty"` // Termination a id // Required: true @@ -88,7 +86,7 @@ type WritableCable struct { // Termination b // Read Only: true - Terminationb map[string]*string `json:"termination_b,omitempty"` + Terminationb interface{} `json:"termination_b,omitempty"` // Termination b id // Required: true @@ -122,10 +120,6 @@ func (m *WritableCable) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateLength(formats); err != nil { - res = append(res, err) - } - if err := m.validateLengthUnit(formats); err != nil { res = append(res, err) } @@ -196,27 +190,11 @@ func (m *WritableCable) validateLabel(formats strfmt.Registry) error { return nil } -func (m *WritableCable) validateLength(formats strfmt.Registry) error { - if swag.IsZero(m.Length) { // not required - return nil - } - - if err := validate.MinimumInt("length", "body", *m.Length, 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("length", "body", *m.Length, 32767, false); err != nil { - return err - } - - return nil -} - var writableCableTypeLengthUnitPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["m","cm","ft","in"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["km","m","cm","mi","ft","in"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -226,12 +204,18 @@ func init() { const ( + // WritableCableLengthUnitKm captures enum value "km" + WritableCableLengthUnitKm string = "km" + // WritableCableLengthUnitM captures enum value "m" WritableCableLengthUnitM string = "m" // WritableCableLengthUnitCm captures enum value "cm" WritableCableLengthUnitCm string = "cm" + // WritableCableLengthUnitMi captures enum value "mi" + WritableCableLengthUnitMi string = "mi" + // WritableCableLengthUnitFt captures enum value "ft" WritableCableLengthUnitFt string = "ft" @@ -514,14 +498,6 @@ func (m *WritableCable) ContextValidate(ctx context.Context, formats strfmt.Regi res = append(res, err) } - if err := m.contextValidateTerminationa(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTerminationb(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -568,16 +544,6 @@ func (m *WritableCable) contextValidateTags(ctx context.Context, formats strfmt. return nil } -func (m *WritableCable) contextValidateTerminationa(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *WritableCable) contextValidateTerminationb(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableCable) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/writable_circuit_termination.go b/netbox/models/writable_circuit_termination.go index 90584b0bf..0a7e042bd 100644 --- a/netbox/models/writable_circuit_termination.go +++ b/netbox/models/writable_circuit_termination.go @@ -48,7 +48,7 @@ type WritableCircuitTermination struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true @@ -319,10 +319,6 @@ func (m *WritableCircuitTermination) ContextValidate(ctx context.Context, format res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } @@ -368,11 +364,6 @@ func (m *WritableCircuitTermination) contextValidateCable(ctx context.Context, f return nil } -func (m *WritableCircuitTermination) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableCircuitTermination) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { diff --git a/netbox/models/writable_console_port.go b/netbox/models/writable_console_port.go index 59bf18647..444ab1681 100644 --- a/netbox/models/writable_console_port.go +++ b/netbox/models/writable_console_port.go @@ -49,7 +49,7 @@ type WritableConsolePort struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true @@ -61,7 +61,7 @@ type WritableConsolePort struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -439,18 +439,10 @@ func (m *WritableConsolePort) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { res = append(res, err) } @@ -512,11 +504,6 @@ func (m *WritableConsolePort) contextValidateCable(ctx context.Context, formats return nil } -func (m *WritableConsolePort) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableConsolePort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { @@ -526,11 +513,6 @@ func (m *WritableConsolePort) contextValidateCablePeerType(ctx context.Context, return nil } -func (m *WritableConsolePort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableConsolePort) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { diff --git a/netbox/models/writable_console_server_port.go b/netbox/models/writable_console_server_port.go index 27eb71323..4b4f10839 100644 --- a/netbox/models/writable_console_server_port.go +++ b/netbox/models/writable_console_server_port.go @@ -49,7 +49,7 @@ type WritableConsoleServerPort struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true @@ -61,7 +61,7 @@ type WritableConsoleServerPort struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -439,18 +439,10 @@ func (m *WritableConsoleServerPort) ContextValidate(ctx context.Context, formats res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { res = append(res, err) } @@ -512,11 +504,6 @@ func (m *WritableConsoleServerPort) contextValidateCable(ctx context.Context, fo return nil } -func (m *WritableConsoleServerPort) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableConsoleServerPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { @@ -526,11 +513,6 @@ func (m *WritableConsoleServerPort) contextValidateCablePeerType(ctx context.Con return nil } -func (m *WritableConsoleServerPort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableConsoleServerPort) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { diff --git a/netbox/models/writable_device_type.go b/netbox/models/writable_device_type.go index c5be1418d..c431a3a3a 100644 --- a/netbox/models/writable_device_type.go +++ b/netbox/models/writable_device_type.go @@ -55,10 +55,6 @@ type WritableDeviceType struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // Front image // Read Only: true // Format: uri @@ -401,10 +397,6 @@ func (m *WritableDeviceType) ContextValidate(ctx context.Context, formats strfmt res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateFrontImage(ctx, formats); err != nil { res = append(res, err) } @@ -462,15 +454,6 @@ func (m *WritableDeviceType) contextValidateDisplay(ctx context.Context, formats return nil } -func (m *WritableDeviceType) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *WritableDeviceType) contextValidateFrontImage(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "front_image", "body", strfmt.URI(m.FrontImage)); err != nil { diff --git a/netbox/models/writable_device_with_config_context.go b/netbox/models/writable_device_with_config_context.go index 6b6021eda..ec36e9785 100644 --- a/netbox/models/writable_device_with_config_context.go +++ b/netbox/models/writable_device_with_config_context.go @@ -50,7 +50,7 @@ type WritableDeviceWithConfigContext struct { // Config context // Read Only: true - ConfigContext map[string]*string `json:"config_context,omitempty"` + ConfigContext interface{} `json:"config_context,omitempty"` // Created // Read Only: true @@ -72,10 +72,6 @@ type WritableDeviceWithConfigContext struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // Rack face // Enum: [front rear] Face string `json:"face,omitempty"` @@ -527,10 +523,6 @@ func (m *WritableDeviceWithConfigContext) validateVcPriority(formats strfmt.Regi func (m *WritableDeviceWithConfigContext) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateConfigContext(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -539,10 +531,6 @@ func (m *WritableDeviceWithConfigContext) ContextValidate(ctx context.Context, f res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } @@ -573,11 +561,6 @@ func (m *WritableDeviceWithConfigContext) ContextValidate(ctx context.Context, f return nil } -func (m *WritableDeviceWithConfigContext) contextValidateConfigContext(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableDeviceWithConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { @@ -596,15 +579,6 @@ func (m *WritableDeviceWithConfigContext) contextValidateDisplay(ctx context.Con return nil } -func (m *WritableDeviceWithConfigContext) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *WritableDeviceWithConfigContext) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { diff --git a/netbox/models/writable_front_port.go b/netbox/models/writable_front_port.go index 149f9d2d0..860f16f8c 100644 --- a/netbox/models/writable_front_port.go +++ b/netbox/models/writable_front_port.go @@ -49,12 +49,17 @@ type WritableFrontPort struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true CablePeerType string `json:"cable_peer_type,omitempty"` + // Color + // Max Length: 6 + // Pattern: ^[0-9a-f]{6}$ + Color string `json:"color,omitempty"` + // Created // Read Only: true // Format: date @@ -132,6 +137,10 @@ func (m *WritableFrontPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateColor(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -199,6 +208,22 @@ func (m *WritableFrontPort) validateCable(formats strfmt.Registry) error { return nil } +func (m *WritableFrontPort) validateColor(formats strfmt.Registry) error { + if swag.IsZero(m.Color) { // not required + return nil + } + + if err := validate.MaxLength("color", "body", m.Color, 6); err != nil { + return err + } + + if err := validate.Pattern("color", "body", m.Color, `^[0-9a-f]{6}$`); err != nil { + return err + } + + return nil +} + func (m *WritableFrontPort) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -476,10 +501,6 @@ func (m *WritableFrontPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } @@ -537,11 +558,6 @@ func (m *WritableFrontPort) contextValidateCable(ctx context.Context, formats st return nil } -func (m *WritableFrontPort) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableFrontPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { diff --git a/netbox/models/writable_front_port_template.go b/netbox/models/writable_front_port_template.go index 7204de546..caff1ae01 100644 --- a/netbox/models/writable_front_port_template.go +++ b/netbox/models/writable_front_port_template.go @@ -35,6 +35,11 @@ import ( // swagger:model WritableFrontPortTemplate type WritableFrontPortTemplate struct { + // Color + // Max Length: 6 + // Pattern: ^[0-9a-f]{6}$ + Color string `json:"color,omitempty"` + // Created // Read Only: true // Format: date @@ -97,6 +102,10 @@ type WritableFrontPortTemplate struct { func (m *WritableFrontPortTemplate) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateColor(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -143,6 +152,22 @@ func (m *WritableFrontPortTemplate) Validate(formats strfmt.Registry) error { return nil } +func (m *WritableFrontPortTemplate) validateColor(formats strfmt.Registry) error { + if swag.IsZero(m.Color) { // not required + return nil + } + + if err := validate.MaxLength("color", "body", m.Color, 6); err != nil { + return err + } + + if err := validate.Pattern("color", "body", m.Color, `^[0-9a-f]{6}$`); err != nil { + return err + } + + return nil +} + func (m *WritableFrontPortTemplate) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil diff --git a/netbox/models/writable_interface.go b/netbox/models/writable_interface.go index d81eec745..aab8c01a8 100644 --- a/netbox/models/writable_interface.go +++ b/netbox/models/writable_interface.go @@ -49,7 +49,7 @@ type WritableInterface struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true @@ -61,7 +61,7 @@ type WritableInterface struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -701,18 +701,10 @@ func (m *WritableInterface) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { res = append(res, err) } @@ -778,11 +770,6 @@ func (m *WritableInterface) contextValidateCable(ctx context.Context, formats st return nil } -func (m *WritableInterface) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableInterface) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { @@ -792,11 +779,6 @@ func (m *WritableInterface) contextValidateCablePeerType(ctx context.Context, fo return nil } -func (m *WritableInterface) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableInterface) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { diff --git a/netbox/models/writable_ip_address.go b/netbox/models/writable_ip_address.go index 3a80a82c6..b81183bc9 100644 --- a/netbox/models/writable_ip_address.go +++ b/netbox/models/writable_ip_address.go @@ -44,7 +44,7 @@ type WritableIPAddress struct { // Assigned object // Read Only: true - AssignedObject map[string]*string `json:"assigned_object,omitempty"` + AssignedObject interface{} `json:"assigned_object,omitempty"` // Assigned object id // Maximum: 2.147483647e+09 @@ -404,10 +404,6 @@ func (m *WritableIPAddress) validateURL(formats strfmt.Registry) error { func (m *WritableIPAddress) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateAssignedObject(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -446,11 +442,6 @@ func (m *WritableIPAddress) ContextValidate(ctx context.Context, formats strfmt. return nil } -func (m *WritableIPAddress) contextValidateAssignedObject(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableIPAddress) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { diff --git a/netbox/models/writable_secret.go b/netbox/models/writable_ip_range.go similarity index 53% rename from netbox/models/writable_secret.go rename to netbox/models/writable_ip_range.go index 77b7ce7f3..b881f6f87 100644 --- a/netbox/models/writable_secret.go +++ b/netbox/models/writable_ip_range.go @@ -22,6 +22,7 @@ package models import ( "context" + "encoding/json" "strconv" "github.com/go-openapi/errors" @@ -30,24 +31,14 @@ import ( "github.com/go-openapi/validate" ) -// WritableSecret writable secret +// WritableIPRange writable IP range // -// swagger:model WritableSecret -type WritableSecret struct { +// swagger:model WritableIPRange +type WritableIPRange struct { - // Assigned object + // Children // Read Only: true - AssignedObject map[string]*string `json:"assigned_object,omitempty"` - - // Assigned object id - // Required: true - // Maximum: 2.147483647e+09 - // Minimum: 0 - AssignedObjectID *int64 `json:"assigned_object_id"` - - // Assigned object type - // Required: true - AssignedObjectType *string `json:"assigned_object_type"` + Children int64 `json:"children,omitempty"` // Created // Read Only: true @@ -57,14 +48,23 @@ type WritableSecret struct { // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + // Display // Read Only: true Display string `json:"display,omitempty"` - // Hash + // End address + // + // IPv4 or IPv6 address (with mask) + // Required: true + EndAddress *string `json:"end_address"` + + // Family // Read Only: true - // Min Length: 1 - Hash string `json:"hash,omitempty"` + Family string `json:"family,omitempty"` // Id // Read Only: true @@ -75,61 +75,67 @@ type WritableSecret struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` - // Name - // Max Length: 100 - Name string `json:"name,omitempty"` + // Role + // + // The primary function of this range + Role *int64 `json:"role,omitempty"` - // Plaintext - // Required: true - // Min Length: 1 - Plaintext *string `json:"plaintext"` + // Size + // Read Only: true + Size int64 `json:"size,omitempty"` - // Role + // Start address + // + // IPv4 or IPv6 address (with mask) // Required: true - Role *int64 `json:"role"` + StartAddress *string `json:"start_address"` + + // Status + // + // Operational status of this range + // Enum: [active reserved deprecated] + Status string `json:"status,omitempty"` // tags Tags []*NestedTag `json:"tags"` + // Tenant + Tenant *int64 `json:"tenant,omitempty"` + // Url // Read Only: true // Format: uri URL strfmt.URI `json:"url,omitempty"` + + // VRF + Vrf *int64 `json:"vrf,omitempty"` } -// Validate validates this writable secret -func (m *WritableSecret) Validate(formats strfmt.Registry) error { +// Validate validates this writable IP range +func (m *WritableIPRange) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateAssignedObjectID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAssignedObjectType(formats); err != nil { - res = append(res, err) - } - if err := m.validateCreated(formats); err != nil { res = append(res, err) } - if err := m.validateHash(formats); err != nil { + if err := m.validateDescription(formats); err != nil { res = append(res, err) } - if err := m.validateLastUpdated(formats); err != nil { + if err := m.validateEndAddress(formats); err != nil { res = append(res, err) } - if err := m.validateName(formats); err != nil { + if err := m.validateLastUpdated(formats); err != nil { res = append(res, err) } - if err := m.validatePlaintext(formats); err != nil { + if err := m.validateStartAddress(formats); err != nil { res = append(res, err) } - if err := m.validateRole(formats); err != nil { + if err := m.validateStatus(formats); err != nil { res = append(res, err) } @@ -147,57 +153,40 @@ func (m *WritableSecret) Validate(formats strfmt.Registry) error { return nil } -func (m *WritableSecret) validateAssignedObjectID(formats strfmt.Registry) error { - - if err := validate.Required("assigned_object_id", "body", m.AssignedObjectID); err != nil { - return err - } - - if err := validate.MinimumInt("assigned_object_id", "body", *m.AssignedObjectID, 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("assigned_object_id", "body", *m.AssignedObjectID, 2.147483647e+09, false); err != nil { - return err +func (m *WritableIPRange) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil } - return nil -} - -func (m *WritableSecret) validateAssignedObjectType(formats strfmt.Registry) error { - - if err := validate.Required("assigned_object_type", "body", m.AssignedObjectType); err != nil { + if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { return err } return nil } -func (m *WritableSecret) validateCreated(formats strfmt.Registry) error { - if swag.IsZero(m.Created) { // not required +func (m *WritableIPRange) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { return err } return nil } -func (m *WritableSecret) validateHash(formats strfmt.Registry) error { - if swag.IsZero(m.Hash) { // not required - return nil - } +func (m *WritableIPRange) validateEndAddress(formats strfmt.Registry) error { - if err := validate.MinLength("hash", "body", m.Hash, 1); err != nil { + if err := validate.Required("end_address", "body", m.EndAddress); err != nil { return err } return nil } -func (m *WritableSecret) validateLastUpdated(formats strfmt.Registry) error { +func (m *WritableIPRange) validateLastUpdated(formats strfmt.Registry) error { if swag.IsZero(m.LastUpdated) { // not required return nil } @@ -209,41 +198,61 @@ func (m *WritableSecret) validateLastUpdated(formats strfmt.Registry) error { return nil } -func (m *WritableSecret) validateName(formats strfmt.Registry) error { - if swag.IsZero(m.Name) { // not required - return nil - } +func (m *WritableIPRange) validateStartAddress(formats strfmt.Registry) error { - if err := validate.MaxLength("name", "body", m.Name, 100); err != nil { + if err := validate.Required("start_address", "body", m.StartAddress); err != nil { return err } return nil } -func (m *WritableSecret) validatePlaintext(formats strfmt.Registry) error { +var writableIpRangeTypeStatusPropEnum []interface{} - if err := validate.Required("plaintext", "body", m.Plaintext); err != nil { - return err +func init() { + var res []string + if err := json.Unmarshal([]byte(`["active","reserved","deprecated"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableIpRangeTypeStatusPropEnum = append(writableIpRangeTypeStatusPropEnum, v) } +} + +const ( + + // WritableIPRangeStatusActive captures enum value "active" + WritableIPRangeStatusActive string = "active" + + // WritableIPRangeStatusReserved captures enum value "reserved" + WritableIPRangeStatusReserved string = "reserved" + + // WritableIPRangeStatusDeprecated captures enum value "deprecated" + WritableIPRangeStatusDeprecated string = "deprecated" +) - if err := validate.MinLength("plaintext", "body", *m.Plaintext, 1); err != nil { +// prop value enum +func (m *WritableIPRange) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableIpRangeTypeStatusPropEnum, true); err != nil { return err } - return nil } -func (m *WritableSecret) validateRole(formats strfmt.Registry) error { +func (m *WritableIPRange) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } - if err := validate.Required("role", "body", m.Role); err != nil { + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { return err } return nil } -func (m *WritableSecret) validateTags(formats strfmt.Registry) error { +func (m *WritableIPRange) validateTags(formats strfmt.Registry) error { if swag.IsZero(m.Tags) { // not required return nil } @@ -267,7 +276,7 @@ func (m *WritableSecret) validateTags(formats strfmt.Registry) error { return nil } -func (m *WritableSecret) validateURL(formats strfmt.Registry) error { +func (m *WritableIPRange) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil } @@ -279,11 +288,11 @@ func (m *WritableSecret) validateURL(formats strfmt.Registry) error { return nil } -// ContextValidate validate this writable secret based on the context it is used -func (m *WritableSecret) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this writable IP range based on the context it is used +func (m *WritableIPRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateAssignedObject(ctx, formats); err != nil { + if err := m.contextValidateChildren(ctx, formats); err != nil { res = append(res, err) } @@ -295,7 +304,7 @@ func (m *WritableSecret) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } - if err := m.contextValidateHash(ctx, formats); err != nil { + if err := m.contextValidateFamily(ctx, formats); err != nil { res = append(res, err) } @@ -307,6 +316,10 @@ func (m *WritableSecret) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } + if err := m.contextValidateSize(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -321,12 +334,16 @@ func (m *WritableSecret) ContextValidate(ctx context.Context, formats strfmt.Reg return nil } -func (m *WritableSecret) contextValidateAssignedObject(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableIPRange) contextValidateChildren(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "children", "body", int64(m.Children)); err != nil { + return err + } return nil } -func (m *WritableSecret) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableIPRange) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { return err @@ -335,7 +352,7 @@ func (m *WritableSecret) contextValidateCreated(ctx context.Context, formats str return nil } -func (m *WritableSecret) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableIPRange) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { return err @@ -344,16 +361,16 @@ func (m *WritableSecret) contextValidateDisplay(ctx context.Context, formats str return nil } -func (m *WritableSecret) contextValidateHash(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableIPRange) contextValidateFamily(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "hash", "body", string(m.Hash)); err != nil { + if err := validate.ReadOnly(ctx, "family", "body", string(m.Family)); err != nil { return err } return nil } -func (m *WritableSecret) contextValidateID(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableIPRange) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { return err @@ -362,7 +379,7 @@ func (m *WritableSecret) contextValidateID(ctx context.Context, formats strfmt.R return nil } -func (m *WritableSecret) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableIPRange) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { return err @@ -371,7 +388,16 @@ func (m *WritableSecret) contextValidateLastUpdated(ctx context.Context, formats return nil } -func (m *WritableSecret) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableIPRange) contextValidateSize(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "size", "body", int64(m.Size)); err != nil { + return err + } + + return nil +} + +func (m *WritableIPRange) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -389,7 +415,7 @@ func (m *WritableSecret) contextValidateTags(ctx context.Context, formats strfmt return nil } -func (m *WritableSecret) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableIPRange) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { return err @@ -399,7 +425,7 @@ func (m *WritableSecret) contextValidateURL(ctx context.Context, formats strfmt. } // MarshalBinary interface implementation -func (m *WritableSecret) MarshalBinary() ([]byte, error) { +func (m *WritableIPRange) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -407,8 +433,8 @@ func (m *WritableSecret) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *WritableSecret) UnmarshalBinary(b []byte) error { - var res WritableSecret +func (m *WritableIPRange) UnmarshalBinary(b []byte) error { + var res WritableIPRange if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/netbox/models/writable_journal_entry.go b/netbox/models/writable_journal_entry.go index a53d41850..5a08ca2ae 100644 --- a/netbox/models/writable_journal_entry.go +++ b/netbox/models/writable_journal_entry.go @@ -37,7 +37,7 @@ type WritableJournalEntry struct { // Assigned object // Read Only: true - AssignedObject map[string]*string `json:"assigned_object,omitempty"` + AssignedObject interface{} `json:"assigned_object,omitempty"` // Assigned object id // Required: true @@ -229,10 +229,6 @@ func (m *WritableJournalEntry) validateURL(formats strfmt.Registry) error { func (m *WritableJournalEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateAssignedObject(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -255,11 +251,6 @@ func (m *WritableJournalEntry) ContextValidate(ctx context.Context, formats strf return nil } -func (m *WritableJournalEntry) contextValidateAssignedObject(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableJournalEntry) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { diff --git a/netbox/models/writable_power_feed.go b/netbox/models/writable_power_feed.go index c5e186075..1737043c9 100644 --- a/netbox/models/writable_power_feed.go +++ b/netbox/models/writable_power_feed.go @@ -54,7 +54,7 @@ type WritablePowerFeed struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true @@ -69,7 +69,7 @@ type WritablePowerFeed struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -558,18 +558,10 @@ func (m *WritablePowerFeed) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { res = append(res, err) } @@ -631,11 +623,6 @@ func (m *WritablePowerFeed) contextValidateCable(ctx context.Context, formats st return nil } -func (m *WritablePowerFeed) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritablePowerFeed) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { @@ -645,11 +632,6 @@ func (m *WritablePowerFeed) contextValidateCablePeerType(ctx context.Context, fo return nil } -func (m *WritablePowerFeed) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritablePowerFeed) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { diff --git a/netbox/models/writable_power_outlet.go b/netbox/models/writable_power_outlet.go index c536cd4d2..d42238a4b 100644 --- a/netbox/models/writable_power_outlet.go +++ b/netbox/models/writable_power_outlet.go @@ -49,7 +49,7 @@ type WritablePowerOutlet struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true @@ -61,7 +61,7 @@ type WritablePowerOutlet struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -132,7 +132,7 @@ type WritablePowerOutlet struct { // Type // // Physical port type - // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid] + // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid hardwired] Type string `json:"type,omitempty"` // Url @@ -359,7 +359,7 @@ var writablePowerOutletTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid","hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -611,6 +611,9 @@ const ( // WritablePowerOutletTypeSafDashdDashGrid captures enum value "saf-d-grid" WritablePowerOutletTypeSafDashdDashGrid string = "saf-d-grid" + + // WritablePowerOutletTypeHardwired captures enum value "hardwired" + WritablePowerOutletTypeHardwired string = "hardwired" ) // prop value enum @@ -658,18 +661,10 @@ func (m *WritablePowerOutlet) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { res = append(res, err) } @@ -731,11 +726,6 @@ func (m *WritablePowerOutlet) contextValidateCable(ctx context.Context, formats return nil } -func (m *WritablePowerOutlet) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritablePowerOutlet) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { @@ -745,11 +735,6 @@ func (m *WritablePowerOutlet) contextValidateCablePeerType(ctx context.Context, return nil } -func (m *WritablePowerOutlet) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritablePowerOutlet) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { diff --git a/netbox/models/writable_power_outlet_template.go b/netbox/models/writable_power_outlet_template.go index 552a259cd..f05d75b44 100644 --- a/netbox/models/writable_power_outlet_template.go +++ b/netbox/models/writable_power_outlet_template.go @@ -83,7 +83,7 @@ type WritablePowerOutletTemplate struct { PowerPort *int64 `json:"power_port,omitempty"` // Type - // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid] + // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid hardwired] Type string `json:"type,omitempty"` // Url @@ -261,7 +261,7 @@ var writablePowerOutletTemplateTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid","hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -513,6 +513,9 @@ const ( // WritablePowerOutletTemplateTypeSafDashdDashGrid captures enum value "saf-d-grid" WritablePowerOutletTemplateTypeSafDashdDashGrid string = "saf-d-grid" + + // WritablePowerOutletTemplateTypeHardwired captures enum value "hardwired" + WritablePowerOutletTemplateTypeHardwired string = "hardwired" ) // prop value enum diff --git a/netbox/models/writable_power_port.go b/netbox/models/writable_power_port.go index 6a56ddbbe..91067cf0b 100644 --- a/netbox/models/writable_power_port.go +++ b/netbox/models/writable_power_port.go @@ -56,7 +56,7 @@ type WritablePowerPort struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true @@ -68,7 +68,7 @@ type WritablePowerPort struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -675,18 +675,10 @@ func (m *WritablePowerPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { res = append(res, err) } @@ -748,11 +740,6 @@ func (m *WritablePowerPort) contextValidateCable(ctx context.Context, formats st return nil } -func (m *WritablePowerPort) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritablePowerPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { @@ -762,11 +749,6 @@ func (m *WritablePowerPort) contextValidateCablePeerType(ctx context.Context, fo return nil } -func (m *WritablePowerPort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritablePowerPort) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { diff --git a/netbox/models/writable_prefix.go b/netbox/models/writable_prefix.go index b8241418e..30ef8ba44 100644 --- a/netbox/models/writable_prefix.go +++ b/netbox/models/writable_prefix.go @@ -78,6 +78,11 @@ type WritablePrefix struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Mark utilized + // + // Treat as 100% utilized + MarkUtilized bool `json:"mark_utilized,omitempty"` + // Prefix // // IPv4 or IPv6 network with mask diff --git a/netbox/models/writable_rack.go b/netbox/models/writable_rack.go index 52d20492d..1bb8059eb 100644 --- a/netbox/models/writable_rack.go +++ b/netbox/models/writable_rack.go @@ -66,10 +66,6 @@ type WritableRack struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // Facility ID // // Locally-assigned identifier @@ -599,10 +595,6 @@ func (m *WritableRack) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } @@ -656,15 +648,6 @@ func (m *WritableRack) contextValidateDisplay(ctx context.Context, formats strfm return nil } -func (m *WritableRack) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *WritableRack) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { diff --git a/netbox/models/writable_rear_port.go b/netbox/models/writable_rear_port.go index d004e37ef..0e77a2765 100644 --- a/netbox/models/writable_rear_port.go +++ b/netbox/models/writable_rear_port.go @@ -49,12 +49,17 @@ type WritableRearPort struct { // Return the appropriate serializer for the cable termination model. // // Read Only: true - CablePeer map[string]*string `json:"cable_peer,omitempty"` + CablePeer interface{} `json:"cable_peer,omitempty"` // Cable peer type // Read Only: true CablePeerType string `json:"cable_peer_type,omitempty"` + // Color + // Max Length: 6 + // Pattern: ^[0-9a-f]{6}$ + Color string `json:"color,omitempty"` + // Created // Read Only: true // Format: date @@ -128,6 +133,10 @@ func (m *WritableRearPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateColor(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -191,6 +200,22 @@ func (m *WritableRearPort) validateCable(formats strfmt.Registry) error { return nil } +func (m *WritableRearPort) validateColor(formats strfmt.Registry) error { + if swag.IsZero(m.Color) { // not required + return nil + } + + if err := validate.MaxLength("color", "body", m.Color, 6); err != nil { + return err + } + + if err := validate.Pattern("color", "body", m.Color, `^[0-9a-f]{6}$`); err != nil { + return err + } + + return nil +} + func (m *WritableRearPort) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -459,10 +484,6 @@ func (m *WritableRearPort) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } - if err := m.contextValidateCablePeer(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { res = append(res, err) } @@ -520,11 +541,6 @@ func (m *WritableRearPort) contextValidateCable(ctx context.Context, formats str return nil } -func (m *WritableRearPort) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableRearPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { diff --git a/netbox/models/writable_rear_port_template.go b/netbox/models/writable_rear_port_template.go index 945ba23ad..faa9ff2ba 100644 --- a/netbox/models/writable_rear_port_template.go +++ b/netbox/models/writable_rear_port_template.go @@ -35,6 +35,11 @@ import ( // swagger:model WritableRearPortTemplate type WritableRearPortTemplate struct { + // Color + // Max Length: 6 + // Pattern: ^[0-9a-f]{6}$ + Color string `json:"color,omitempty"` + // Created // Read Only: true // Format: date @@ -93,6 +98,10 @@ type WritableRearPortTemplate struct { func (m *WritableRearPortTemplate) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateColor(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -135,6 +144,22 @@ func (m *WritableRearPortTemplate) Validate(formats strfmt.Registry) error { return nil } +func (m *WritableRearPortTemplate) validateColor(formats strfmt.Registry) error { + if swag.IsZero(m.Color) { // not required + return nil + } + + if err := validate.MaxLength("color", "body", m.Color, 6); err != nil { + return err + } + + if err := validate.Pattern("color", "body", m.Color, `^[0-9a-f]{6}$`); err != nil { + return err + } + + return nil +} + func (m *WritableRearPortTemplate) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil diff --git a/netbox/models/writable_site.go b/netbox/models/writable_site.go index f5d1ac403..bd6222d86 100644 --- a/netbox/models/writable_site.go +++ b/netbox/models/writable_site.go @@ -104,12 +104,12 @@ type WritableSite struct { // Latitude // // GPS coordinate (latitude) - Latitude *string `json:"latitude,omitempty"` + Latitude *float64 `json:"latitude,omitempty"` // Longitude // // GPS coordinate (longitude) - Longitude *string `json:"longitude,omitempty"` + Longitude *float64 `json:"longitude,omitempty"` // Name // Required: true diff --git a/netbox/models/writable_token.go b/netbox/models/writable_token.go new file mode 100644 index 000000000..3ecd67c0d --- /dev/null +++ b/netbox/models/writable_token.go @@ -0,0 +1,263 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableToken writable token +// +// swagger:model WritableToken +type WritableToken struct { + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // Expires + // Format: date-time + Expires *strfmt.DateTime `json:"expires,omitempty"` + + // Id + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Key + // Max Length: 40 + // Min Length: 40 + Key string `json:"key,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` + + // User + // Required: true + User *int64 `json:"user"` + + // Write enabled + // + // Permit create/update/delete operations using this key + WriteEnabled bool `json:"write_enabled,omitempty"` +} + +// Validate validates this writable token +func (m *WritableToken) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateExpires(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKey(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUser(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableToken) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableToken) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WritableToken) validateExpires(formats strfmt.Registry) error { + if swag.IsZero(m.Expires) { // not required + return nil + } + + if err := validate.FormatOf("expires", "body", "date-time", m.Expires.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableToken) validateKey(formats strfmt.Registry) error { + if swag.IsZero(m.Key) { // not required + return nil + } + + if err := validate.MinLength("key", "body", m.Key, 40); err != nil { + return err + } + + if err := validate.MaxLength("key", "body", m.Key, 40); err != nil { + return err + } + + return nil +} + +func (m *WritableToken) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableToken) validateUser(formats strfmt.Registry) error { + + if err := validate.Required("user", "body", m.User); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable token based on the context it is used +func (m *WritableToken) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableToken) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableToken) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableToken) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableToken) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableToken) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableToken) UnmarshalBinary(b []byte) error { + var res WritableToken + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_v_l_a_n.go b/netbox/models/writable_v_l_a_n.go index 13fa5d0e6..bfb28d383 100644 --- a/netbox/models/writable_v_l_a_n.go +++ b/netbox/models/writable_v_l_a_n.go @@ -52,10 +52,6 @@ type WritableVLAN struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // Group Group *int64 `json:"group,omitempty"` @@ -311,10 +307,6 @@ func (m *WritableVLAN) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } @@ -359,15 +351,6 @@ func (m *WritableVLAN) contextValidateDisplay(ctx context.Context, formats strfm return nil } -func (m *WritableVLAN) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *WritableVLAN) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { diff --git a/netbox/models/writable_v_r_f.go b/netbox/models/writable_v_r_f.go index 7c631d038..32977ae41 100644 --- a/netbox/models/writable_v_r_f.go +++ b/netbox/models/writable_v_r_f.go @@ -51,10 +51,6 @@ type WritableVRF struct { // Read Only: true Display string `json:"display,omitempty"` - // Display name - // Read Only: true - DisplayName string `json:"display_name,omitempty"` - // Enforce unique space // // Prevent duplicate prefixes/IP addresses within this VRF @@ -292,10 +288,6 @@ func (m *WritableVRF) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } - if err := m.contextValidateDisplayName(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } @@ -344,15 +336,6 @@ func (m *WritableVRF) contextValidateDisplay(ctx context.Context, formats strfmt return nil } -func (m *WritableVRF) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "display_name", "body", string(m.DisplayName)); err != nil { - return err - } - - return nil -} - func (m *WritableVRF) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { diff --git a/netbox/models/writable_virtual_machine_with_config_context.go b/netbox/models/writable_virtual_machine_with_config_context.go index 47d4de073..c6b7897b4 100644 --- a/netbox/models/writable_virtual_machine_with_config_context.go +++ b/netbox/models/writable_virtual_machine_with_config_context.go @@ -45,7 +45,7 @@ type WritableVirtualMachineWithConfigContext struct { // Config context // Read Only: true - ConfigContext map[string]*string `json:"config_context,omitempty"` + ConfigContext interface{} `json:"config_context,omitempty"` // Created // Read Only: true @@ -123,7 +123,8 @@ type WritableVirtualMachineWithConfigContext struct { URL strfmt.URI `json:"url,omitempty"` // VCPUs - Vcpus *string `json:"vcpus,omitempty"` + // Minimum: 0.01 + Vcpus *float64 `json:"vcpus,omitempty"` } // Validate validates this writable virtual machine with config context @@ -166,6 +167,10 @@ func (m *WritableVirtualMachineWithConfigContext) Validate(formats strfmt.Regist res = append(res, err) } + if err := m.validateVcpus(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -344,14 +349,22 @@ func (m *WritableVirtualMachineWithConfigContext) validateURL(formats strfmt.Reg return nil } +func (m *WritableVirtualMachineWithConfigContext) validateVcpus(formats strfmt.Registry) error { + if swag.IsZero(m.Vcpus) { // not required + return nil + } + + if err := validate.Minimum("vcpus", "body", *m.Vcpus, 0.01, false); err != nil { + return err + } + + return nil +} + // ContextValidate validate this writable virtual machine with config context based on the context it is used func (m *WritableVirtualMachineWithConfigContext) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateConfigContext(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -390,11 +403,6 @@ func (m *WritableVirtualMachineWithConfigContext) ContextValidate(ctx context.Co return nil } -func (m *WritableVirtualMachineWithConfigContext) contextValidateConfigContext(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableVirtualMachineWithConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { diff --git a/swagger.json b/swagger.json index bbd92565e..977c1fdfc 100644 --- a/swagger.json +++ b/swagger.json @@ -1 +1,59936 @@ -{"swagger": "2.0", "info": {"title": "NetBox API", "description": "API to access NetBox", "termsOfService": "https://github.com/netbox-community/netbox", "license": {"name": "Apache v2 License"}, "version": "2.11"}, "host": "localhost", "schemes": ["http"], "basePath": "/api", "consumes": ["application/json"], "produces": ["application/json"], "securityDefinitions": {"Bearer": {"in": "header", "name": "Authorization", "type": "apiKey"}}, "security": [{"Bearer": []}], "paths": {"/circuits/circuit-terminations/": {"get": {"operationId": "circuits_circuit-terminations_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "term_side", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "port_speed", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "upstream_speed", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "xconnect_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cabled", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "circuit_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "provider_network_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "term_side__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "port_speed__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "port_speed__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "port_speed__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "port_speed__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "port_speed__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "upstream_speed__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "upstream_speed__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "upstream_speed__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "upstream_speed__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "upstream_speed__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "xconnect_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "xconnect_id__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "xconnect_id__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "xconnect_id__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "xconnect_id__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "xconnect_id__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "xconnect_id__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "xconnect_id__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "xconnect_id__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "xconnect_id__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "circuit_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "provider_network_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/CircuitTermination"}}}}}}, "tags": ["circuits"]}, "post": {"operationId": "circuits_circuit-terminations_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCircuitTermination"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/CircuitTermination"}}}, "tags": ["circuits"]}, "put": {"operationId": "circuits_circuit-terminations_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCircuitTermination"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CircuitTermination"}}}, "tags": ["circuits"]}, "patch": {"operationId": "circuits_circuit-terminations_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCircuitTermination"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CircuitTermination"}}}, "tags": ["circuits"]}, "delete": {"operationId": "circuits_circuit-terminations_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["circuits"]}, "parameters": []}, "/circuits/circuit-terminations/{id}/": {"get": {"operationId": "circuits_circuit-terminations_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CircuitTermination"}}}, "tags": ["circuits"]}, "put": {"operationId": "circuits_circuit-terminations_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCircuitTermination"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CircuitTermination"}}}, "tags": ["circuits"]}, "patch": {"operationId": "circuits_circuit-terminations_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCircuitTermination"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CircuitTermination"}}}, "tags": ["circuits"]}, "delete": {"operationId": "circuits_circuit-terminations_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["circuits"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this circuit termination.", "required": true, "type": "integer"}]}, "/circuits/circuit-terminations/{id}/paths/": {"get": {"operationId": "circuits_circuit-terminations_paths", "description": "Return all CablePaths which traverse a given pass-through port.", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CircuitTermination"}}}, "tags": ["circuits"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this circuit termination.", "required": true, "type": "integer"}]}, "/circuits/circuit-types/": {"get": {"operationId": "circuits_circuit-types_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/CircuitType"}}}}}}, "tags": ["circuits"]}, "post": {"operationId": "circuits_circuit-types_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/CircuitType"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/CircuitType"}}}, "tags": ["circuits"]}, "put": {"operationId": "circuits_circuit-types_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/CircuitType"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CircuitType"}}}, "tags": ["circuits"]}, "patch": {"operationId": "circuits_circuit-types_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/CircuitType"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CircuitType"}}}, "tags": ["circuits"]}, "delete": {"operationId": "circuits_circuit-types_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["circuits"]}, "parameters": []}, "/circuits/circuit-types/{id}/": {"get": {"operationId": "circuits_circuit-types_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CircuitType"}}}, "tags": ["circuits"]}, "put": {"operationId": "circuits_circuit-types_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/CircuitType"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CircuitType"}}}, "tags": ["circuits"]}, "patch": {"operationId": "circuits_circuit-types_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/CircuitType"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CircuitType"}}}, "tags": ["circuits"]}, "delete": {"operationId": "circuits_circuit-types_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["circuits"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this circuit type.", "required": true, "type": "integer"}]}, "/circuits/circuits/": {"get": {"operationId": "circuits_circuits_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cid", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "install_date", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "commit_rate", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "provider_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "provider", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "provider_network_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "status", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cid__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cid__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cid__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cid__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cid__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cid__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cid__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cid__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cid__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cid__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "install_date__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "install_date__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "install_date__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "install_date__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "install_date__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "commit_rate__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "commit_rate__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "commit_rate__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "commit_rate__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "commit_rate__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "provider_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "provider__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "provider_network_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "status__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Circuit"}}}}}}, "tags": ["circuits"]}, "post": {"operationId": "circuits_circuits_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCircuit"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Circuit"}}}, "tags": ["circuits"]}, "put": {"operationId": "circuits_circuits_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCircuit"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Circuit"}}}, "tags": ["circuits"]}, "patch": {"operationId": "circuits_circuits_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCircuit"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Circuit"}}}, "tags": ["circuits"]}, "delete": {"operationId": "circuits_circuits_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["circuits"]}, "parameters": []}, "/circuits/circuits/{id}/": {"get": {"operationId": "circuits_circuits_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Circuit"}}}, "tags": ["circuits"]}, "put": {"operationId": "circuits_circuits_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCircuit"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Circuit"}}}, "tags": ["circuits"]}, "patch": {"operationId": "circuits_circuits_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCircuit"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Circuit"}}}, "tags": ["circuits"]}, "delete": {"operationId": "circuits_circuits_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["circuits"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this circuit.", "required": true, "type": "integer"}]}, "/circuits/provider-networks/": {"get": {"operationId": "circuits_provider-networks_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "provider_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "provider", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "provider_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "provider__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/ProviderNetwork"}}}}}}, "tags": ["circuits"]}, "post": {"operationId": "circuits_provider-networks_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableProviderNetwork"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/ProviderNetwork"}}}, "tags": ["circuits"]}, "put": {"operationId": "circuits_provider-networks_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableProviderNetwork"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ProviderNetwork"}}}, "tags": ["circuits"]}, "patch": {"operationId": "circuits_provider-networks_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableProviderNetwork"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ProviderNetwork"}}}, "tags": ["circuits"]}, "delete": {"operationId": "circuits_provider-networks_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["circuits"]}, "parameters": []}, "/circuits/provider-networks/{id}/": {"get": {"operationId": "circuits_provider-networks_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ProviderNetwork"}}}, "tags": ["circuits"]}, "put": {"operationId": "circuits_provider-networks_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableProviderNetwork"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ProviderNetwork"}}}, "tags": ["circuits"]}, "patch": {"operationId": "circuits_provider-networks_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableProviderNetwork"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ProviderNetwork"}}}, "tags": ["circuits"]}, "delete": {"operationId": "circuits_provider-networks_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["circuits"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this provider network.", "required": true, "type": "integer"}]}, "/circuits/providers/": {"get": {"operationId": "circuits_providers_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asn", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "account", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asn__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asn__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asn__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asn__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asn__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "account__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "account__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "account__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "account__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "account__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "account__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "account__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "account__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "account__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "account__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Provider"}}}}}}, "tags": ["circuits"]}, "post": {"operationId": "circuits_providers_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Provider"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Provider"}}}, "tags": ["circuits"]}, "put": {"operationId": "circuits_providers_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Provider"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Provider"}}}, "tags": ["circuits"]}, "patch": {"operationId": "circuits_providers_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Provider"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Provider"}}}, "tags": ["circuits"]}, "delete": {"operationId": "circuits_providers_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["circuits"]}, "parameters": []}, "/circuits/providers/{id}/": {"get": {"operationId": "circuits_providers_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Provider"}}}, "tags": ["circuits"]}, "put": {"operationId": "circuits_providers_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Provider"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Provider"}}}, "tags": ["circuits"]}, "patch": {"operationId": "circuits_providers_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Provider"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Provider"}}}, "tags": ["circuits"]}, "delete": {"operationId": "circuits_providers_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["circuits"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this provider.", "required": true, "type": "integer"}]}, "/dcim/cables/": {"get": {"operationId": "dcim_cables_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "length", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "length_unit", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "status", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "rack_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "rack", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "length__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "length__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "length__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "length__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "length__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "length_unit__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "status__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Cable"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_cables_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCable"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Cable"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_cables_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCable"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Cable"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_cables_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCable"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Cable"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_cables_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/cables/{id}/": {"get": {"operationId": "dcim_cables_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Cable"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_cables_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCable"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Cable"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_cables_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCable"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Cable"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_cables_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this cable.", "required": true, "type": "integer"}]}, "/dcim/connected-device/": {"get": {"operationId": "dcim_connected-device_list", "description": "This endpoint allows a user to determine what device (if any) is connected to a given peer device and peer\ninterface. This is useful in a situation where a device boots with no configuration, but can detect its neighbors\nvia a protocol such as LLDP. Two query parameters must be included in the request:\n\n* `peer_device`: The name of the peer device\n* `peer_interface`: The name of the peer interface", "parameters": [{"name": "peer_device", "in": "query", "description": "The name of the peer device", "required": true, "type": "string"}, {"name": "peer_interface", "in": "query", "description": "The name of the peer interface", "required": true, "type": "string"}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Device"}}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/console-connections/": {"get": {"operationId": "dcim_console-connections_list", "description": "", "parameters": [{"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/ConsolePort"}}}}}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/console-port-templates/": {"get": {"operationId": "dcim_console-port-templates_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/ConsolePortTemplate"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_console-port-templates_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsolePortTemplate"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/ConsolePortTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_console-port-templates_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsolePortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsolePortTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_console-port-templates_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsolePortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsolePortTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_console-port-templates_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/console-port-templates/{id}/": {"get": {"operationId": "dcim_console-port-templates_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsolePortTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_console-port-templates_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsolePortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsolePortTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_console-port-templates_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsolePortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsolePortTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_console-port-templates_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this console port template.", "required": true, "type": "integer"}]}, "/dcim/console-ports/": {"get": {"operationId": "dcim_console-ports_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cabled", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "connected", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/ConsolePort"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_console-ports_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsolePort"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/ConsolePort"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_console-ports_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsolePort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsolePort"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_console-ports_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsolePort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsolePort"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_console-ports_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/console-ports/{id}/": {"get": {"operationId": "dcim_console-ports_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsolePort"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_console-ports_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsolePort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsolePort"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_console-ports_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsolePort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsolePort"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_console-ports_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this console port.", "required": true, "type": "integer"}]}, "/dcim/console-ports/{id}/trace/": {"get": {"operationId": "dcim_console-ports_trace", "description": "Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination).", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsolePort"}}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this console port.", "required": true, "type": "integer"}]}, "/dcim/console-server-port-templates/": {"get": {"operationId": "dcim_console-server-port-templates_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/ConsoleServerPortTemplate"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_console-server-port-templates_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsoleServerPortTemplate"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/ConsoleServerPortTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_console-server-port-templates_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsoleServerPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsoleServerPortTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_console-server-port-templates_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsoleServerPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsoleServerPortTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_console-server-port-templates_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/console-server-port-templates/{id}/": {"get": {"operationId": "dcim_console-server-port-templates_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsoleServerPortTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_console-server-port-templates_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsoleServerPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsoleServerPortTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_console-server-port-templates_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsoleServerPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsoleServerPortTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_console-server-port-templates_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this console server port template.", "required": true, "type": "integer"}]}, "/dcim/console-server-ports/": {"get": {"operationId": "dcim_console-server-ports_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cabled", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "connected", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/ConsoleServerPort"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_console-server-ports_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsoleServerPort"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/ConsoleServerPort"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_console-server-ports_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsoleServerPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsoleServerPort"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_console-server-ports_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsoleServerPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsoleServerPort"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_console-server-ports_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/console-server-ports/{id}/": {"get": {"operationId": "dcim_console-server-ports_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsoleServerPort"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_console-server-ports_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsoleServerPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsoleServerPort"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_console-server-ports_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConsoleServerPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsoleServerPort"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_console-server-ports_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this console server port.", "required": true, "type": "integer"}]}, "/dcim/console-server-ports/{id}/trace/": {"get": {"operationId": "dcim_console-server-ports_trace", "description": "Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination).", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConsoleServerPort"}}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this console server port.", "required": true, "type": "integer"}]}, "/dcim/device-bay-templates/": {"get": {"operationId": "dcim_device-bay-templates_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/DeviceBayTemplate"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_device-bay-templates_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceBayTemplate"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/DeviceBayTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_device-bay-templates_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceBayTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceBayTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_device-bay-templates_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceBayTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceBayTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_device-bay-templates_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/device-bay-templates/{id}/": {"get": {"operationId": "dcim_device-bay-templates_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceBayTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_device-bay-templates_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceBayTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceBayTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_device-bay-templates_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceBayTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceBayTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_device-bay-templates_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this device bay template.", "required": true, "type": "integer"}]}, "/dcim/device-bays/": {"get": {"operationId": "dcim_device-bays_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/DeviceBay"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_device-bays_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceBay"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/DeviceBay"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_device-bays_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceBay"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceBay"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_device-bays_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceBay"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceBay"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_device-bays_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/device-bays/{id}/": {"get": {"operationId": "dcim_device-bays_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceBay"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_device-bays_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceBay"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceBay"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_device-bays_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceBay"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceBay"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_device-bays_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this device bay.", "required": true, "type": "integer"}]}, "/dcim/device-roles/": {"get": {"operationId": "dcim_device-roles_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vm_role", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/DeviceRole"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_device-roles_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/DeviceRole"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/DeviceRole"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_device-roles_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/DeviceRole"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceRole"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_device-roles_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/DeviceRole"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceRole"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_device-roles_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/device-roles/{id}/": {"get": {"operationId": "dcim_device-roles_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceRole"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_device-roles_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/DeviceRole"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceRole"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_device-roles_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/DeviceRole"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceRole"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_device-roles_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this device role.", "required": true, "type": "integer"}]}, "/dcim/device-types/": {"get": {"operationId": "dcim_device-types_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "model", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_number", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "u_height", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "is_full_depth", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "subdevice_role", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "console_ports", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "console_server_ports", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "power_ports", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "power_outlets", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "interfaces", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "pass_through_ports", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_bays", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "model__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "model__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "model__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "model__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "model__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "model__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "model__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "model__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "model__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "model__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_number__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_number__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_number__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_number__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_number__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_number__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_number__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_number__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_number__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_number__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "u_height__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "u_height__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "u_height__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "u_height__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "u_height__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "subdevice_role__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/DeviceType"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_device-types_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceType"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/DeviceType"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_device-types_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceType"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceType"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_device-types_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceType"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceType"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_device-types_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/device-types/{id}/": {"get": {"operationId": "dcim_device-types_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceType"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_device-types_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceType"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceType"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_device-types_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceType"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceType"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_device-types_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this device type.", "required": true, "type": "integer"}]}, "/dcim/devices/": {"get": {"operationId": "dcim_devices_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "face", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "position", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vc_position", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vc_priority", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "local_context_data", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_type_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "role_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "role", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "platform_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "platform", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "location_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "rack_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cluster_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "model", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "status", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "is_full_depth", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "serial", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "has_primary_ip", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "virtual_chassis_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "virtual_chassis_member", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "console_ports", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "console_server_ports", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "power_ports", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "power_outlets", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "interfaces", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "pass_through_ports", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_bays", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "face__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "position__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "position__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "position__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "position__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "position__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vc_position__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vc_position__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vc_position__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vc_position__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vc_position__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vc_priority__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vc_priority__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vc_priority__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vc_priority__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vc_priority__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_type_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "role_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "role__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "platform_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "platform__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "location_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "rack_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cluster_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "model__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "status__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "virtual_chassis_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/DeviceWithConfigContext"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_devices_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceWithConfigContext"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/DeviceWithConfigContext"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_devices_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceWithConfigContext"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceWithConfigContext"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_devices_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceWithConfigContext"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceWithConfigContext"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_devices_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/devices/{id}/": {"get": {"operationId": "dcim_devices_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceWithConfigContext"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_devices_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceWithConfigContext"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceWithConfigContext"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_devices_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableDeviceWithConfigContext"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceWithConfigContext"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_devices_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this device.", "required": true, "type": "integer"}]}, "/dcim/devices/{id}/napalm/": {"get": {"operationId": "dcim_devices_napalm", "description": "Execute a NAPALM method on a Device", "parameters": [{"name": "method", "in": "query", "required": true, "type": "string"}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/DeviceNAPALM"}}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this device.", "required": true, "type": "integer"}]}, "/dcim/front-port-templates/": {"get": {"operationId": "dcim_front-port-templates_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/FrontPortTemplate"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_front-port-templates_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableFrontPortTemplate"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/FrontPortTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_front-port-templates_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableFrontPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/FrontPortTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_front-port-templates_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableFrontPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/FrontPortTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_front-port-templates_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/front-port-templates/{id}/": {"get": {"operationId": "dcim_front-port-templates_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/FrontPortTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_front-port-templates_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableFrontPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/FrontPortTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_front-port-templates_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableFrontPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/FrontPortTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_front-port-templates_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this front port template.", "required": true, "type": "integer"}]}, "/dcim/front-ports/": {"get": {"operationId": "dcim_front-ports_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cabled", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/FrontPort"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_front-ports_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableFrontPort"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/FrontPort"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_front-ports_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableFrontPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/FrontPort"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_front-ports_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableFrontPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/FrontPort"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_front-ports_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/front-ports/{id}/": {"get": {"operationId": "dcim_front-ports_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/FrontPort"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_front-ports_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableFrontPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/FrontPort"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_front-ports_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableFrontPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/FrontPort"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_front-ports_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this front port.", "required": true, "type": "integer"}]}, "/dcim/front-ports/{id}/paths/": {"get": {"operationId": "dcim_front-ports_paths", "description": "Return all CablePaths which traverse a given pass-through port.", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/FrontPort"}}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this front port.", "required": true, "type": "integer"}]}, "/dcim/interface-connections/": {"get": {"operationId": "dcim_interface-connections_list", "description": "", "parameters": [{"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/InterfaceConnection"}}}}}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/interface-templates/": {"get": {"operationId": "dcim_interface-templates_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mgmt_only", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/InterfaceTemplate"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_interface-templates_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInterfaceTemplate"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/InterfaceTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_interface-templates_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInterfaceTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/InterfaceTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_interface-templates_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInterfaceTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/InterfaceTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_interface-templates_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/interface-templates/{id}/": {"get": {"operationId": "dcim_interface-templates_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/InterfaceTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_interface-templates_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInterfaceTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/InterfaceTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_interface-templates_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInterfaceTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/InterfaceTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_interface-templates_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this interface template.", "required": true, "type": "integer"}]}, "/dcim/interfaces/": {"get": {"operationId": "dcim_interfaces_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "enabled", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mtu", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mgmt_only", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mode", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cabled", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "connected", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "kind", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "lag_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vlan_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "vlan", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mtu__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mtu__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mtu__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mtu__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mtu__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mode__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "lag_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "mac_address__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Interface"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_interfaces_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInterface"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Interface"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_interfaces_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInterface"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Interface"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_interfaces_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInterface"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Interface"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_interfaces_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/interfaces/{id}/": {"get": {"operationId": "dcim_interfaces_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Interface"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_interfaces_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInterface"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Interface"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_interfaces_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInterface"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Interface"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_interfaces_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this interface.", "required": true, "type": "integer"}]}, "/dcim/interfaces/{id}/trace/": {"get": {"operationId": "dcim_interfaces_trace", "description": "Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination).", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Interface"}}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this interface.", "required": true, "type": "integer"}]}, "/dcim/inventory-items/": {"get": {"operationId": "dcim_inventory-items_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "discovered", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "serial", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_id__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_id__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_id__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_id__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_id__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_id__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_id__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_id__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "part_id__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/InventoryItem"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_inventory-items_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInventoryItem"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/InventoryItem"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_inventory-items_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInventoryItem"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/InventoryItem"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_inventory-items_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInventoryItem"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/InventoryItem"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_inventory-items_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/inventory-items/{id}/": {"get": {"operationId": "dcim_inventory-items_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/InventoryItem"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_inventory-items_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInventoryItem"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/InventoryItem"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_inventory-items_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableInventoryItem"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/InventoryItem"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_inventory-items_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this inventory item.", "required": true, "type": "integer"}]}, "/dcim/locations/": {"get": {"operationId": "dcim_locations_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Location"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_locations_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableLocation"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Location"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_locations_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableLocation"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Location"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_locations_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableLocation"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Location"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_locations_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/locations/{id}/": {"get": {"operationId": "dcim_locations_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Location"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_locations_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableLocation"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Location"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_locations_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableLocation"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Location"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_locations_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this location.", "required": true, "type": "integer"}]}, "/dcim/manufacturers/": {"get": {"operationId": "dcim_manufacturers_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Manufacturer"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_manufacturers_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Manufacturer"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Manufacturer"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_manufacturers_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Manufacturer"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Manufacturer"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_manufacturers_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Manufacturer"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Manufacturer"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_manufacturers_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/manufacturers/{id}/": {"get": {"operationId": "dcim_manufacturers_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Manufacturer"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_manufacturers_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Manufacturer"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Manufacturer"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_manufacturers_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Manufacturer"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Manufacturer"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_manufacturers_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this manufacturer.", "required": true, "type": "integer"}]}, "/dcim/platforms/": {"get": {"operationId": "dcim_platforms_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "napalm_driver", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "napalm_driver__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "napalm_driver__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "napalm_driver__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "napalm_driver__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "napalm_driver__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "napalm_driver__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "napalm_driver__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "napalm_driver__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "napalm_driver__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "napalm_driver__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "manufacturer__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Platform"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_platforms_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePlatform"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Platform"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_platforms_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePlatform"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Platform"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_platforms_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePlatform"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Platform"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_platforms_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/platforms/{id}/": {"get": {"operationId": "dcim_platforms_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Platform"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_platforms_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePlatform"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Platform"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_platforms_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePlatform"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Platform"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_platforms_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this platform.", "required": true, "type": "integer"}]}, "/dcim/power-connections/": {"get": {"operationId": "dcim_power-connections_list", "description": "", "parameters": [{"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/PowerPort"}}}}}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/power-feeds/": {"get": {"operationId": "dcim_power-feeds_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "status", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "supply", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "phase", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "voltage", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "amperage", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "max_utilization", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cabled", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "connected", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "power_panel_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "rack_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "status__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "supply__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "phase__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "voltage__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "voltage__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "voltage__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "voltage__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "voltage__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "amperage__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "amperage__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "amperage__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "amperage__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "amperage__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "max_utilization__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "max_utilization__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "max_utilization__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "max_utilization__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "max_utilization__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "power_panel_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "rack_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/PowerFeed"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_power-feeds_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerFeed"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/PowerFeed"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_power-feeds_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerFeed"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerFeed"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_power-feeds_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerFeed"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerFeed"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_power-feeds_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/power-feeds/{id}/": {"get": {"operationId": "dcim_power-feeds_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerFeed"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_power-feeds_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerFeed"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerFeed"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_power-feeds_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerFeed"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerFeed"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_power-feeds_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this power feed.", "required": true, "type": "integer"}]}, "/dcim/power-feeds/{id}/trace/": {"get": {"operationId": "dcim_power-feeds_trace", "description": "Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination).", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerFeed"}}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this power feed.", "required": true, "type": "integer"}]}, "/dcim/power-outlet-templates/": {"get": {"operationId": "dcim_power-outlet-templates_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "feed_leg", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "feed_leg__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/PowerOutletTemplate"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_power-outlet-templates_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerOutletTemplate"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/PowerOutletTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_power-outlet-templates_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerOutletTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerOutletTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_power-outlet-templates_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerOutletTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerOutletTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_power-outlet-templates_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/power-outlet-templates/{id}/": {"get": {"operationId": "dcim_power-outlet-templates_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerOutletTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_power-outlet-templates_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerOutletTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerOutletTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_power-outlet-templates_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerOutletTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerOutletTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_power-outlet-templates_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this power outlet template.", "required": true, "type": "integer"}]}, "/dcim/power-outlets/": {"get": {"operationId": "dcim_power-outlets_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "feed_leg", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cabled", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "connected", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "feed_leg__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/PowerOutlet"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_power-outlets_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerOutlet"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/PowerOutlet"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_power-outlets_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerOutlet"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerOutlet"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_power-outlets_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerOutlet"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerOutlet"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_power-outlets_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/power-outlets/{id}/": {"get": {"operationId": "dcim_power-outlets_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerOutlet"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_power-outlets_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerOutlet"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerOutlet"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_power-outlets_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerOutlet"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerOutlet"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_power-outlets_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this power outlet.", "required": true, "type": "integer"}]}, "/dcim/power-outlets/{id}/trace/": {"get": {"operationId": "dcim_power-outlets_trace", "description": "Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination).", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerOutlet"}}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this power outlet.", "required": true, "type": "integer"}]}, "/dcim/power-panels/": {"get": {"operationId": "dcim_power-panels_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "location_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "location_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/PowerPanel"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_power-panels_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPanel"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/PowerPanel"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_power-panels_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPanel"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPanel"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_power-panels_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPanel"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPanel"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_power-panels_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/power-panels/{id}/": {"get": {"operationId": "dcim_power-panels_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPanel"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_power-panels_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPanel"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPanel"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_power-panels_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPanel"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPanel"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_power-panels_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this power panel.", "required": true, "type": "integer"}]}, "/dcim/power-port-templates/": {"get": {"operationId": "dcim_power-port-templates_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "maximum_draw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "allocated_draw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "maximum_draw__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "maximum_draw__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "maximum_draw__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "maximum_draw__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "maximum_draw__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "allocated_draw__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "allocated_draw__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "allocated_draw__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "allocated_draw__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "allocated_draw__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/PowerPortTemplate"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_power-port-templates_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPortTemplate"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/PowerPortTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_power-port-templates_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPortTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_power-port-templates_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPortTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_power-port-templates_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/power-port-templates/{id}/": {"get": {"operationId": "dcim_power-port-templates_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPortTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_power-port-templates_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPortTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_power-port-templates_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPortTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_power-port-templates_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this power port template.", "required": true, "type": "integer"}]}, "/dcim/power-ports/": {"get": {"operationId": "dcim_power-ports_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "maximum_draw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "allocated_draw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cabled", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "connected", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "maximum_draw__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "maximum_draw__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "maximum_draw__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "maximum_draw__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "maximum_draw__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "allocated_draw__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "allocated_draw__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "allocated_draw__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "allocated_draw__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "allocated_draw__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/PowerPort"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_power-ports_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPort"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/PowerPort"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_power-ports_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPort"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_power-ports_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPort"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_power-ports_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/power-ports/{id}/": {"get": {"operationId": "dcim_power-ports_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPort"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_power-ports_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPort"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_power-ports_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritablePowerPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPort"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_power-ports_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this power port.", "required": true, "type": "integer"}]}, "/dcim/power-ports/{id}/trace/": {"get": {"operationId": "dcim_power-ports_trace", "description": "Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination).", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PowerPort"}}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this power port.", "required": true, "type": "integer"}]}, "/dcim/rack-reservations/": {"get": {"operationId": "dcim_rack-reservations_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "rack_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "location_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "location", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "rack_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "location_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "location__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/RackReservation"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_rack-reservations_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRackReservation"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/RackReservation"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_rack-reservations_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRackReservation"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RackReservation"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_rack-reservations_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRackReservation"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RackReservation"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_rack-reservations_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/rack-reservations/{id}/": {"get": {"operationId": "dcim_rack-reservations_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RackReservation"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_rack-reservations_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRackReservation"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RackReservation"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_rack-reservations_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRackReservation"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RackReservation"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_rack-reservations_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this rack reservation.", "required": true, "type": "integer"}]}, "/dcim/rack-roles/": {"get": {"operationId": "dcim_rack-roles_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "color__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/RackRole"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_rack-roles_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/RackRole"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/RackRole"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_rack-roles_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/RackRole"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RackRole"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_rack-roles_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/RackRole"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RackRole"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_rack-roles_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/rack-roles/{id}/": {"get": {"operationId": "dcim_rack-roles_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RackRole"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_rack-roles_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/RackRole"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RackRole"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_rack-roles_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/RackRole"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RackRole"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_rack-roles_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this rack role.", "required": true, "type": "integer"}]}, "/dcim/racks/": {"get": {"operationId": "dcim_racks_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "u_height", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "desc_units", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "outer_width", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "outer_depth", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "outer_unit", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "location_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "location", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "status", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "width", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "role_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "role", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "serial", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility_id__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility_id__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility_id__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility_id__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility_id__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility_id__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility_id__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility_id__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility_id__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asset_tag__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "u_height__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "u_height__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "u_height__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "u_height__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "u_height__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "outer_width__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "outer_width__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "outer_width__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "outer_width__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "outer_width__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "outer_depth__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "outer_depth__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "outer_depth__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "outer_depth__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "outer_depth__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "outer_unit__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "location_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "location__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "status__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "width__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "role_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "role__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Rack"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_racks_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRack"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Rack"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_racks_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRack"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Rack"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_racks_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRack"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Rack"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_racks_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/racks/{id}/": {"get": {"operationId": "dcim_racks_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Rack"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_racks_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRack"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Rack"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_racks_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRack"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Rack"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_racks_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this rack.", "required": true, "type": "integer"}]}, "/dcim/racks/{id}/elevation/": {"get": {"operationId": "dcim_racks_elevation", "description": "Rack elevation representing the list of rack units. Also supports rendering the elevation as an SVG.", "parameters": [{"name": "q", "in": "query", "required": false, "type": "string", "minLength": 1}, {"name": "face", "in": "query", "required": false, "type": "string", "enum": ["front", "rear"], "default": "front"}, {"name": "render", "in": "query", "required": false, "type": "string", "enum": ["json", "svg"], "default": "json"}, {"name": "unit_width", "in": "query", "required": false, "type": "integer", "default": 220}, {"name": "unit_height", "in": "query", "required": false, "type": "integer", "default": 22}, {"name": "legend_width", "in": "query", "required": false, "type": "integer", "default": 30}, {"name": "exclude", "in": "query", "required": false, "type": "integer"}, {"name": "expand_devices", "in": "query", "required": false, "type": "boolean", "default": true}, {"name": "include_images", "in": "query", "required": false, "type": "boolean", "default": true}], "responses": {"200": {"description": "", "schema": {"type": "array", "items": {"$ref": "#/definitions/RackUnit"}}}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this rack.", "required": true, "type": "integer"}]}, "/dcim/rear-port-templates/": {"get": {"operationId": "dcim_rear-port-templates_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "positions", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "positions__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "positions__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "positions__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "positions__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "positions__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/RearPortTemplate"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_rear-port-templates_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRearPortTemplate"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/RearPortTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_rear-port-templates_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRearPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RearPortTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_rear-port-templates_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRearPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RearPortTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_rear-port-templates_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/rear-port-templates/{id}/": {"get": {"operationId": "dcim_rear-port-templates_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RearPortTemplate"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_rear-port-templates_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRearPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RearPortTemplate"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_rear-port-templates_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRearPortTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RearPortTemplate"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_rear-port-templates_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this rear port template.", "required": true, "type": "integer"}]}, "/dcim/rear-ports/": {"get": {"operationId": "dcim_rear-ports_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "positions", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cabled", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "label__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "positions__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "positions__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "positions__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "positions__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "positions__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/RearPort"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_rear-ports_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRearPort"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/RearPort"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_rear-ports_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRearPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RearPort"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_rear-ports_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRearPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RearPort"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_rear-ports_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/rear-ports/{id}/": {"get": {"operationId": "dcim_rear-ports_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RearPort"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_rear-ports_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRearPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RearPort"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_rear-ports_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRearPort"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RearPort"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_rear-ports_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this rear port.", "required": true, "type": "integer"}]}, "/dcim/rear-ports/{id}/paths/": {"get": {"operationId": "dcim_rear-ports_paths", "description": "Return all CablePaths which traverse a given pass-through port.", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/RearPort"}}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this rear port.", "required": true, "type": "integer"}]}, "/dcim/regions/": {"get": {"operationId": "dcim_regions_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Region"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_regions_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRegion"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Region"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_regions_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRegion"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Region"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_regions_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRegion"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Region"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_regions_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/regions/{id}/": {"get": {"operationId": "dcim_regions_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Region"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_regions_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRegion"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Region"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_regions_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableRegion"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Region"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_regions_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this region.", "required": true, "type": "integer"}]}, "/dcim/site-groups/": {"get": {"operationId": "dcim_site-groups_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "description__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "parent__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/SiteGroup"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_site-groups_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableSiteGroup"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/SiteGroup"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_site-groups_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableSiteGroup"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/SiteGroup"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_site-groups_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableSiteGroup"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/SiteGroup"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_site-groups_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/site-groups/{id}/": {"get": {"operationId": "dcim_site-groups_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/SiteGroup"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_site-groups_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableSiteGroup"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/SiteGroup"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_site-groups_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableSiteGroup"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/SiteGroup"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_site-groups_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this site group.", "required": true, "type": "integer"}]}, "/dcim/sites/": {"get": {"operationId": "dcim_sites_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asn", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "latitude", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "longitude", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_phone", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_email", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "status", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "slug__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "facility__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asn__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asn__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asn__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asn__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "asn__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "latitude__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "latitude__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "latitude__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "latitude__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "latitude__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "longitude__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "longitude__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "longitude__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "longitude__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "longitude__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_phone__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_phone__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_phone__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_phone__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_phone__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_phone__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_phone__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_phone__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_phone__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_phone__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_email__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_email__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_email__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_email__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_email__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_email__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_email__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_email__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_email__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "contact_email__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "status__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Site"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_sites_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableSite"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Site"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_sites_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableSite"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Site"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_sites_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableSite"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Site"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_sites_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/sites/{id}/": {"get": {"operationId": "dcim_sites_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Site"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_sites_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableSite"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Site"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_sites_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableSite"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Site"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_sites_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this site.", "required": true, "type": "integer"}]}, "/dcim/virtual-chassis/": {"get": {"operationId": "dcim_virtual-chassis_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "domain", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "master_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "master", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "domain__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "domain__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "domain__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "domain__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "domain__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "domain__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "domain__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "domain__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "domain__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "domain__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "master_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "master__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/VirtualChassis"}}}}}}, "tags": ["dcim"]}, "post": {"operationId": "dcim_virtual-chassis_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableVirtualChassis"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/VirtualChassis"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_virtual-chassis_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableVirtualChassis"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/VirtualChassis"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_virtual-chassis_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableVirtualChassis"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/VirtualChassis"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_virtual-chassis_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": []}, "/dcim/virtual-chassis/{id}/": {"get": {"operationId": "dcim_virtual-chassis_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/VirtualChassis"}}}, "tags": ["dcim"]}, "put": {"operationId": "dcim_virtual-chassis_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableVirtualChassis"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/VirtualChassis"}}}, "tags": ["dcim"]}, "patch": {"operationId": "dcim_virtual-chassis_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableVirtualChassis"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/VirtualChassis"}}}, "tags": ["dcim"]}, "delete": {"operationId": "dcim_virtual-chassis_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["dcim"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this virtual chassis.", "required": true, "type": "integer"}]}, "/extras/config-contexts/": {"get": {"operationId": "extras_config-contexts_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "is_active", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_type_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "role_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "role", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "platform_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "platform", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cluster_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cluster_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cluster_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "region__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "site__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "device_type_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "role_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "role__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "platform_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "platform__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cluster_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cluster_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "cluster_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_group__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tenant__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "tag__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/ConfigContext"}}}}}}, "tags": ["extras"]}, "post": {"operationId": "extras_config-contexts_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConfigContext"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/ConfigContext"}}}, "tags": ["extras"]}, "put": {"operationId": "extras_config-contexts_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConfigContext"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConfigContext"}}}, "tags": ["extras"]}, "patch": {"operationId": "extras_config-contexts_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConfigContext"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConfigContext"}}}, "tags": ["extras"]}, "delete": {"operationId": "extras_config-contexts_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["extras"]}, "parameters": []}, "/extras/config-contexts/{id}/": {"get": {"operationId": "extras_config-contexts_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConfigContext"}}}, "tags": ["extras"]}, "put": {"operationId": "extras_config-contexts_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConfigContext"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConfigContext"}}}, "tags": ["extras"]}, "patch": {"operationId": "extras_config-contexts_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableConfigContext"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ConfigContext"}}}, "tags": ["extras"]}, "delete": {"operationId": "extras_config-contexts_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["extras"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this config context.", "required": true, "type": "integer"}]}, "/extras/content-types/": {"get": {"operationId": "extras_content-types_list", "description": "Read-only list of ContentTypes. Limit results to ContentTypes pertinent to NetBox objects.", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "number"}, {"name": "app_label", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "model", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/ContentType"}}}}}}, "tags": ["extras"]}, "parameters": []}, "/extras/content-types/{id}/": {"get": {"operationId": "extras_content-types_read", "description": "Read-only list of ContentTypes. Limit results to ContentTypes pertinent to NetBox objects.", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ContentType"}}}, "tags": ["extras"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this content type.", "required": true, "type": "integer"}]}, "/extras/custom-fields/": {"get": {"operationId": "extras_custom-fields_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "number"}, {"name": "content_types", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "required", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "filter_logic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "weight", "in": "query", "description": "", "required": false, "type": "number"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/CustomField"}}}}}}, "tags": ["extras"]}, "post": {"operationId": "extras_custom-fields_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCustomField"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/CustomField"}}}, "tags": ["extras"]}, "put": {"operationId": "extras_custom-fields_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCustomField"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CustomField"}}}, "tags": ["extras"]}, "patch": {"operationId": "extras_custom-fields_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCustomField"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CustomField"}}}, "tags": ["extras"]}, "delete": {"operationId": "extras_custom-fields_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["extras"]}, "parameters": []}, "/extras/custom-fields/{id}/": {"get": {"operationId": "extras_custom-fields_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CustomField"}}}, "tags": ["extras"]}, "put": {"operationId": "extras_custom-fields_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCustomField"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CustomField"}}}, "tags": ["extras"]}, "patch": {"operationId": "extras_custom-fields_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableCustomField"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CustomField"}}}, "tags": ["extras"]}, "delete": {"operationId": "extras_custom-fields_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["extras"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this custom field.", "required": true, "type": "integer"}]}, "/extras/custom-links/": {"get": {"operationId": "extras_custom-links_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "content_type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_text", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_url", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "weight", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group_name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "new_window", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "content_type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_text__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_text__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_text__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_text__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_text__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_text__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_text__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_text__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_text__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_text__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_url__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_url__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_url__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_url__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_url__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_url__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_url__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_url__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_url__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "link_url__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "weight__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "weight__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "weight__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "weight__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "weight__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group_name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group_name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group_name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group_name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group_name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group_name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group_name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group_name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group_name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "group_name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/CustomLink"}}}}}}, "tags": ["extras"]}, "post": {"operationId": "extras_custom-links_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/CustomLink"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/CustomLink"}}}, "tags": ["extras"]}, "put": {"operationId": "extras_custom-links_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/CustomLink"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CustomLink"}}}, "tags": ["extras"]}, "patch": {"operationId": "extras_custom-links_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/CustomLink"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CustomLink"}}}, "tags": ["extras"]}, "delete": {"operationId": "extras_custom-links_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["extras"]}, "parameters": []}, "/extras/custom-links/{id}/": {"get": {"operationId": "extras_custom-links_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CustomLink"}}}, "tags": ["extras"]}, "put": {"operationId": "extras_custom-links_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/CustomLink"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CustomLink"}}}, "tags": ["extras"]}, "patch": {"operationId": "extras_custom-links_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/CustomLink"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CustomLink"}}}, "tags": ["extras"]}, "delete": {"operationId": "extras_custom-links_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["extras"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this custom link.", "required": true, "type": "integer"}]}, "/extras/export-templates/": {"get": {"operationId": "extras_export-templates_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "content_type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "content_type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/ExportTemplate"}}}}}}, "tags": ["extras"]}, "post": {"operationId": "extras_export-templates_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/ExportTemplate"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/ExportTemplate"}}}, "tags": ["extras"]}, "put": {"operationId": "extras_export-templates_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/ExportTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ExportTemplate"}}}, "tags": ["extras"]}, "patch": {"operationId": "extras_export-templates_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/ExportTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ExportTemplate"}}}, "tags": ["extras"]}, "delete": {"operationId": "extras_export-templates_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["extras"]}, "parameters": []}, "/extras/export-templates/{id}/": {"get": {"operationId": "extras_export-templates_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ExportTemplate"}}}, "tags": ["extras"]}, "put": {"operationId": "extras_export-templates_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/ExportTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ExportTemplate"}}}, "tags": ["extras"]}, "patch": {"operationId": "extras_export-templates_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/ExportTemplate"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ExportTemplate"}}}, "tags": ["extras"]}, "delete": {"operationId": "extras_export-templates_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["extras"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this export template.", "required": true, "type": "integer"}]}, "/extras/image-attachments/": {"get": {"operationId": "extras_image-attachments_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "content_type_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "content_type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "content_type_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "content_type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/ImageAttachment"}}}}}}, "tags": ["extras"]}, "post": {"operationId": "extras_image-attachments_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/ImageAttachment"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/ImageAttachment"}}}, "tags": ["extras"]}, "put": {"operationId": "extras_image-attachments_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/ImageAttachment"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ImageAttachment"}}}, "tags": ["extras"]}, "patch": {"operationId": "extras_image-attachments_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/ImageAttachment"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ImageAttachment"}}}, "tags": ["extras"]}, "delete": {"operationId": "extras_image-attachments_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["extras"]}, "parameters": []}, "/extras/image-attachments/{id}/": {"get": {"operationId": "extras_image-attachments_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ImageAttachment"}}}, "tags": ["extras"]}, "put": {"operationId": "extras_image-attachments_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/ImageAttachment"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ImageAttachment"}}}, "tags": ["extras"]}, "patch": {"operationId": "extras_image-attachments_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/ImageAttachment"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ImageAttachment"}}}, "tags": ["extras"]}, "delete": {"operationId": "extras_image-attachments_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["extras"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this image attachment.", "required": true, "type": "integer"}]}, "/extras/job-results/": {"get": {"operationId": "extras_job-results_list", "description": "Retrieve a list of job results", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "completed", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "status", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "obj_type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "status__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "obj_type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/JobResult"}}}}}}, "tags": ["extras"]}, "parameters": []}, "/extras/job-results/{id}/": {"get": {"operationId": "extras_job-results_read", "description": "Retrieve a list of job results", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/JobResult"}}}, "tags": ["extras"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this job result.", "required": true, "type": "integer"}]}, "/extras/journal-entries/": {"get": {"operationId": "extras_journal-entries_list", "description": "", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "assigned_object_type_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "assigned_object_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "kind", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "assigned_object_type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created_by_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created_by", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "assigned_object_type_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "assigned_object_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "assigned_object_id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "assigned_object_id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "assigned_object_id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "assigned_object_id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "kind__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "assigned_object_type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created_by_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "created_by__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/JournalEntry"}}}}}}, "tags": ["extras"]}, "post": {"operationId": "extras_journal-entries_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableJournalEntry"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/JournalEntry"}}}, "tags": ["extras"]}, "put": {"operationId": "extras_journal-entries_bulk_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableJournalEntry"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/JournalEntry"}}}, "tags": ["extras"]}, "patch": {"operationId": "extras_journal-entries_bulk_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableJournalEntry"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/JournalEntry"}}}, "tags": ["extras"]}, "delete": {"operationId": "extras_journal-entries_bulk_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["extras"]}, "parameters": []}, "/extras/journal-entries/{id}/": {"get": {"operationId": "extras_journal-entries_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/JournalEntry"}}}, "tags": ["extras"]}, "put": {"operationId": "extras_journal-entries_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableJournalEntry"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/JournalEntry"}}}, "tags": ["extras"]}, "patch": {"operationId": "extras_journal-entries_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/WritableJournalEntry"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/JournalEntry"}}}, "tags": ["extras"]}, "delete": {"operationId": "extras_journal-entries_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["extras"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this journal entry.", "required": true, "type": "integer"}]}, "/extras/object-changes/": {"get": {"operationId": "extras_object-changes_list", "description": "Retrieve a list of recent changes.", "parameters": [{"name": "id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_name", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "request_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "action", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "changed_object_type_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "changed_object_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_repr", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "q", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "time", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "changed_object_type", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_id", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_name__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_name__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_name__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_name__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_name__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_name__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_name__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_name__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_name__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_name__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "action__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "changed_object_type_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "changed_object_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "changed_object_id__lte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "changed_object_id__lt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "changed_object_id__gte", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "changed_object_id__gt", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_repr__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_repr__ic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_repr__nic", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_repr__iew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_repr__niew", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_repr__isw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_repr__nisw", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_repr__ie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_repr__nie", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "object_repr__empty", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "changed_object_type__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "user_id__n", "in": "query", "description": "", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/ObjectChange"}}}}}}, "tags": ["extras"]}, "parameters": []}, "/extras/object-changes/{id}/": {"get": {"operationId": "extras_object-changes_read", "description": "Retrieve a list of recent changes.", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ObjectChange"}}}, "tags": ["extras"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this object change.", "required": true, "type": "integer"}]}, "/extras/reports/": {"get": {"operationId": "extras_reports_list", "description": "Compile all reports and their related results (if any). Result data is deferred in the list view.", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["extras"]}, "parameters": []}, "/extras/reports/{id}/": {"get": {"operationId": "extras_reports_read", "description": "Retrieve a single Report identified as \".\".", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["extras"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/extras/reports/{id}/run/": {"post": {"operationId": "extras_reports_run", "description": "Run a Report identified as \".