diff --git a/netbox/client/circuits/circuits_choices_list_parameters.go b/netbox/client/circuits/circuits_choices_list_parameters.go index 0a106b052a3cedb91e2151231b5aa6a7e8ea3476..3f7063d0175cb89a9e42f64ed838aaf291be1a90 100644 --- a/netbox/client/circuits/circuits_choices_list_parameters.go +++ b/netbox/client/circuits/circuits_choices_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits diff --git a/netbox/client/circuits/circuits_choices_list_responses.go b/netbox/client/circuits/circuits_choices_list_responses.go index 893161c435fa6eec7e6b3ffff2f8368ab1c0b6c3..d91621771c8b94f2c20e30863dafbe5ca98aa271 100644 --- a/netbox/client/circuits/circuits_choices_list_responses.go +++ b/netbox/client/circuits/circuits_choices_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -35,7 +36,6 @@ type CircuitsChoicesListReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsChoicesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/circuits/circuits_choices_read_parameters.go b/netbox/client/circuits/circuits_choices_read_parameters.go index 85f99867881efa5126127ccb3198cb09d5d793fd..adeb3c2baccf60c69f6e895daf6b6051c097b18e 100644 --- a/netbox/client/circuits/circuits_choices_read_parameters.go +++ b/netbox/client/circuits/circuits_choices_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits diff --git a/netbox/client/circuits/circuits_choices_read_responses.go b/netbox/client/circuits/circuits_choices_read_responses.go index f991ba848155dc155abcd21726814f5096585ec6..da38aab40da2402be4e8012f6bfa91dd2672f0ee 100644 --- a/netbox/client/circuits/circuits_choices_read_responses.go +++ b/netbox/client/circuits/circuits_choices_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -35,7 +36,6 @@ type CircuitsChoicesReadReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsChoicesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/circuits/circuits_circuit_terminations_create_parameters.go b/netbox/client/circuits/circuits_circuit_terminations_create_parameters.go index e963591b7911f3a8c71ecf64737fe68b9186c062..c467fd5dc0b59bfb93c5225107275b6d0cb1c778 100644 --- a/netbox/client/circuits/circuits_circuit_terminations_create_parameters.go +++ b/netbox/client/circuits/circuits_circuit_terminations_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewCircuitsCircuitTerminationsCreateParams creates a new CircuitsCircuitTerminationsCreateParams object diff --git a/netbox/client/circuits/circuits_circuit_terminations_create_responses.go b/netbox/client/circuits/circuits_circuit_terminations_create_responses.go index 694f783d96b033f007f5ec6c41f09478399ef944..8d4843099d77563a46ca2a7f778e090377373391 100644 --- a/netbox/client/circuits/circuits_circuit_terminations_create_responses.go +++ b/netbox/client/circuits/circuits_circuit_terminations_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitTerminationsCreateReader is a Reader for the CircuitsCircuitTerminationsCreate structure. @@ -38,7 +39,6 @@ type CircuitsCircuitTerminationsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitTerminationsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewCircuitsCircuitTerminationsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsCircuitTerminationsCreateCreated) Error() string { return fmt.Sprintf("[POST /circuits/circuit-terminations/][%d] circuitsCircuitTerminationsCreateCreated %+v", 201, o.Payload) } +func (o *CircuitsCircuitTerminationsCreateCreated) GetPayload() *models.CircuitTermination { + return o.Payload +} + func (o *CircuitsCircuitTerminationsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.CircuitTermination) diff --git a/netbox/client/circuits/circuits_circuit_terminations_delete_parameters.go b/netbox/client/circuits/circuits_circuit_terminations_delete_parameters.go index cf8e2ea2fe51ff0f4bd959988316060fdb709fa8..fd8beb7d14066f4f4557265e39add8abe0b37cf9 100644 --- a/netbox/client/circuits/circuits_circuit_terminations_delete_parameters.go +++ b/netbox/client/circuits/circuits_circuit_terminations_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits diff --git a/netbox/client/circuits/circuits_circuit_terminations_delete_responses.go b/netbox/client/circuits/circuits_circuit_terminations_delete_responses.go index cc3336e599a3abb7929576b7b71d8abda7b02888..d7fee793c8da5f0adea91f506cc54425402aac7c 100644 --- a/netbox/client/circuits/circuits_circuit_terminations_delete_responses.go +++ b/netbox/client/circuits/circuits_circuit_terminations_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -35,7 +36,6 @@ type CircuitsCircuitTerminationsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitTerminationsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewCircuitsCircuitTerminationsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go b/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go index 5c0f6a570e89ab5503416b6602a99214c5a7db42..635334b1e611c7da80df25f0b78a815eb9b12594 100644 --- a/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go +++ b/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits diff --git a/netbox/client/circuits/circuits_circuit_terminations_list_responses.go b/netbox/client/circuits/circuits_circuit_terminations_list_responses.go index cb4ad4d2a6a5157d1a712ff909a5b403204a2be5..68dbee0e084e795beda731bd62f5f1f097057435 100644 --- a/netbox/client/circuits/circuits_circuit_terminations_list_responses.go +++ b/netbox/client/circuits/circuits_circuit_terminations_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitTerminationsListReader is a Reader for the CircuitsCircuitTerminationsList structure. @@ -42,7 +43,6 @@ type CircuitsCircuitTerminationsListReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitTerminationsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsCircuitTerminationsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *CircuitsCircuitTerminationsListOK) Error() string { return fmt.Sprintf("[GET /circuits/circuit-terminations/][%d] circuitsCircuitTerminationsListOK %+v", 200, o.Payload) } +func (o *CircuitsCircuitTerminationsListOK) GetPayload() *CircuitsCircuitTerminationsListOKBody { + return o.Payload +} + func (o *CircuitsCircuitTerminationsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(CircuitsCircuitTerminationsListOKBody) diff --git a/netbox/client/circuits/circuits_circuit_terminations_partial_update_parameters.go b/netbox/client/circuits/circuits_circuit_terminations_partial_update_parameters.go index b7286befea61ec1acce8759cd10d05e7cbe43e4e..9bb69ea0521afb39e95bc12d9dea74168218fa40 100644 --- a/netbox/client/circuits/circuits_circuit_terminations_partial_update_parameters.go +++ b/netbox/client/circuits/circuits_circuit_terminations_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewCircuitsCircuitTerminationsPartialUpdateParams creates a new CircuitsCircuitTerminationsPartialUpdateParams object diff --git a/netbox/client/circuits/circuits_circuit_terminations_partial_update_responses.go b/netbox/client/circuits/circuits_circuit_terminations_partial_update_responses.go index 1e41006d6867843834ba5af21a7dc29e9b096ab5..4148a8d924faf590245ceb6d932d224d0e4000cf 100644 --- a/netbox/client/circuits/circuits_circuit_terminations_partial_update_responses.go +++ b/netbox/client/circuits/circuits_circuit_terminations_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitTerminationsPartialUpdateReader is a Reader for the CircuitsCircuitTerminationsPartialUpdate structure. @@ -38,7 +39,6 @@ type CircuitsCircuitTerminationsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitTerminationsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsCircuitTerminationsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsCircuitTerminationsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /circuits/circuit-terminations/{id}/][%d] circuitsCircuitTerminationsPartialUpdateOK %+v", 200, o.Payload) } +func (o *CircuitsCircuitTerminationsPartialUpdateOK) GetPayload() *models.CircuitTermination { + return o.Payload +} + func (o *CircuitsCircuitTerminationsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.CircuitTermination) diff --git a/netbox/client/circuits/circuits_circuit_terminations_read_parameters.go b/netbox/client/circuits/circuits_circuit_terminations_read_parameters.go index 1b5c0a9ed3479567b4ff952937da7518e23194b9..86ad32f3aea689a4a8fb75d228eb9c75f8de7e59 100644 --- a/netbox/client/circuits/circuits_circuit_terminations_read_parameters.go +++ b/netbox/client/circuits/circuits_circuit_terminations_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits diff --git a/netbox/client/circuits/circuits_circuit_terminations_read_responses.go b/netbox/client/circuits/circuits_circuit_terminations_read_responses.go index 456e1b5ef2293d83605edbc3c775bf9929bf1b42..bb218d1d91f07883f86d200c02b6b4ff9c7b47cb 100644 --- a/netbox/client/circuits/circuits_circuit_terminations_read_responses.go +++ b/netbox/client/circuits/circuits_circuit_terminations_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitTerminationsReadReader is a Reader for the CircuitsCircuitTerminationsRead structure. @@ -38,7 +39,6 @@ type CircuitsCircuitTerminationsReadReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitTerminationsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsCircuitTerminationsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsCircuitTerminationsReadOK) Error() string { return fmt.Sprintf("[GET /circuits/circuit-terminations/{id}/][%d] circuitsCircuitTerminationsReadOK %+v", 200, o.Payload) } +func (o *CircuitsCircuitTerminationsReadOK) GetPayload() *models.CircuitTermination { + return o.Payload +} + func (o *CircuitsCircuitTerminationsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.CircuitTermination) diff --git a/netbox/client/circuits/circuits_circuit_terminations_update_parameters.go b/netbox/client/circuits/circuits_circuit_terminations_update_parameters.go index eb1a6c461773987f785a7a3c5c7f63ff0ac52791..6cbc06aa39c90e4aecee5a2d4747879179293321 100644 --- a/netbox/client/circuits/circuits_circuit_terminations_update_parameters.go +++ b/netbox/client/circuits/circuits_circuit_terminations_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewCircuitsCircuitTerminationsUpdateParams creates a new CircuitsCircuitTerminationsUpdateParams object diff --git a/netbox/client/circuits/circuits_circuit_terminations_update_responses.go b/netbox/client/circuits/circuits_circuit_terminations_update_responses.go index 0ca6cd169def78f261f84ae1df9b31ed2ddebff4..c95344f3bc6bbeff04e3d258636b5e6ee5293383 100644 --- a/netbox/client/circuits/circuits_circuit_terminations_update_responses.go +++ b/netbox/client/circuits/circuits_circuit_terminations_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitTerminationsUpdateReader is a Reader for the CircuitsCircuitTerminationsUpdate structure. @@ -38,7 +39,6 @@ type CircuitsCircuitTerminationsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitTerminationsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsCircuitTerminationsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsCircuitTerminationsUpdateOK) Error() string { return fmt.Sprintf("[PUT /circuits/circuit-terminations/{id}/][%d] circuitsCircuitTerminationsUpdateOK %+v", 200, o.Payload) } +func (o *CircuitsCircuitTerminationsUpdateOK) GetPayload() *models.CircuitTermination { + return o.Payload +} + func (o *CircuitsCircuitTerminationsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.CircuitTermination) diff --git a/netbox/client/circuits/circuits_circuit_types_create_parameters.go b/netbox/client/circuits/circuits_circuit_types_create_parameters.go index a1a20fc49a82d8153ddeea08e3a61aa0c3f7b24f..e2ee6f31c365eb1c9568dd2806396e2c05a61e59 100644 --- a/netbox/client/circuits/circuits_circuit_types_create_parameters.go +++ b/netbox/client/circuits/circuits_circuit_types_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewCircuitsCircuitTypesCreateParams creates a new CircuitsCircuitTypesCreateParams object diff --git a/netbox/client/circuits/circuits_circuit_types_create_responses.go b/netbox/client/circuits/circuits_circuit_types_create_responses.go index 7c03cae5fb0bb2f1f38ad3186bdc0a9e37566589..8d3d04fdb6116915bda08e949bf07e43fa9ae3dd 100644 --- a/netbox/client/circuits/circuits_circuit_types_create_responses.go +++ b/netbox/client/circuits/circuits_circuit_types_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitTypesCreateReader is a Reader for the CircuitsCircuitTypesCreate structure. @@ -38,7 +39,6 @@ type CircuitsCircuitTypesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitTypesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewCircuitsCircuitTypesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsCircuitTypesCreateCreated) Error() string { return fmt.Sprintf("[POST /circuits/circuit-types/][%d] circuitsCircuitTypesCreateCreated %+v", 201, o.Payload) } +func (o *CircuitsCircuitTypesCreateCreated) GetPayload() *models.CircuitType { + return o.Payload +} + func (o *CircuitsCircuitTypesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.CircuitType) diff --git a/netbox/client/circuits/circuits_circuit_types_delete_parameters.go b/netbox/client/circuits/circuits_circuit_types_delete_parameters.go index db7e0ef558e1672815b0fb3b9804552c0e75d230..ecd3379d91bcc36b6f2c22a9e112a6c5eadfa9d6 100644 --- a/netbox/client/circuits/circuits_circuit_types_delete_parameters.go +++ b/netbox/client/circuits/circuits_circuit_types_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits diff --git a/netbox/client/circuits/circuits_circuit_types_delete_responses.go b/netbox/client/circuits/circuits_circuit_types_delete_responses.go index cc10b20f8188368b15dbdc0cae1a42717a4901e8..5031e1d9df13d971beb0760bf2e2ce481b11600f 100644 --- a/netbox/client/circuits/circuits_circuit_types_delete_responses.go +++ b/netbox/client/circuits/circuits_circuit_types_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -35,7 +36,6 @@ type CircuitsCircuitTypesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitTypesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewCircuitsCircuitTypesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/circuits/circuits_circuit_types_list_parameters.go b/netbox/client/circuits/circuits_circuit_types_list_parameters.go index aea2e67063311a819aa661920ce9949045c0a773..324f1e0f3e38672f920836f8c89d902093f13c4e 100644 --- a/netbox/client/circuits/circuits_circuit_types_list_parameters.go +++ b/netbox/client/circuits/circuits_circuit_types_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits diff --git a/netbox/client/circuits/circuits_circuit_types_list_responses.go b/netbox/client/circuits/circuits_circuit_types_list_responses.go index 18ed6534892adeefdecbdddc79f0a799cb1d1b9f..fefa59068f7820fc9256c2011b676f05f44f7d5d 100644 --- a/netbox/client/circuits/circuits_circuit_types_list_responses.go +++ b/netbox/client/circuits/circuits_circuit_types_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitTypesListReader is a Reader for the CircuitsCircuitTypesList structure. @@ -42,7 +43,6 @@ type CircuitsCircuitTypesListReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitTypesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsCircuitTypesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *CircuitsCircuitTypesListOK) Error() string { return fmt.Sprintf("[GET /circuits/circuit-types/][%d] circuitsCircuitTypesListOK %+v", 200, o.Payload) } +func (o *CircuitsCircuitTypesListOK) GetPayload() *CircuitsCircuitTypesListOKBody { + return o.Payload +} + func (o *CircuitsCircuitTypesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(CircuitsCircuitTypesListOKBody) diff --git a/netbox/client/circuits/circuits_circuit_types_partial_update_parameters.go b/netbox/client/circuits/circuits_circuit_types_partial_update_parameters.go index 2674616bc8ad1323564c1c66581e1e3d0079f1f6..16da002e16459b74230a4779256a6d20937b203d 100644 --- a/netbox/client/circuits/circuits_circuit_types_partial_update_parameters.go +++ b/netbox/client/circuits/circuits_circuit_types_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewCircuitsCircuitTypesPartialUpdateParams creates a new CircuitsCircuitTypesPartialUpdateParams object diff --git a/netbox/client/circuits/circuits_circuit_types_partial_update_responses.go b/netbox/client/circuits/circuits_circuit_types_partial_update_responses.go index 105047942f5f181d977aade5b475f1b7c1cb937c..1f9a23b43b4c6a50f79e843bb34c39ce7ebfc933 100644 --- a/netbox/client/circuits/circuits_circuit_types_partial_update_responses.go +++ b/netbox/client/circuits/circuits_circuit_types_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitTypesPartialUpdateReader is a Reader for the CircuitsCircuitTypesPartialUpdate structure. @@ -38,7 +39,6 @@ type CircuitsCircuitTypesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitTypesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsCircuitTypesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsCircuitTypesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /circuits/circuit-types/{id}/][%d] circuitsCircuitTypesPartialUpdateOK %+v", 200, o.Payload) } +func (o *CircuitsCircuitTypesPartialUpdateOK) GetPayload() *models.CircuitType { + return o.Payload +} + func (o *CircuitsCircuitTypesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.CircuitType) diff --git a/netbox/client/circuits/circuits_circuit_types_read_parameters.go b/netbox/client/circuits/circuits_circuit_types_read_parameters.go index e8c02da9b1adc83d4b7624f47c24bc13ee2ff62e..d19e7e0333a6b9ca8f1173b8704b826641d51e69 100644 --- a/netbox/client/circuits/circuits_circuit_types_read_parameters.go +++ b/netbox/client/circuits/circuits_circuit_types_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits diff --git a/netbox/client/circuits/circuits_circuit_types_read_responses.go b/netbox/client/circuits/circuits_circuit_types_read_responses.go index 1c44a1131280fe97b25f8adacddb367f0722bb9d..9ac53ebf88468f3e8b2885ea3bdea805f275bde0 100644 --- a/netbox/client/circuits/circuits_circuit_types_read_responses.go +++ b/netbox/client/circuits/circuits_circuit_types_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitTypesReadReader is a Reader for the CircuitsCircuitTypesRead structure. @@ -38,7 +39,6 @@ type CircuitsCircuitTypesReadReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitTypesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsCircuitTypesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsCircuitTypesReadOK) Error() string { return fmt.Sprintf("[GET /circuits/circuit-types/{id}/][%d] circuitsCircuitTypesReadOK %+v", 200, o.Payload) } +func (o *CircuitsCircuitTypesReadOK) GetPayload() *models.CircuitType { + return o.Payload +} + func (o *CircuitsCircuitTypesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.CircuitType) diff --git a/netbox/client/circuits/circuits_circuit_types_update_parameters.go b/netbox/client/circuits/circuits_circuit_types_update_parameters.go index 623d1358005b0fdf73fbcab7d2da1d54af814785..97bcad9d2fc60f8a67ab6e9418da4562621448b6 100644 --- a/netbox/client/circuits/circuits_circuit_types_update_parameters.go +++ b/netbox/client/circuits/circuits_circuit_types_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewCircuitsCircuitTypesUpdateParams creates a new CircuitsCircuitTypesUpdateParams object diff --git a/netbox/client/circuits/circuits_circuit_types_update_responses.go b/netbox/client/circuits/circuits_circuit_types_update_responses.go index 2581441df2447f6d831c7a1e836cd037da8584d9..b38847ba8d71a5d773e9e901c8b2e622c951bf07 100644 --- a/netbox/client/circuits/circuits_circuit_types_update_responses.go +++ b/netbox/client/circuits/circuits_circuit_types_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitTypesUpdateReader is a Reader for the CircuitsCircuitTypesUpdate structure. @@ -38,7 +39,6 @@ type CircuitsCircuitTypesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitTypesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsCircuitTypesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsCircuitTypesUpdateOK) Error() string { return fmt.Sprintf("[PUT /circuits/circuit-types/{id}/][%d] circuitsCircuitTypesUpdateOK %+v", 200, o.Payload) } +func (o *CircuitsCircuitTypesUpdateOK) GetPayload() *models.CircuitType { + return o.Payload +} + func (o *CircuitsCircuitTypesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.CircuitType) diff --git a/netbox/client/circuits/circuits_circuits_create_parameters.go b/netbox/client/circuits/circuits_circuits_create_parameters.go index 4ec095ecb17a073a5b21d7d320de7b17460b5eb0..f590af248549c0430840e51066a90f09007255b9 100644 --- a/netbox/client/circuits/circuits_circuits_create_parameters.go +++ b/netbox/client/circuits/circuits_circuits_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewCircuitsCircuitsCreateParams creates a new CircuitsCircuitsCreateParams object diff --git a/netbox/client/circuits/circuits_circuits_create_responses.go b/netbox/client/circuits/circuits_circuits_create_responses.go index a3434c91b9eafcbe8fa42364e0a8a185cc5763ee..4c0e27cb5a91d49e4e169b88897bd1632e2d2b05 100644 --- a/netbox/client/circuits/circuits_circuits_create_responses.go +++ b/netbox/client/circuits/circuits_circuits_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitsCreateReader is a Reader for the CircuitsCircuitsCreate structure. @@ -38,7 +39,6 @@ type CircuitsCircuitsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewCircuitsCircuitsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsCircuitsCreateCreated) Error() string { return fmt.Sprintf("[POST /circuits/circuits/][%d] circuitsCircuitsCreateCreated %+v", 201, o.Payload) } +func (o *CircuitsCircuitsCreateCreated) GetPayload() *models.Circuit { + return o.Payload +} + func (o *CircuitsCircuitsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Circuit) diff --git a/netbox/client/circuits/circuits_circuits_delete_parameters.go b/netbox/client/circuits/circuits_circuits_delete_parameters.go index 1c4a7b652fdca29506c06ea212cabd5b27ae4688..013faf66f8d11591c468f71d4f86810657acb7ef 100644 --- a/netbox/client/circuits/circuits_circuits_delete_parameters.go +++ b/netbox/client/circuits/circuits_circuits_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits diff --git a/netbox/client/circuits/circuits_circuits_delete_responses.go b/netbox/client/circuits/circuits_circuits_delete_responses.go index 2ddec44db0b7922d7aaea061479999f9eb8d9647..294fd8421e75a5a5407edcd61d47462db7ec748d 100644 --- a/netbox/client/circuits/circuits_circuits_delete_responses.go +++ b/netbox/client/circuits/circuits_circuits_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -35,7 +36,6 @@ type CircuitsCircuitsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewCircuitsCircuitsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/circuits/circuits_circuits_list_parameters.go b/netbox/client/circuits/circuits_circuits_list_parameters.go index 6d3b86fb8261a612f4a5e2b0769702078e29b067..fede60aade5c8f02899a0248d302b8164b347f8d 100644 --- a/netbox/client/circuits/circuits_circuits_list_parameters.go +++ b/netbox/client/circuits/circuits_circuits_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -80,6 +81,12 @@ type CircuitsCircuitsListParams struct { Cid *string /*CommitRate*/ CommitRate *string + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*IDIn Multiple values may be separated by commas. @@ -87,6 +94,12 @@ type CircuitsCircuitsListParams struct { IDIn *string /*InstallDate*/ InstallDate *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. @@ -103,6 +116,10 @@ type CircuitsCircuitsListParams struct { ProviderID *string /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string /*Site*/ Site *string /*SiteID*/ @@ -184,6 +201,39 @@ func (o *CircuitsCircuitsListParams) SetCommitRate(commitRate *string) { o.CommitRate = commitRate } +// WithCreated adds the created to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithCreated(created *string) *CircuitsCircuitsListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithCreatedGte(createdGte *string) *CircuitsCircuitsListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithCreatedLte(createdLte *string) *CircuitsCircuitsListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + // WithIDIn adds the iDIn to the circuits circuits list params func (o *CircuitsCircuitsListParams) WithIDIn(iDIn *string) *CircuitsCircuitsListParams { o.SetIDIn(iDIn) @@ -206,6 +256,39 @@ func (o *CircuitsCircuitsListParams) SetInstallDate(installDate *string) { o.InstallDate = installDate } +// WithLastUpdated adds the lastUpdated to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithLastUpdated(lastUpdated *string) *CircuitsCircuitsListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *CircuitsCircuitsListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *CircuitsCircuitsListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the circuits circuits list params func (o *CircuitsCircuitsListParams) WithLimit(limit *int64) *CircuitsCircuitsListParams { o.SetLimit(limit) @@ -261,6 +344,28 @@ func (o *CircuitsCircuitsListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithRegion(region *string) *CircuitsCircuitsListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithRegionID(regionID *string) *CircuitsCircuitsListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + // WithSite adds the site to the circuits circuits list params func (o *CircuitsCircuitsListParams) WithSite(site *string) *CircuitsCircuitsListParams { o.SetSite(site) @@ -411,6 +516,54 @@ func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg } + 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.IDIn != nil { // query param id__in @@ -443,6 +596,54 @@ func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg } + 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 @@ -523,6 +724,38 @@ func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + if o.Site != nil { // query param site diff --git a/netbox/client/circuits/circuits_circuits_list_responses.go b/netbox/client/circuits/circuits_circuits_list_responses.go index 65573215fd7102c6cccd5ed4ec084f8f4a4ddddc..6792c6d3cd08cd88c79e7082a823cafedfce1edf 100644 --- a/netbox/client/circuits/circuits_circuits_list_responses.go +++ b/netbox/client/circuits/circuits_circuits_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitsListReader is a Reader for the CircuitsCircuitsList structure. @@ -42,7 +43,6 @@ type CircuitsCircuitsListReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsCircuitsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *CircuitsCircuitsListOK) Error() string { return fmt.Sprintf("[GET /circuits/circuits/][%d] circuitsCircuitsListOK %+v", 200, o.Payload) } +func (o *CircuitsCircuitsListOK) GetPayload() *CircuitsCircuitsListOKBody { + return o.Payload +} + func (o *CircuitsCircuitsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(CircuitsCircuitsListOKBody) diff --git a/netbox/client/circuits/circuits_circuits_partial_update_parameters.go b/netbox/client/circuits/circuits_circuits_partial_update_parameters.go index b33b2b69f67abd9e89150179da5d827747bd41e3..604c1bae5e6f983482f90f57432db16e77140011 100644 --- a/netbox/client/circuits/circuits_circuits_partial_update_parameters.go +++ b/netbox/client/circuits/circuits_circuits_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewCircuitsCircuitsPartialUpdateParams creates a new CircuitsCircuitsPartialUpdateParams object diff --git a/netbox/client/circuits/circuits_circuits_partial_update_responses.go b/netbox/client/circuits/circuits_circuits_partial_update_responses.go index 0f3361e9804da73db6ac2d88d2257badac62487c..9fa3d634468dbf4cb916dcac9be8a5ae60ba9100 100644 --- a/netbox/client/circuits/circuits_circuits_partial_update_responses.go +++ b/netbox/client/circuits/circuits_circuits_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitsPartialUpdateReader is a Reader for the CircuitsCircuitsPartialUpdate structure. @@ -38,7 +39,6 @@ type CircuitsCircuitsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsCircuitsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsCircuitsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /circuits/circuits/{id}/][%d] circuitsCircuitsPartialUpdateOK %+v", 200, o.Payload) } +func (o *CircuitsCircuitsPartialUpdateOK) GetPayload() *models.Circuit { + return o.Payload +} + func (o *CircuitsCircuitsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Circuit) diff --git a/netbox/client/circuits/circuits_circuits_read_parameters.go b/netbox/client/circuits/circuits_circuits_read_parameters.go index da68e152d8bcaeff1a7ff7c8bfe8ab381e910b4b..440b48a662877f912e6ed0d6b5ac16e78d877281 100644 --- a/netbox/client/circuits/circuits_circuits_read_parameters.go +++ b/netbox/client/circuits/circuits_circuits_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits diff --git a/netbox/client/circuits/circuits_circuits_read_responses.go b/netbox/client/circuits/circuits_circuits_read_responses.go index 426e25e69915e212d86b6e016e1ddbaeb184345c..e3a41c0ebb97bdc32eb47b5f9e9fef7d1a46e77f 100644 --- a/netbox/client/circuits/circuits_circuits_read_responses.go +++ b/netbox/client/circuits/circuits_circuits_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitsReadReader is a Reader for the CircuitsCircuitsRead structure. @@ -38,7 +39,6 @@ type CircuitsCircuitsReadReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsCircuitsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsCircuitsReadOK) Error() string { return fmt.Sprintf("[GET /circuits/circuits/{id}/][%d] circuitsCircuitsReadOK %+v", 200, o.Payload) } +func (o *CircuitsCircuitsReadOK) GetPayload() *models.Circuit { + return o.Payload +} + func (o *CircuitsCircuitsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Circuit) diff --git a/netbox/client/circuits/circuits_circuits_update_parameters.go b/netbox/client/circuits/circuits_circuits_update_parameters.go index 93fabdd5a5c685908d0609dee7f5f50d27df72a8..7fec89e2448888eee4b7e3f87de1b5b552a511cf 100644 --- a/netbox/client/circuits/circuits_circuits_update_parameters.go +++ b/netbox/client/circuits/circuits_circuits_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewCircuitsCircuitsUpdateParams creates a new CircuitsCircuitsUpdateParams object diff --git a/netbox/client/circuits/circuits_circuits_update_responses.go b/netbox/client/circuits/circuits_circuits_update_responses.go index 6627ad0cf9c3df831d2b4303f656738a7f6a227f..fe778bb658f8a3cba4f49e4e29bb116bccc3b8af 100644 --- a/netbox/client/circuits/circuits_circuits_update_responses.go +++ b/netbox/client/circuits/circuits_circuits_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsCircuitsUpdateReader is a Reader for the CircuitsCircuitsUpdate structure. @@ -38,7 +39,6 @@ type CircuitsCircuitsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsCircuitsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsCircuitsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsCircuitsUpdateOK) Error() string { return fmt.Sprintf("[PUT /circuits/circuits/{id}/][%d] circuitsCircuitsUpdateOK %+v", 200, o.Payload) } +func (o *CircuitsCircuitsUpdateOK) GetPayload() *models.Circuit { + return o.Payload +} + func (o *CircuitsCircuitsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Circuit) diff --git a/netbox/client/circuits/circuits_client.go b/netbox/client/circuits/circuits_client.go index 2d5f59247f544839854fcbd763f56478bf0f9009..a954e14039c3eca94ab2017156b19e0dfa0e549b 100644 --- a/netbox/client/circuits/circuits_client.go +++ b/netbox/client/circuits/circuits_client.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -20,13 +21,14 @@ package circuits // Editing this file might prove futile when you re-run the swagger generate command import ( - "github.com/go-openapi/runtime" + "fmt" - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" ) // New creates a new circuits API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } @@ -38,8 +40,67 @@ type Client struct { formats strfmt.Registry } +// ClientService is the interface for Client methods +type ClientService interface { + CircuitsChoicesList(params *CircuitsChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsChoicesListOK, error) + + CircuitsChoicesRead(params *CircuitsChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsChoicesReadOK, error) + + CircuitsCircuitTerminationsCreate(params *CircuitsCircuitTerminationsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsCreateCreated, error) + + CircuitsCircuitTerminationsDelete(params *CircuitsCircuitTerminationsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsDeleteNoContent, error) + + CircuitsCircuitTerminationsList(params *CircuitsCircuitTerminationsListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsListOK, error) + + CircuitsCircuitTerminationsPartialUpdate(params *CircuitsCircuitTerminationsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsPartialUpdateOK, error) + + CircuitsCircuitTerminationsRead(params *CircuitsCircuitTerminationsReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsReadOK, error) + + CircuitsCircuitTerminationsUpdate(params *CircuitsCircuitTerminationsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsUpdateOK, error) + + CircuitsCircuitTypesCreate(params *CircuitsCircuitTypesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesCreateCreated, error) + + CircuitsCircuitTypesDelete(params *CircuitsCircuitTypesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesDeleteNoContent, error) + + CircuitsCircuitTypesList(params *CircuitsCircuitTypesListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesListOK, error) + + CircuitsCircuitTypesPartialUpdate(params *CircuitsCircuitTypesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesPartialUpdateOK, error) + + CircuitsCircuitTypesRead(params *CircuitsCircuitTypesReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesReadOK, error) + + CircuitsCircuitTypesUpdate(params *CircuitsCircuitTypesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesUpdateOK, error) + + CircuitsCircuitsCreate(params *CircuitsCircuitsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsCreateCreated, error) + + CircuitsCircuitsDelete(params *CircuitsCircuitsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsDeleteNoContent, error) + + CircuitsCircuitsList(params *CircuitsCircuitsListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsListOK, error) + + CircuitsCircuitsPartialUpdate(params *CircuitsCircuitsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsPartialUpdateOK, error) + + CircuitsCircuitsRead(params *CircuitsCircuitsReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsReadOK, error) + + CircuitsCircuitsUpdate(params *CircuitsCircuitsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsUpdateOK, error) + + CircuitsProvidersCreate(params *CircuitsProvidersCreateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersCreateCreated, error) + + CircuitsProvidersDelete(params *CircuitsProvidersDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersDeleteNoContent, error) + + CircuitsProvidersGraphs(params *CircuitsProvidersGraphsParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersGraphsOK, error) + + CircuitsProvidersList(params *CircuitsProvidersListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersListOK, error) + + CircuitsProvidersPartialUpdate(params *CircuitsProvidersPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersPartialUpdateOK, error) + + CircuitsProvidersRead(params *CircuitsProvidersReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersReadOK, error) + + CircuitsProvidersUpdate(params *CircuitsProvidersUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersUpdateOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* -CircuitsChoicesList circuits choices list API + CircuitsChoicesList circuits choices list API */ func (a *Client) CircuitsChoicesList(params *CircuitsChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsChoicesListOK, error) { // TODO: Validate the params before sending @@ -53,7 +114,7 @@ func (a *Client) CircuitsChoicesList(params *CircuitsChoicesListParams, authInfo PathPattern: "/circuits/_choices/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsChoicesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -63,12 +124,18 @@ func (a *Client) CircuitsChoicesList(params *CircuitsChoicesListParams, authInfo if err != nil { return nil, err } - return result.(*CircuitsChoicesListOK), nil - + success, ok := result.(*CircuitsChoicesListOK) + 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 circuits__choices_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsChoicesRead circuits choices read API + CircuitsChoicesRead circuits choices read API */ func (a *Client) CircuitsChoicesRead(params *CircuitsChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsChoicesReadOK, error) { // TODO: Validate the params before sending @@ -82,7 +149,7 @@ func (a *Client) CircuitsChoicesRead(params *CircuitsChoicesReadParams, authInfo PathPattern: "/circuits/_choices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsChoicesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -92,12 +159,18 @@ func (a *Client) CircuitsChoicesRead(params *CircuitsChoicesReadParams, authInfo if err != nil { return nil, err } - return result.(*CircuitsChoicesReadOK), nil - + success, ok := result.(*CircuitsChoicesReadOK) + 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 circuits__choices_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitTerminationsCreate circuits circuit terminations create API + CircuitsCircuitTerminationsCreate circuits circuit terminations create API */ func (a *Client) CircuitsCircuitTerminationsCreate(params *CircuitsCircuitTerminationsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsCreateCreated, error) { // TODO: Validate the params before sending @@ -111,7 +184,7 @@ func (a *Client) CircuitsCircuitTerminationsCreate(params *CircuitsCircuitTermin PathPattern: "/circuits/circuit-terminations/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -121,12 +194,18 @@ func (a *Client) CircuitsCircuitTerminationsCreate(params *CircuitsCircuitTermin if err != nil { return nil, err } - return result.(*CircuitsCircuitTerminationsCreateCreated), nil - + success, ok := result.(*CircuitsCircuitTerminationsCreateCreated) + 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 circuits_circuit-terminations_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitTerminationsDelete circuits circuit terminations delete API + CircuitsCircuitTerminationsDelete circuits circuit terminations delete API */ func (a *Client) CircuitsCircuitTerminationsDelete(params *CircuitsCircuitTerminationsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -140,7 +219,7 @@ func (a *Client) CircuitsCircuitTerminationsDelete(params *CircuitsCircuitTermin PathPattern: "/circuits/circuit-terminations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -150,12 +229,18 @@ func (a *Client) CircuitsCircuitTerminationsDelete(params *CircuitsCircuitTermin if err != nil { return nil, err } - return result.(*CircuitsCircuitTerminationsDeleteNoContent), nil - + success, ok := result.(*CircuitsCircuitTerminationsDeleteNoContent) + 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 circuits_circuit-terminations_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitTerminationsList Call to super to allow for caching + CircuitsCircuitTerminationsList Call to super to allow for caching */ func (a *Client) CircuitsCircuitTerminationsList(params *CircuitsCircuitTerminationsListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsListOK, error) { // TODO: Validate the params before sending @@ -169,7 +254,7 @@ func (a *Client) CircuitsCircuitTerminationsList(params *CircuitsCircuitTerminat PathPattern: "/circuits/circuit-terminations/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -179,12 +264,18 @@ func (a *Client) CircuitsCircuitTerminationsList(params *CircuitsCircuitTerminat if err != nil { return nil, err } - return result.(*CircuitsCircuitTerminationsListOK), nil - + success, ok := result.(*CircuitsCircuitTerminationsListOK) + 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 circuits_circuit-terminations_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitTerminationsPartialUpdate circuits circuit terminations partial update API + CircuitsCircuitTerminationsPartialUpdate circuits circuit terminations partial update API */ func (a *Client) CircuitsCircuitTerminationsPartialUpdate(params *CircuitsCircuitTerminationsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -198,7 +289,7 @@ func (a *Client) CircuitsCircuitTerminationsPartialUpdate(params *CircuitsCircui PathPattern: "/circuits/circuit-terminations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -208,12 +299,18 @@ func (a *Client) CircuitsCircuitTerminationsPartialUpdate(params *CircuitsCircui if err != nil { return nil, err } - return result.(*CircuitsCircuitTerminationsPartialUpdateOK), nil - + success, ok := result.(*CircuitsCircuitTerminationsPartialUpdateOK) + 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 circuits_circuit-terminations_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitTerminationsRead Call to super to allow for caching + CircuitsCircuitTerminationsRead Call to super to allow for caching */ func (a *Client) CircuitsCircuitTerminationsRead(params *CircuitsCircuitTerminationsReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsReadOK, error) { // TODO: Validate the params before sending @@ -227,7 +324,7 @@ func (a *Client) CircuitsCircuitTerminationsRead(params *CircuitsCircuitTerminat PathPattern: "/circuits/circuit-terminations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -237,12 +334,18 @@ func (a *Client) CircuitsCircuitTerminationsRead(params *CircuitsCircuitTerminat if err != nil { return nil, err } - return result.(*CircuitsCircuitTerminationsReadOK), nil - + success, ok := result.(*CircuitsCircuitTerminationsReadOK) + 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 circuits_circuit-terminations_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitTerminationsUpdate circuits circuit terminations update API + CircuitsCircuitTerminationsUpdate circuits circuit terminations update API */ func (a *Client) CircuitsCircuitTerminationsUpdate(params *CircuitsCircuitTerminationsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsUpdateOK, error) { // TODO: Validate the params before sending @@ -256,7 +359,7 @@ func (a *Client) CircuitsCircuitTerminationsUpdate(params *CircuitsCircuitTermin PathPattern: "/circuits/circuit-terminations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -266,12 +369,18 @@ func (a *Client) CircuitsCircuitTerminationsUpdate(params *CircuitsCircuitTermin if err != nil { return nil, err } - return result.(*CircuitsCircuitTerminationsUpdateOK), nil - + success, ok := result.(*CircuitsCircuitTerminationsUpdateOK) + 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 circuits_circuit-terminations_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitTypesCreate circuits circuit types create API + CircuitsCircuitTypesCreate circuits circuit types create API */ func (a *Client) CircuitsCircuitTypesCreate(params *CircuitsCircuitTypesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesCreateCreated, error) { // TODO: Validate the params before sending @@ -285,7 +394,7 @@ func (a *Client) CircuitsCircuitTypesCreate(params *CircuitsCircuitTypesCreatePa PathPattern: "/circuits/circuit-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -295,12 +404,18 @@ func (a *Client) CircuitsCircuitTypesCreate(params *CircuitsCircuitTypesCreatePa if err != nil { return nil, err } - return result.(*CircuitsCircuitTypesCreateCreated), nil - + success, ok := result.(*CircuitsCircuitTypesCreateCreated) + 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 circuits_circuit-types_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitTypesDelete circuits circuit types delete API + CircuitsCircuitTypesDelete circuits circuit types delete API */ func (a *Client) CircuitsCircuitTypesDelete(params *CircuitsCircuitTypesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -314,7 +429,7 @@ func (a *Client) CircuitsCircuitTypesDelete(params *CircuitsCircuitTypesDeletePa PathPattern: "/circuits/circuit-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -324,12 +439,18 @@ func (a *Client) CircuitsCircuitTypesDelete(params *CircuitsCircuitTypesDeletePa if err != nil { return nil, err } - return result.(*CircuitsCircuitTypesDeleteNoContent), nil - + success, ok := result.(*CircuitsCircuitTypesDeleteNoContent) + 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 circuits_circuit-types_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitTypesList Call to super to allow for caching + CircuitsCircuitTypesList Call to super to allow for caching */ func (a *Client) CircuitsCircuitTypesList(params *CircuitsCircuitTypesListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesListOK, error) { // TODO: Validate the params before sending @@ -343,7 +464,7 @@ func (a *Client) CircuitsCircuitTypesList(params *CircuitsCircuitTypesListParams PathPattern: "/circuits/circuit-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -353,12 +474,18 @@ func (a *Client) CircuitsCircuitTypesList(params *CircuitsCircuitTypesListParams if err != nil { return nil, err } - return result.(*CircuitsCircuitTypesListOK), nil - + success, ok := result.(*CircuitsCircuitTypesListOK) + 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 circuits_circuit-types_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitTypesPartialUpdate circuits circuit types partial update API + CircuitsCircuitTypesPartialUpdate circuits circuit types partial update API */ func (a *Client) CircuitsCircuitTypesPartialUpdate(params *CircuitsCircuitTypesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -372,7 +499,7 @@ func (a *Client) CircuitsCircuitTypesPartialUpdate(params *CircuitsCircuitTypesP PathPattern: "/circuits/circuit-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -382,12 +509,18 @@ func (a *Client) CircuitsCircuitTypesPartialUpdate(params *CircuitsCircuitTypesP if err != nil { return nil, err } - return result.(*CircuitsCircuitTypesPartialUpdateOK), nil - + success, ok := result.(*CircuitsCircuitTypesPartialUpdateOK) + 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 circuits_circuit-types_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitTypesRead Call to super to allow for caching + CircuitsCircuitTypesRead Call to super to allow for caching */ func (a *Client) CircuitsCircuitTypesRead(params *CircuitsCircuitTypesReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesReadOK, error) { // TODO: Validate the params before sending @@ -401,7 +534,7 @@ func (a *Client) CircuitsCircuitTypesRead(params *CircuitsCircuitTypesReadParams PathPattern: "/circuits/circuit-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -411,12 +544,18 @@ func (a *Client) CircuitsCircuitTypesRead(params *CircuitsCircuitTypesReadParams if err != nil { return nil, err } - return result.(*CircuitsCircuitTypesReadOK), nil - + success, ok := result.(*CircuitsCircuitTypesReadOK) + 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 circuits_circuit-types_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitTypesUpdate circuits circuit types update API + CircuitsCircuitTypesUpdate circuits circuit types update API */ func (a *Client) CircuitsCircuitTypesUpdate(params *CircuitsCircuitTypesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesUpdateOK, error) { // TODO: Validate the params before sending @@ -430,7 +569,7 @@ func (a *Client) CircuitsCircuitTypesUpdate(params *CircuitsCircuitTypesUpdatePa PathPattern: "/circuits/circuit-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -440,12 +579,18 @@ func (a *Client) CircuitsCircuitTypesUpdate(params *CircuitsCircuitTypesUpdatePa if err != nil { return nil, err } - return result.(*CircuitsCircuitTypesUpdateOK), nil - + success, ok := result.(*CircuitsCircuitTypesUpdateOK) + 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 circuits_circuit-types_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitsCreate circuits circuits create API + CircuitsCircuitsCreate circuits circuits create API */ func (a *Client) CircuitsCircuitsCreate(params *CircuitsCircuitsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsCreateCreated, error) { // TODO: Validate the params before sending @@ -459,7 +604,7 @@ func (a *Client) CircuitsCircuitsCreate(params *CircuitsCircuitsCreateParams, au PathPattern: "/circuits/circuits/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -469,12 +614,18 @@ func (a *Client) CircuitsCircuitsCreate(params *CircuitsCircuitsCreateParams, au if err != nil { return nil, err } - return result.(*CircuitsCircuitsCreateCreated), nil - + success, ok := result.(*CircuitsCircuitsCreateCreated) + 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 circuits_circuits_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitsDelete circuits circuits delete API + CircuitsCircuitsDelete circuits circuits delete API */ func (a *Client) CircuitsCircuitsDelete(params *CircuitsCircuitsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -488,7 +639,7 @@ func (a *Client) CircuitsCircuitsDelete(params *CircuitsCircuitsDeleteParams, au PathPattern: "/circuits/circuits/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -498,12 +649,18 @@ func (a *Client) CircuitsCircuitsDelete(params *CircuitsCircuitsDeleteParams, au if err != nil { return nil, err } - return result.(*CircuitsCircuitsDeleteNoContent), nil - + success, ok := result.(*CircuitsCircuitsDeleteNoContent) + 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 circuits_circuits_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitsList Call to super to allow for caching + CircuitsCircuitsList Call to super to allow for caching */ func (a *Client) CircuitsCircuitsList(params *CircuitsCircuitsListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsListOK, error) { // TODO: Validate the params before sending @@ -517,7 +674,7 @@ func (a *Client) CircuitsCircuitsList(params *CircuitsCircuitsListParams, authIn PathPattern: "/circuits/circuits/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -527,12 +684,18 @@ func (a *Client) CircuitsCircuitsList(params *CircuitsCircuitsListParams, authIn if err != nil { return nil, err } - return result.(*CircuitsCircuitsListOK), nil - + success, ok := result.(*CircuitsCircuitsListOK) + 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 circuits_circuits_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitsPartialUpdate circuits circuits partial update API + CircuitsCircuitsPartialUpdate circuits circuits partial update API */ func (a *Client) CircuitsCircuitsPartialUpdate(params *CircuitsCircuitsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -546,7 +709,7 @@ func (a *Client) CircuitsCircuitsPartialUpdate(params *CircuitsCircuitsPartialUp PathPattern: "/circuits/circuits/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -556,12 +719,18 @@ func (a *Client) CircuitsCircuitsPartialUpdate(params *CircuitsCircuitsPartialUp if err != nil { return nil, err } - return result.(*CircuitsCircuitsPartialUpdateOK), nil - + success, ok := result.(*CircuitsCircuitsPartialUpdateOK) + 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 circuits_circuits_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitsRead Call to super to allow for caching + CircuitsCircuitsRead Call to super to allow for caching */ func (a *Client) CircuitsCircuitsRead(params *CircuitsCircuitsReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsReadOK, error) { // TODO: Validate the params before sending @@ -575,7 +744,7 @@ func (a *Client) CircuitsCircuitsRead(params *CircuitsCircuitsReadParams, authIn PathPattern: "/circuits/circuits/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -585,12 +754,18 @@ func (a *Client) CircuitsCircuitsRead(params *CircuitsCircuitsReadParams, authIn if err != nil { return nil, err } - return result.(*CircuitsCircuitsReadOK), nil - + success, ok := result.(*CircuitsCircuitsReadOK) + 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 circuits_circuits_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsCircuitsUpdate circuits circuits update API + CircuitsCircuitsUpdate circuits circuits update API */ func (a *Client) CircuitsCircuitsUpdate(params *CircuitsCircuitsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsUpdateOK, error) { // TODO: Validate the params before sending @@ -604,7 +779,7 @@ func (a *Client) CircuitsCircuitsUpdate(params *CircuitsCircuitsUpdateParams, au PathPattern: "/circuits/circuits/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -614,12 +789,18 @@ func (a *Client) CircuitsCircuitsUpdate(params *CircuitsCircuitsUpdateParams, au if err != nil { return nil, err } - return result.(*CircuitsCircuitsUpdateOK), nil - + success, ok := result.(*CircuitsCircuitsUpdateOK) + 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 circuits_circuits_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsProvidersCreate circuits providers create API + CircuitsProvidersCreate circuits providers create API */ func (a *Client) CircuitsProvidersCreate(params *CircuitsProvidersCreateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersCreateCreated, error) { // TODO: Validate the params before sending @@ -633,7 +814,7 @@ func (a *Client) CircuitsProvidersCreate(params *CircuitsProvidersCreateParams, PathPattern: "/circuits/providers/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -643,12 +824,18 @@ func (a *Client) CircuitsProvidersCreate(params *CircuitsProvidersCreateParams, if err != nil { return nil, err } - return result.(*CircuitsProvidersCreateCreated), nil - + success, ok := result.(*CircuitsProvidersCreateCreated) + 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 circuits_providers_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsProvidersDelete circuits providers delete API + CircuitsProvidersDelete circuits providers delete API */ func (a *Client) CircuitsProvidersDelete(params *CircuitsProvidersDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersDeleteNoContent, error) { // TODO: Validate the params before sending @@ -662,7 +849,7 @@ func (a *Client) CircuitsProvidersDelete(params *CircuitsProvidersDeleteParams, PathPattern: "/circuits/providers/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -672,12 +859,18 @@ func (a *Client) CircuitsProvidersDelete(params *CircuitsProvidersDeleteParams, if err != nil { return nil, err } - return result.(*CircuitsProvidersDeleteNoContent), nil - + success, ok := result.(*CircuitsProvidersDeleteNoContent) + 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 circuits_providers_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsProvidersGraphs A convenience method for rendering graphs for a particular provider. + CircuitsProvidersGraphs A convenience method for rendering graphs for a particular provider. */ func (a *Client) CircuitsProvidersGraphs(params *CircuitsProvidersGraphsParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersGraphsOK, error) { // TODO: Validate the params before sending @@ -691,7 +884,7 @@ func (a *Client) CircuitsProvidersGraphs(params *CircuitsProvidersGraphsParams, PathPattern: "/circuits/providers/{id}/graphs/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersGraphsReader{formats: a.formats}, AuthInfo: authInfo, @@ -701,12 +894,18 @@ func (a *Client) CircuitsProvidersGraphs(params *CircuitsProvidersGraphsParams, if err != nil { return nil, err } - return result.(*CircuitsProvidersGraphsOK), nil - + success, ok := result.(*CircuitsProvidersGraphsOK) + 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 circuits_providers_graphs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsProvidersList Call to super to allow for caching + CircuitsProvidersList Call to super to allow for caching */ func (a *Client) CircuitsProvidersList(params *CircuitsProvidersListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersListOK, error) { // TODO: Validate the params before sending @@ -720,7 +919,7 @@ func (a *Client) CircuitsProvidersList(params *CircuitsProvidersListParams, auth PathPattern: "/circuits/providers/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersListReader{formats: a.formats}, AuthInfo: authInfo, @@ -730,12 +929,18 @@ func (a *Client) CircuitsProvidersList(params *CircuitsProvidersListParams, auth if err != nil { return nil, err } - return result.(*CircuitsProvidersListOK), nil - + success, ok := result.(*CircuitsProvidersListOK) + 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 circuits_providers_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsProvidersPartialUpdate circuits providers partial update API + CircuitsProvidersPartialUpdate circuits providers partial update API */ func (a *Client) CircuitsProvidersPartialUpdate(params *CircuitsProvidersPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -749,7 +954,7 @@ func (a *Client) CircuitsProvidersPartialUpdate(params *CircuitsProvidersPartial PathPattern: "/circuits/providers/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -759,12 +964,18 @@ func (a *Client) CircuitsProvidersPartialUpdate(params *CircuitsProvidersPartial if err != nil { return nil, err } - return result.(*CircuitsProvidersPartialUpdateOK), nil - + success, ok := result.(*CircuitsProvidersPartialUpdateOK) + 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 circuits_providers_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsProvidersRead Call to super to allow for caching + CircuitsProvidersRead Call to super to allow for caching */ func (a *Client) CircuitsProvidersRead(params *CircuitsProvidersReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersReadOK, error) { // TODO: Validate the params before sending @@ -778,7 +989,7 @@ func (a *Client) CircuitsProvidersRead(params *CircuitsProvidersReadParams, auth PathPattern: "/circuits/providers/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -788,12 +999,18 @@ func (a *Client) CircuitsProvidersRead(params *CircuitsProvidersReadParams, auth if err != nil { return nil, err } - return result.(*CircuitsProvidersReadOK), nil - + success, ok := result.(*CircuitsProvidersReadOK) + 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 circuits_providers_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -CircuitsProvidersUpdate circuits providers update API + CircuitsProvidersUpdate circuits providers update API */ func (a *Client) CircuitsProvidersUpdate(params *CircuitsProvidersUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersUpdateOK, error) { // TODO: Validate the params before sending @@ -807,7 +1024,7 @@ func (a *Client) CircuitsProvidersUpdate(params *CircuitsProvidersUpdateParams, PathPattern: "/circuits/providers/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -817,8 +1034,14 @@ func (a *Client) CircuitsProvidersUpdate(params *CircuitsProvidersUpdateParams, if err != nil { return nil, err } - return result.(*CircuitsProvidersUpdateOK), nil - + success, ok := result.(*CircuitsProvidersUpdateOK) + 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 circuits_providers_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 diff --git a/netbox/client/circuits/circuits_providers_create_parameters.go b/netbox/client/circuits/circuits_providers_create_parameters.go index 4263eef98b65bc653eb3cc0f8412f6f345059e2e..3c843736e89606f0b3aa53b302e16e5e1c05e983 100644 --- a/netbox/client/circuits/circuits_providers_create_parameters.go +++ b/netbox/client/circuits/circuits_providers_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewCircuitsProvidersCreateParams creates a new CircuitsProvidersCreateParams object diff --git a/netbox/client/circuits/circuits_providers_create_responses.go b/netbox/client/circuits/circuits_providers_create_responses.go index 73ff89f6090a405911cafde5f27b9221404fa78c..e0a6e13862dde4a7c8d4bc1056d090e9ec44ff6d 100644 --- a/netbox/client/circuits/circuits_providers_create_responses.go +++ b/netbox/client/circuits/circuits_providers_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsProvidersCreateReader is a Reader for the CircuitsProvidersCreate structure. @@ -38,7 +39,6 @@ type CircuitsProvidersCreateReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsProvidersCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewCircuitsProvidersCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsProvidersCreateCreated) Error() string { return fmt.Sprintf("[POST /circuits/providers/][%d] circuitsProvidersCreateCreated %+v", 201, o.Payload) } +func (o *CircuitsProvidersCreateCreated) GetPayload() *models.Provider { + return o.Payload +} + func (o *CircuitsProvidersCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Provider) diff --git a/netbox/client/circuits/circuits_providers_delete_parameters.go b/netbox/client/circuits/circuits_providers_delete_parameters.go index accb20846e733ce2d315e352902f57c1f599a177..d6cd058784c4f647d058879f65a6515b9fdb8ecc 100644 --- a/netbox/client/circuits/circuits_providers_delete_parameters.go +++ b/netbox/client/circuits/circuits_providers_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits diff --git a/netbox/client/circuits/circuits_providers_delete_responses.go b/netbox/client/circuits/circuits_providers_delete_responses.go index f1664056f5b94ff54400c520208207927a424f19..84712749e52d56f481aad0a877686b9b72f4bd7c 100644 --- a/netbox/client/circuits/circuits_providers_delete_responses.go +++ b/netbox/client/circuits/circuits_providers_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -35,7 +36,6 @@ type CircuitsProvidersDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsProvidersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewCircuitsProvidersDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/circuits/circuits_providers_graphs_parameters.go b/netbox/client/circuits/circuits_providers_graphs_parameters.go index 3c7316335a4d01c80a14c0d4533264112ae8e1dc..89f424f913248635d912cd66b180ae1ed6ae2055 100644 --- a/netbox/client/circuits/circuits_providers_graphs_parameters.go +++ b/netbox/client/circuits/circuits_providers_graphs_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits diff --git a/netbox/client/circuits/circuits_providers_graphs_responses.go b/netbox/client/circuits/circuits_providers_graphs_responses.go index 62bf549741a7b10fca0faad405b6017533f4a0e6..ff78d90f1d845334e42ccfd74d7bcd282bb2e7ad 100644 --- a/netbox/client/circuits/circuits_providers_graphs_responses.go +++ b/netbox/client/circuits/circuits_providers_graphs_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsProvidersGraphsReader is a Reader for the CircuitsProvidersGraphs structure. @@ -38,7 +39,6 @@ type CircuitsProvidersGraphsReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsProvidersGraphsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsProvidersGraphsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsProvidersGraphsOK) Error() string { return fmt.Sprintf("[GET /circuits/providers/{id}/graphs/][%d] circuitsProvidersGraphsOK %+v", 200, o.Payload) } +func (o *CircuitsProvidersGraphsOK) GetPayload() *models.Provider { + return o.Payload +} + func (o *CircuitsProvidersGraphsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Provider) diff --git a/netbox/client/circuits/circuits_providers_list_parameters.go b/netbox/client/circuits/circuits_providers_list_parameters.go index 51b9dc1017316ddef56e23ab44a3ca3da0c6b8c4..4ce0dae1f649df407912fd1c7e33daaaf5c4c3ea 100644 --- a/netbox/client/circuits/circuits_providers_list_parameters.go +++ b/netbox/client/circuits/circuits_providers_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -80,11 +81,23 @@ type CircuitsProvidersListParams struct { Account *string /*Asn*/ Asn *string + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*IDIn Multiple values may be separated by commas. */ IDIn *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. @@ -99,6 +112,10 @@ type CircuitsProvidersListParams struct { Offset *int64 /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string /*Site*/ Site *string /*SiteID*/ @@ -168,6 +185,39 @@ func (o *CircuitsProvidersListParams) SetAsn(asn *string) { o.Asn = asn } +// WithCreated adds the created to the circuits providers list params +func (o *CircuitsProvidersListParams) WithCreated(created *string) *CircuitsProvidersListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the circuits providers list params +func (o *CircuitsProvidersListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the circuits providers list params +func (o *CircuitsProvidersListParams) WithCreatedGte(createdGte *string) *CircuitsProvidersListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the circuits providers list params +func (o *CircuitsProvidersListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the circuits providers list params +func (o *CircuitsProvidersListParams) WithCreatedLte(createdLte *string) *CircuitsProvidersListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the circuits providers list params +func (o *CircuitsProvidersListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + // WithIDIn adds the iDIn to the circuits providers list params func (o *CircuitsProvidersListParams) WithIDIn(iDIn *string) *CircuitsProvidersListParams { o.SetIDIn(iDIn) @@ -179,6 +229,39 @@ func (o *CircuitsProvidersListParams) SetIDIn(iDIn *string) { o.IDIn = iDIn } +// WithLastUpdated adds the lastUpdated to the circuits providers list params +func (o *CircuitsProvidersListParams) WithLastUpdated(lastUpdated *string) *CircuitsProvidersListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the circuits providers list params +func (o *CircuitsProvidersListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the circuits providers list params +func (o *CircuitsProvidersListParams) WithLastUpdatedGte(lastUpdatedGte *string) *CircuitsProvidersListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the circuits providers list params +func (o *CircuitsProvidersListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the circuits providers list params +func (o *CircuitsProvidersListParams) WithLastUpdatedLte(lastUpdatedLte *string) *CircuitsProvidersListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the circuits providers list params +func (o *CircuitsProvidersListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the circuits providers list params func (o *CircuitsProvidersListParams) WithLimit(limit *int64) *CircuitsProvidersListParams { o.SetLimit(limit) @@ -223,6 +306,28 @@ func (o *CircuitsProvidersListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the circuits providers list params +func (o *CircuitsProvidersListParams) WithRegion(region *string) *CircuitsProvidersListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the circuits providers list params +func (o *CircuitsProvidersListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the circuits providers list params +func (o *CircuitsProvidersListParams) WithRegionID(regionID *string) *CircuitsProvidersListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the circuits providers list params +func (o *CircuitsProvidersListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + // WithSite adds the site to the circuits providers list params func (o *CircuitsProvidersListParams) WithSite(site *string) *CircuitsProvidersListParams { o.SetSite(site) @@ -307,6 +412,54 @@ func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, re } + 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.IDIn != nil { // query param id__in @@ -323,6 +476,54 @@ func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, re } + 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 @@ -387,6 +588,38 @@ func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, re } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + if o.Site != nil { // query param site diff --git a/netbox/client/circuits/circuits_providers_list_responses.go b/netbox/client/circuits/circuits_providers_list_responses.go index c77b5470812784e1b938155a897cb51ca09f0687..04e9361229c7910177aa85254cc4f59661ca4dfa 100644 --- a/netbox/client/circuits/circuits_providers_list_responses.go +++ b/netbox/client/circuits/circuits_providers_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsProvidersListReader is a Reader for the CircuitsProvidersList structure. @@ -42,7 +43,6 @@ type CircuitsProvidersListReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsProvidersListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsProvidersListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *CircuitsProvidersListOK) Error() string { return fmt.Sprintf("[GET /circuits/providers/][%d] circuitsProvidersListOK %+v", 200, o.Payload) } +func (o *CircuitsProvidersListOK) GetPayload() *CircuitsProvidersListOKBody { + return o.Payload +} + func (o *CircuitsProvidersListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(CircuitsProvidersListOKBody) diff --git a/netbox/client/circuits/circuits_providers_partial_update_parameters.go b/netbox/client/circuits/circuits_providers_partial_update_parameters.go index 342f6a8224e964a2961215557a1d50afa91fae88..7397975b1eedb5d3140a41c99602d148d202fd4f 100644 --- a/netbox/client/circuits/circuits_providers_partial_update_parameters.go +++ b/netbox/client/circuits/circuits_providers_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewCircuitsProvidersPartialUpdateParams creates a new CircuitsProvidersPartialUpdateParams object diff --git a/netbox/client/circuits/circuits_providers_partial_update_responses.go b/netbox/client/circuits/circuits_providers_partial_update_responses.go index 2c10dd8b65dc27d4ac80c4d8aacf9f51cb8ba92e..0e0a15befb8b176fec14396b3165c876dcd5724f 100644 --- a/netbox/client/circuits/circuits_providers_partial_update_responses.go +++ b/netbox/client/circuits/circuits_providers_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsProvidersPartialUpdateReader is a Reader for the CircuitsProvidersPartialUpdate structure. @@ -38,7 +39,6 @@ type CircuitsProvidersPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsProvidersPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsProvidersPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsProvidersPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /circuits/providers/{id}/][%d] circuitsProvidersPartialUpdateOK %+v", 200, o.Payload) } +func (o *CircuitsProvidersPartialUpdateOK) GetPayload() *models.Provider { + return o.Payload +} + func (o *CircuitsProvidersPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Provider) diff --git a/netbox/client/circuits/circuits_providers_read_parameters.go b/netbox/client/circuits/circuits_providers_read_parameters.go index ce9ce728f0ce08eef46e3ed7abf03680e907ad69..409d4245a20e3d456d602e5e1b7394a74c931e92 100644 --- a/netbox/client/circuits/circuits_providers_read_parameters.go +++ b/netbox/client/circuits/circuits_providers_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits diff --git a/netbox/client/circuits/circuits_providers_read_responses.go b/netbox/client/circuits/circuits_providers_read_responses.go index 2f1061fe3a7f6a1bfbc18f175b4ef42ebfb3f528..3b344f2e3f914f36d2f2d8d8c043b3524610eef6 100644 --- a/netbox/client/circuits/circuits_providers_read_responses.go +++ b/netbox/client/circuits/circuits_providers_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsProvidersReadReader is a Reader for the CircuitsProvidersRead structure. @@ -38,7 +39,6 @@ type CircuitsProvidersReadReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsProvidersReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsProvidersReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsProvidersReadOK) Error() string { return fmt.Sprintf("[GET /circuits/providers/{id}/][%d] circuitsProvidersReadOK %+v", 200, o.Payload) } +func (o *CircuitsProvidersReadOK) GetPayload() *models.Provider { + return o.Payload +} + func (o *CircuitsProvidersReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Provider) diff --git a/netbox/client/circuits/circuits_providers_update_parameters.go b/netbox/client/circuits/circuits_providers_update_parameters.go index 0c8ff914edfaedae3c315aac5b73bca521afed07..1faef5dd0fb9b152addab85822b6a217d4d39992 100644 --- a/netbox/client/circuits/circuits_providers_update_parameters.go +++ b/netbox/client/circuits/circuits_providers_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewCircuitsProvidersUpdateParams creates a new CircuitsProvidersUpdateParams object diff --git a/netbox/client/circuits/circuits_providers_update_responses.go b/netbox/client/circuits/circuits_providers_update_responses.go index 58052946c44f1769cbfca70ee11be8711b1b3450..692a60b90a31d831c52ee2a8a00d039f0bc74237 100644 --- a/netbox/client/circuits/circuits_providers_update_responses.go +++ b/netbox/client/circuits/circuits_providers_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuits @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // CircuitsProvidersUpdateReader is a Reader for the CircuitsProvidersUpdate structure. @@ -38,7 +39,6 @@ type CircuitsProvidersUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *CircuitsProvidersUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewCircuitsProvidersUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *CircuitsProvidersUpdateOK) Error() string { return fmt.Sprintf("[PUT /circuits/providers/{id}/][%d] circuitsProvidersUpdateOK %+v", 200, o.Payload) } +func (o *CircuitsProvidersUpdateOK) GetPayload() *models.Provider { + return o.Payload +} + func (o *CircuitsProvidersUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Provider) diff --git a/netbox/client/dcim/dcim_cables_create_parameters.go b/netbox/client/dcim/dcim_cables_create_parameters.go index 4c91d01e7677a82485728c10ac4b26f501cbf379..f8866a53e893cfce966843a2ba980ebbef17864c 100644 --- a/netbox/client/dcim/dcim_cables_create_parameters.go +++ b/netbox/client/dcim/dcim_cables_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimCablesCreateParams creates a new DcimCablesCreateParams object diff --git a/netbox/client/dcim/dcim_cables_create_responses.go b/netbox/client/dcim/dcim_cables_create_responses.go index abe0dd70ffd2830a313f318b0fbc52c8d4dcea56..0449af428b7c18c267124496592b9827e1382313 100644 --- a/netbox/client/dcim/dcim_cables_create_responses.go +++ b/netbox/client/dcim/dcim_cables_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimCablesCreateReader is a Reader for the DcimCablesCreate structure. @@ -38,7 +39,6 @@ type DcimCablesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimCablesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimCablesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimCablesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/cables/][%d] dcimCablesCreateCreated %+v", 201, o.Payload) } +func (o *DcimCablesCreateCreated) GetPayload() *models.Cable { + return o.Payload +} + func (o *DcimCablesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Cable) diff --git a/netbox/client/dcim/dcim_cables_delete_parameters.go b/netbox/client/dcim/dcim_cables_delete_parameters.go index 0558d0cba4801ec4a125758edbcbf7547f8f0be1..98629ff7a978e9a9e0a3909cae8877bdac34ac66 100644 --- a/netbox/client/dcim/dcim_cables_delete_parameters.go +++ b/netbox/client/dcim/dcim_cables_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_cables_delete_responses.go b/netbox/client/dcim/dcim_cables_delete_responses.go index a068a51f222de59cc56c4595d9f6892ec2a369f3..50850420e2a08cf80da535bdcae4e8db947d0286 100644 --- a/netbox/client/dcim/dcim_cables_delete_responses.go +++ b/netbox/client/dcim/dcim_cables_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimCablesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimCablesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimCablesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_cables_list_parameters.go b/netbox/client/dcim/dcim_cables_list_parameters.go index 31d2b38b7a9d88ae21f85a07cc847c1576b5d14e..e903221a0a043748ab4e0e63bbc9e7b188579fd6 100644 --- a/netbox/client/dcim/dcim_cables_list_parameters.go +++ b/netbox/client/dcim/dcim_cables_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -102,8 +103,20 @@ type DcimCablesListParams struct { Offset *int64 /*Q*/ Q *string + /*Rack*/ + Rack *string + /*RackID*/ + RackID *string + /*Site*/ + Site *string + /*SiteID*/ + SiteID *string /*Status*/ Status *string + /*Tenant*/ + Tenant *string + /*TenantID*/ + TenantID *string /*Type*/ Type *string @@ -255,6 +268,50 @@ func (o *DcimCablesListParams) SetQ(q *string) { o.Q = q } +// WithRack adds the rack to the dcim cables list params +func (o *DcimCablesListParams) WithRack(rack *string) *DcimCablesListParams { + o.SetRack(rack) + return o +} + +// SetRack adds the rack to the dcim cables list params +func (o *DcimCablesListParams) SetRack(rack *string) { + o.Rack = rack +} + +// WithRackID adds the rackID to the dcim cables list params +func (o *DcimCablesListParams) WithRackID(rackID *string) *DcimCablesListParams { + o.SetRackID(rackID) + return o +} + +// SetRackID adds the rackId to the dcim cables list params +func (o *DcimCablesListParams) SetRackID(rackID *string) { + o.RackID = rackID +} + +// WithSite adds the site to the dcim cables list params +func (o *DcimCablesListParams) WithSite(site *string) *DcimCablesListParams { + o.SetSite(site) + return o +} + +// SetSite adds the site to the dcim cables list params +func (o *DcimCablesListParams) SetSite(site *string) { + o.Site = site +} + +// WithSiteID adds the siteID to the dcim cables list params +func (o *DcimCablesListParams) WithSiteID(siteID *string) *DcimCablesListParams { + o.SetSiteID(siteID) + return o +} + +// SetSiteID adds the siteId to the dcim cables list params +func (o *DcimCablesListParams) SetSiteID(siteID *string) { + o.SiteID = siteID +} + // WithStatus adds the status to the dcim cables list params func (o *DcimCablesListParams) WithStatus(status *string) *DcimCablesListParams { o.SetStatus(status) @@ -266,6 +323,28 @@ func (o *DcimCablesListParams) SetStatus(status *string) { o.Status = status } +// WithTenant adds the tenant to the dcim cables list params +func (o *DcimCablesListParams) WithTenant(tenant *string) *DcimCablesListParams { + o.SetTenant(tenant) + return o +} + +// SetTenant adds the tenant to the dcim cables list params +func (o *DcimCablesListParams) SetTenant(tenant *string) { + o.Tenant = tenant +} + +// WithTenantID adds the tenantID to the dcim cables list params +func (o *DcimCablesListParams) WithTenantID(tenantID *string) *DcimCablesListParams { + o.SetTenantID(tenantID) + return o +} + +// SetTenantID adds the tenantId to the dcim cables list params +func (o *DcimCablesListParams) SetTenantID(tenantID *string) { + o.TenantID = tenantID +} + // WithType adds the typeVar to the dcim cables list params func (o *DcimCablesListParams) WithType(typeVar *string) *DcimCablesListParams { o.SetType(typeVar) @@ -445,6 +524,70 @@ func (o *DcimCablesListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } + if o.Rack != nil { + + // query param rack + var qrRack string + if o.Rack != nil { + qrRack = *o.Rack + } + qRack := qrRack + if qRack != "" { + if err := r.SetQueryParam("rack", qRack); err != nil { + return err + } + } + + } + + if o.RackID != nil { + + // query param rack_id + var qrRackID string + if o.RackID != nil { + qrRackID = *o.RackID + } + qRackID := qrRackID + if qRackID != "" { + if err := r.SetQueryParam("rack_id", qRackID); err != nil { + return err + } + } + + } + + if o.Site != nil { + + // query param site + var qrSite string + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + + } + if o.Status != nil { // query param status @@ -461,6 +604,38 @@ func (o *DcimCablesListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } + if o.Tenant != nil { + + // query param tenant + var qrTenant string + if o.Tenant != nil { + qrTenant = *o.Tenant + } + qTenant := qrTenant + if qTenant != "" { + if err := r.SetQueryParam("tenant", qTenant); err != nil { + return err + } + } + + } + + if o.TenantID != nil { + + // query param tenant_id + var qrTenantID string + if o.TenantID != nil { + qrTenantID = *o.TenantID + } + qTenantID := qrTenantID + if qTenantID != "" { + if err := r.SetQueryParam("tenant_id", qTenantID); err != nil { + return err + } + } + + } + if o.Type != nil { // query param type diff --git a/netbox/client/dcim/dcim_cables_list_responses.go b/netbox/client/dcim/dcim_cables_list_responses.go index 38dc8ba8e4d2773a21e1cd21e90f3f1f20bd1e91..7a4d626b1b0c735a246c9ae8b6da140e6b78495e 100644 --- a/netbox/client/dcim/dcim_cables_list_responses.go +++ b/netbox/client/dcim/dcim_cables_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimCablesListReader is a Reader for the DcimCablesList structure. @@ -42,7 +43,6 @@ type DcimCablesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimCablesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimCablesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimCablesListOK) Error() string { return fmt.Sprintf("[GET /dcim/cables/][%d] dcimCablesListOK %+v", 200, o.Payload) } +func (o *DcimCablesListOK) GetPayload() *DcimCablesListOKBody { + return o.Payload +} + func (o *DcimCablesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimCablesListOKBody) diff --git a/netbox/client/dcim/dcim_cables_partial_update_parameters.go b/netbox/client/dcim/dcim_cables_partial_update_parameters.go index 58e2f6db540dd55983606e561fe564ea3f8b2cdb..88b6241a82567959d6c08cde201922b068ecf84d 100644 --- a/netbox/client/dcim/dcim_cables_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_cables_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimCablesPartialUpdateParams creates a new DcimCablesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_cables_partial_update_responses.go b/netbox/client/dcim/dcim_cables_partial_update_responses.go index 5ec26d1a58ead745e532ca0bfd00537a76b87021..0d9b2d566b4d0938573240f5e76adcaca6aff469 100644 --- a/netbox/client/dcim/dcim_cables_partial_update_responses.go +++ b/netbox/client/dcim/dcim_cables_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimCablesPartialUpdateReader is a Reader for the DcimCablesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimCablesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimCablesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimCablesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimCablesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/cables/{id}/][%d] dcimCablesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimCablesPartialUpdateOK) GetPayload() *models.Cable { + return o.Payload +} + func (o *DcimCablesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Cable) diff --git a/netbox/client/dcim/dcim_cables_read_parameters.go b/netbox/client/dcim/dcim_cables_read_parameters.go index 6abdbd289b4ee7a09f91735db30b9c3b7b11c144..025e969b394dd5823ad51b019b04370a542710f4 100644 --- a/netbox/client/dcim/dcim_cables_read_parameters.go +++ b/netbox/client/dcim/dcim_cables_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_cables_read_responses.go b/netbox/client/dcim/dcim_cables_read_responses.go index 84100879eec688acc02bc9e402df0c05db51b519..39a3108c149b691d76db4d624755ea206b1cd40d 100644 --- a/netbox/client/dcim/dcim_cables_read_responses.go +++ b/netbox/client/dcim/dcim_cables_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimCablesReadReader is a Reader for the DcimCablesRead structure. @@ -38,7 +39,6 @@ type DcimCablesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimCablesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimCablesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimCablesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/cables/{id}/][%d] dcimCablesReadOK %+v", 200, o.Payload) } +func (o *DcimCablesReadOK) GetPayload() *models.Cable { + return o.Payload +} + func (o *DcimCablesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Cable) diff --git a/netbox/client/dcim/dcim_cables_update_parameters.go b/netbox/client/dcim/dcim_cables_update_parameters.go index 2c2514030a34fd2115694eb4336e2f8a0586aab9..7c61196ca70a15d3349de18e9a9ffd7271f1807e 100644 --- a/netbox/client/dcim/dcim_cables_update_parameters.go +++ b/netbox/client/dcim/dcim_cables_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimCablesUpdateParams creates a new DcimCablesUpdateParams object diff --git a/netbox/client/dcim/dcim_cables_update_responses.go b/netbox/client/dcim/dcim_cables_update_responses.go index 4e061b593ce2993e4fc701a7b1a3d855debb87b2..530c1107b23d601116c6a626cc2ece44f67e2d9c 100644 --- a/netbox/client/dcim/dcim_cables_update_responses.go +++ b/netbox/client/dcim/dcim_cables_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimCablesUpdateReader is a Reader for the DcimCablesUpdate structure. @@ -38,7 +39,6 @@ type DcimCablesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimCablesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimCablesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimCablesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/cables/{id}/][%d] dcimCablesUpdateOK %+v", 200, o.Payload) } +func (o *DcimCablesUpdateOK) GetPayload() *models.Cable { + return o.Payload +} + func (o *DcimCablesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Cable) diff --git a/netbox/client/dcim/dcim_choices_list_parameters.go b/netbox/client/dcim/dcim_choices_list_parameters.go index 43b8eb9d9efe4d4d9ee1f40fe873ad6b7033c673..818163c08f9f499c0eb9d13f993b081aedc69644 100644 --- a/netbox/client/dcim/dcim_choices_list_parameters.go +++ b/netbox/client/dcim/dcim_choices_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_choices_list_responses.go b/netbox/client/dcim/dcim_choices_list_responses.go index cf40dbcc257d70b9f25bbfaa267f2bdae8bb8aa2..69e2ab91511fc8c33b07af821e8f43e5c8bda0f3 100644 --- a/netbox/client/dcim/dcim_choices_list_responses.go +++ b/netbox/client/dcim/dcim_choices_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimChoicesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimChoicesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_choices_read_parameters.go b/netbox/client/dcim/dcim_choices_read_parameters.go index d178f4d07e3ffc3af1fd9ecb95a2cc33140b6af4..4dfa0e69efb8657764b67e016e86990766571a8c 100644 --- a/netbox/client/dcim/dcim_choices_read_parameters.go +++ b/netbox/client/dcim/dcim_choices_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_choices_read_responses.go b/netbox/client/dcim/dcim_choices_read_responses.go index ca9b7c064d62977db9a8c56e0a9d1c28dfb90cf7..210601ff4c86787c800b4c60a4430eebd1612c86 100644 --- a/netbox/client/dcim/dcim_choices_read_responses.go +++ b/netbox/client/dcim/dcim_choices_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimChoicesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimChoicesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_client.go b/netbox/client/dcim/dcim_client.go index b59c2066c528f4b062e86350ba6e5f2f4172c342..ee1c054ad0b422aadf56d3cf7355bcfe4b253908 100644 --- a/netbox/client/dcim/dcim_client.go +++ b/netbox/client/dcim/dcim_client.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -20,13 +21,14 @@ package dcim // Editing this file might prove futile when you re-run the swagger generate command import ( - "github.com/go-openapi/runtime" + "fmt" - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" ) // New creates a new dcim API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } @@ -38,8 +40,431 @@ type Client struct { formats strfmt.Registry } +// ClientService is the interface for Client methods +type ClientService interface { + DcimChoicesList(params *DcimChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimChoicesListOK, error) + + DcimChoicesRead(params *DcimChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimChoicesReadOK, error) + + DcimCablesCreate(params *DcimCablesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimCablesCreateCreated, error) + + DcimCablesDelete(params *DcimCablesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimCablesDeleteNoContent, error) + + DcimCablesList(params *DcimCablesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimCablesListOK, error) + + DcimCablesPartialUpdate(params *DcimCablesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimCablesPartialUpdateOK, error) + + DcimCablesRead(params *DcimCablesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimCablesReadOK, error) + + DcimCablesUpdate(params *DcimCablesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimCablesUpdateOK, error) + + DcimConnectedDeviceList(params *DcimConnectedDeviceListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConnectedDeviceListOK, error) + + DcimConsoleConnectionsList(params *DcimConsoleConnectionsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleConnectionsListOK, error) + + DcimConsolePortTemplatesCreate(params *DcimConsolePortTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesCreateCreated, error) + + DcimConsolePortTemplatesDelete(params *DcimConsolePortTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesDeleteNoContent, error) + + DcimConsolePortTemplatesList(params *DcimConsolePortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesListOK, error) + + DcimConsolePortTemplatesPartialUpdate(params *DcimConsolePortTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesPartialUpdateOK, error) + + DcimConsolePortTemplatesRead(params *DcimConsolePortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesReadOK, error) + + DcimConsolePortTemplatesUpdate(params *DcimConsolePortTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesUpdateOK, error) + + DcimConsolePortsCreate(params *DcimConsolePortsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsCreateCreated, error) + + DcimConsolePortsDelete(params *DcimConsolePortsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsDeleteNoContent, error) + + DcimConsolePortsList(params *DcimConsolePortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsListOK, error) + + DcimConsolePortsPartialUpdate(params *DcimConsolePortsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsPartialUpdateOK, error) + + DcimConsolePortsRead(params *DcimConsolePortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsReadOK, error) + + DcimConsolePortsTrace(params *DcimConsolePortsTraceParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsTraceOK, error) + + DcimConsolePortsUpdate(params *DcimConsolePortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsUpdateOK, error) + + DcimConsoleServerPortTemplatesCreate(params *DcimConsoleServerPortTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesCreateCreated, error) + + DcimConsoleServerPortTemplatesDelete(params *DcimConsoleServerPortTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesDeleteNoContent, error) + + DcimConsoleServerPortTemplatesList(params *DcimConsoleServerPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesListOK, error) + + DcimConsoleServerPortTemplatesPartialUpdate(params *DcimConsoleServerPortTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesPartialUpdateOK, error) + + DcimConsoleServerPortTemplatesRead(params *DcimConsoleServerPortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesReadOK, error) + + DcimConsoleServerPortTemplatesUpdate(params *DcimConsoleServerPortTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesUpdateOK, error) + + DcimConsoleServerPortsCreate(params *DcimConsoleServerPortsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsCreateCreated, error) + + DcimConsoleServerPortsDelete(params *DcimConsoleServerPortsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsDeleteNoContent, error) + + DcimConsoleServerPortsList(params *DcimConsoleServerPortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsListOK, error) + + DcimConsoleServerPortsPartialUpdate(params *DcimConsoleServerPortsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsPartialUpdateOK, error) + + DcimConsoleServerPortsRead(params *DcimConsoleServerPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsReadOK, error) + + DcimConsoleServerPortsTrace(params *DcimConsoleServerPortsTraceParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsTraceOK, error) + + DcimConsoleServerPortsUpdate(params *DcimConsoleServerPortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsUpdateOK, error) + + DcimDeviceBayTemplatesCreate(params *DcimDeviceBayTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesCreateCreated, error) + + DcimDeviceBayTemplatesDelete(params *DcimDeviceBayTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesDeleteNoContent, error) + + DcimDeviceBayTemplatesList(params *DcimDeviceBayTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesListOK, error) + + DcimDeviceBayTemplatesPartialUpdate(params *DcimDeviceBayTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesPartialUpdateOK, error) + + DcimDeviceBayTemplatesRead(params *DcimDeviceBayTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesReadOK, error) + + DcimDeviceBayTemplatesUpdate(params *DcimDeviceBayTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesUpdateOK, error) + + DcimDeviceBaysCreate(params *DcimDeviceBaysCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysCreateCreated, error) + + DcimDeviceBaysDelete(params *DcimDeviceBaysDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysDeleteNoContent, error) + + DcimDeviceBaysList(params *DcimDeviceBaysListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysListOK, error) + + DcimDeviceBaysPartialUpdate(params *DcimDeviceBaysPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysPartialUpdateOK, error) + + DcimDeviceBaysRead(params *DcimDeviceBaysReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysReadOK, error) + + DcimDeviceBaysUpdate(params *DcimDeviceBaysUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysUpdateOK, error) + + DcimDeviceRolesCreate(params *DcimDeviceRolesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesCreateCreated, error) + + DcimDeviceRolesDelete(params *DcimDeviceRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesDeleteNoContent, error) + + DcimDeviceRolesList(params *DcimDeviceRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesListOK, error) + + DcimDeviceRolesPartialUpdate(params *DcimDeviceRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesPartialUpdateOK, error) + + DcimDeviceRolesRead(params *DcimDeviceRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesReadOK, error) + + DcimDeviceRolesUpdate(params *DcimDeviceRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesUpdateOK, error) + + DcimDeviceTypesCreate(params *DcimDeviceTypesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesCreateCreated, error) + + DcimDeviceTypesDelete(params *DcimDeviceTypesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesDeleteNoContent, error) + + DcimDeviceTypesList(params *DcimDeviceTypesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesListOK, error) + + DcimDeviceTypesPartialUpdate(params *DcimDeviceTypesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesPartialUpdateOK, error) + + DcimDeviceTypesRead(params *DcimDeviceTypesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesReadOK, error) + + DcimDeviceTypesUpdate(params *DcimDeviceTypesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesUpdateOK, error) + + DcimDevicesCreate(params *DcimDevicesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesCreateCreated, error) + + DcimDevicesDelete(params *DcimDevicesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesDeleteNoContent, error) + + DcimDevicesGraphs(params *DcimDevicesGraphsParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesGraphsOK, error) + + DcimDevicesList(params *DcimDevicesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesListOK, error) + + DcimDevicesNapalm(params *DcimDevicesNapalmParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesNapalmOK, error) + + DcimDevicesPartialUpdate(params *DcimDevicesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesPartialUpdateOK, error) + + DcimDevicesRead(params *DcimDevicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesReadOK, error) + + DcimDevicesUpdate(params *DcimDevicesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesUpdateOK, error) + + DcimFrontPortTemplatesCreate(params *DcimFrontPortTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortTemplatesCreateCreated, error) + + DcimFrontPortTemplatesDelete(params *DcimFrontPortTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortTemplatesDeleteNoContent, error) + + DcimFrontPortTemplatesList(params *DcimFrontPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortTemplatesListOK, error) + + DcimFrontPortTemplatesPartialUpdate(params *DcimFrontPortTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortTemplatesPartialUpdateOK, error) + + DcimFrontPortTemplatesRead(params *DcimFrontPortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortTemplatesReadOK, error) + + DcimFrontPortTemplatesUpdate(params *DcimFrontPortTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortTemplatesUpdateOK, error) + + DcimFrontPortsCreate(params *DcimFrontPortsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsCreateCreated, error) + + DcimFrontPortsDelete(params *DcimFrontPortsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsDeleteNoContent, error) + + DcimFrontPortsList(params *DcimFrontPortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsListOK, error) + + DcimFrontPortsPartialUpdate(params *DcimFrontPortsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsPartialUpdateOK, error) + + DcimFrontPortsRead(params *DcimFrontPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsReadOK, error) + + DcimFrontPortsUpdate(params *DcimFrontPortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsUpdateOK, error) + + DcimInterfaceConnectionsList(params *DcimInterfaceConnectionsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceConnectionsListOK, error) + + DcimInterfaceTemplatesCreate(params *DcimInterfaceTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesCreateCreated, error) + + DcimInterfaceTemplatesDelete(params *DcimInterfaceTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesDeleteNoContent, error) + + DcimInterfaceTemplatesList(params *DcimInterfaceTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesListOK, error) + + DcimInterfaceTemplatesPartialUpdate(params *DcimInterfaceTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesPartialUpdateOK, error) + + DcimInterfaceTemplatesRead(params *DcimInterfaceTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesReadOK, error) + + DcimInterfaceTemplatesUpdate(params *DcimInterfaceTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesUpdateOK, error) + + DcimInterfacesCreate(params *DcimInterfacesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesCreateCreated, error) + + DcimInterfacesDelete(params *DcimInterfacesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesDeleteNoContent, error) + + DcimInterfacesGraphs(params *DcimInterfacesGraphsParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesGraphsOK, error) + + DcimInterfacesList(params *DcimInterfacesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesListOK, error) + + DcimInterfacesPartialUpdate(params *DcimInterfacesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesPartialUpdateOK, error) + + DcimInterfacesRead(params *DcimInterfacesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesReadOK, error) + + DcimInterfacesTrace(params *DcimInterfacesTraceParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesTraceOK, error) + + DcimInterfacesUpdate(params *DcimInterfacesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesUpdateOK, error) + + DcimInventoryItemsCreate(params *DcimInventoryItemsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsCreateCreated, error) + + DcimInventoryItemsDelete(params *DcimInventoryItemsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsDeleteNoContent, error) + + DcimInventoryItemsList(params *DcimInventoryItemsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsListOK, error) + + DcimInventoryItemsPartialUpdate(params *DcimInventoryItemsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsPartialUpdateOK, error) + + DcimInventoryItemsRead(params *DcimInventoryItemsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsReadOK, error) + + DcimInventoryItemsUpdate(params *DcimInventoryItemsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsUpdateOK, error) + + DcimManufacturersCreate(params *DcimManufacturersCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersCreateCreated, error) + + DcimManufacturersDelete(params *DcimManufacturersDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersDeleteNoContent, error) + + DcimManufacturersList(params *DcimManufacturersListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersListOK, error) + + DcimManufacturersPartialUpdate(params *DcimManufacturersPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersPartialUpdateOK, error) + + DcimManufacturersRead(params *DcimManufacturersReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersReadOK, error) + + DcimManufacturersUpdate(params *DcimManufacturersUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersUpdateOK, error) + + DcimPlatformsCreate(params *DcimPlatformsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsCreateCreated, error) + + DcimPlatformsDelete(params *DcimPlatformsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsDeleteNoContent, error) + + DcimPlatformsList(params *DcimPlatformsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsListOK, error) + + DcimPlatformsPartialUpdate(params *DcimPlatformsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsPartialUpdateOK, error) + + DcimPlatformsRead(params *DcimPlatformsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsReadOK, error) + + DcimPlatformsUpdate(params *DcimPlatformsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsUpdateOK, error) + + DcimPowerConnectionsList(params *DcimPowerConnectionsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerConnectionsListOK, error) + + DcimPowerFeedsCreate(params *DcimPowerFeedsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerFeedsCreateCreated, error) + + DcimPowerFeedsDelete(params *DcimPowerFeedsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerFeedsDeleteNoContent, error) + + DcimPowerFeedsList(params *DcimPowerFeedsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerFeedsListOK, error) + + DcimPowerFeedsPartialUpdate(params *DcimPowerFeedsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerFeedsPartialUpdateOK, error) + + DcimPowerFeedsRead(params *DcimPowerFeedsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerFeedsReadOK, error) + + DcimPowerFeedsUpdate(params *DcimPowerFeedsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerFeedsUpdateOK, error) + + DcimPowerOutletTemplatesCreate(params *DcimPowerOutletTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesCreateCreated, error) + + DcimPowerOutletTemplatesDelete(params *DcimPowerOutletTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesDeleteNoContent, error) + + DcimPowerOutletTemplatesList(params *DcimPowerOutletTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesListOK, error) + + DcimPowerOutletTemplatesPartialUpdate(params *DcimPowerOutletTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesPartialUpdateOK, error) + + DcimPowerOutletTemplatesRead(params *DcimPowerOutletTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesReadOK, error) + + DcimPowerOutletTemplatesUpdate(params *DcimPowerOutletTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesUpdateOK, error) + + DcimPowerOutletsCreate(params *DcimPowerOutletsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsCreateCreated, error) + + DcimPowerOutletsDelete(params *DcimPowerOutletsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsDeleteNoContent, error) + + DcimPowerOutletsList(params *DcimPowerOutletsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsListOK, error) + + DcimPowerOutletsPartialUpdate(params *DcimPowerOutletsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsPartialUpdateOK, error) + + DcimPowerOutletsRead(params *DcimPowerOutletsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsReadOK, error) + + DcimPowerOutletsTrace(params *DcimPowerOutletsTraceParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsTraceOK, error) + + DcimPowerOutletsUpdate(params *DcimPowerOutletsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsUpdateOK, error) + + DcimPowerPanelsCreate(params *DcimPowerPanelsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPanelsCreateCreated, error) + + DcimPowerPanelsDelete(params *DcimPowerPanelsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPanelsDeleteNoContent, error) + + DcimPowerPanelsList(params *DcimPowerPanelsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPanelsListOK, error) + + DcimPowerPanelsPartialUpdate(params *DcimPowerPanelsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPanelsPartialUpdateOK, error) + + DcimPowerPanelsRead(params *DcimPowerPanelsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPanelsReadOK, error) + + DcimPowerPanelsUpdate(params *DcimPowerPanelsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPanelsUpdateOK, error) + + DcimPowerPortTemplatesCreate(params *DcimPowerPortTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesCreateCreated, error) + + DcimPowerPortTemplatesDelete(params *DcimPowerPortTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesDeleteNoContent, error) + + DcimPowerPortTemplatesList(params *DcimPowerPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesListOK, error) + + DcimPowerPortTemplatesPartialUpdate(params *DcimPowerPortTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesPartialUpdateOK, error) + + DcimPowerPortTemplatesRead(params *DcimPowerPortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesReadOK, error) + + DcimPowerPortTemplatesUpdate(params *DcimPowerPortTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesUpdateOK, error) + + DcimPowerPortsCreate(params *DcimPowerPortsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsCreateCreated, error) + + DcimPowerPortsDelete(params *DcimPowerPortsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsDeleteNoContent, error) + + DcimPowerPortsList(params *DcimPowerPortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsListOK, error) + + DcimPowerPortsPartialUpdate(params *DcimPowerPortsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsPartialUpdateOK, error) + + DcimPowerPortsRead(params *DcimPowerPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsReadOK, error) + + DcimPowerPortsTrace(params *DcimPowerPortsTraceParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsTraceOK, error) + + DcimPowerPortsUpdate(params *DcimPowerPortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsUpdateOK, error) + + DcimRackGroupsCreate(params *DcimRackGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsCreateCreated, error) + + DcimRackGroupsDelete(params *DcimRackGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsDeleteNoContent, error) + + DcimRackGroupsList(params *DcimRackGroupsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsListOK, error) + + DcimRackGroupsPartialUpdate(params *DcimRackGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsPartialUpdateOK, error) + + DcimRackGroupsRead(params *DcimRackGroupsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsReadOK, error) + + DcimRackGroupsUpdate(params *DcimRackGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsUpdateOK, error) + + DcimRackReservationsCreate(params *DcimRackReservationsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsCreateCreated, error) + + DcimRackReservationsDelete(params *DcimRackReservationsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsDeleteNoContent, error) + + DcimRackReservationsList(params *DcimRackReservationsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsListOK, error) + + DcimRackReservationsPartialUpdate(params *DcimRackReservationsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsPartialUpdateOK, error) + + DcimRackReservationsRead(params *DcimRackReservationsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsReadOK, error) + + DcimRackReservationsUpdate(params *DcimRackReservationsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsUpdateOK, error) + + DcimRackRolesCreate(params *DcimRackRolesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesCreateCreated, error) + + DcimRackRolesDelete(params *DcimRackRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesDeleteNoContent, error) + + DcimRackRolesList(params *DcimRackRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesListOK, error) + + DcimRackRolesPartialUpdate(params *DcimRackRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesPartialUpdateOK, error) + + DcimRackRolesRead(params *DcimRackRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesReadOK, error) + + DcimRackRolesUpdate(params *DcimRackRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesUpdateOK, error) + + DcimRacksCreate(params *DcimRacksCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksCreateCreated, error) + + DcimRacksDelete(params *DcimRacksDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksDeleteNoContent, error) + + DcimRacksElevation(params *DcimRacksElevationParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksElevationOK, error) + + DcimRacksList(params *DcimRacksListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksListOK, error) + + DcimRacksPartialUpdate(params *DcimRacksPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksPartialUpdateOK, error) + + DcimRacksRead(params *DcimRacksReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksReadOK, error) + + DcimRacksUnits(params *DcimRacksUnitsParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksUnitsOK, error) + + DcimRacksUpdate(params *DcimRacksUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksUpdateOK, error) + + DcimRearPortTemplatesCreate(params *DcimRearPortTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortTemplatesCreateCreated, error) + + DcimRearPortTemplatesDelete(params *DcimRearPortTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortTemplatesDeleteNoContent, error) + + DcimRearPortTemplatesList(params *DcimRearPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortTemplatesListOK, error) + + DcimRearPortTemplatesPartialUpdate(params *DcimRearPortTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortTemplatesPartialUpdateOK, error) + + DcimRearPortTemplatesRead(params *DcimRearPortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortTemplatesReadOK, error) + + DcimRearPortTemplatesUpdate(params *DcimRearPortTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortTemplatesUpdateOK, error) + + DcimRearPortsCreate(params *DcimRearPortsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsCreateCreated, error) + + DcimRearPortsDelete(params *DcimRearPortsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsDeleteNoContent, error) + + DcimRearPortsList(params *DcimRearPortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsListOK, error) + + DcimRearPortsPartialUpdate(params *DcimRearPortsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsPartialUpdateOK, error) + + DcimRearPortsRead(params *DcimRearPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsReadOK, error) + + DcimRearPortsUpdate(params *DcimRearPortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsUpdateOK, error) + + DcimRegionsCreate(params *DcimRegionsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsCreateCreated, error) + + DcimRegionsDelete(params *DcimRegionsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsDeleteNoContent, error) + + DcimRegionsList(params *DcimRegionsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsListOK, error) + + DcimRegionsPartialUpdate(params *DcimRegionsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsPartialUpdateOK, error) + + DcimRegionsRead(params *DcimRegionsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsReadOK, error) + + DcimRegionsUpdate(params *DcimRegionsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsUpdateOK, error) + + DcimSitesCreate(params *DcimSitesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesCreateCreated, error) + + DcimSitesDelete(params *DcimSitesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesDeleteNoContent, error) + + DcimSitesGraphs(params *DcimSitesGraphsParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesGraphsOK, error) + + DcimSitesList(params *DcimSitesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesListOK, error) + + DcimSitesPartialUpdate(params *DcimSitesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesPartialUpdateOK, error) + + DcimSitesRead(params *DcimSitesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesReadOK, error) + + DcimSitesUpdate(params *DcimSitesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesUpdateOK, error) + + DcimVirtualChassisCreate(params *DcimVirtualChassisCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisCreateCreated, error) + + DcimVirtualChassisDelete(params *DcimVirtualChassisDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisDeleteNoContent, error) + + DcimVirtualChassisList(params *DcimVirtualChassisListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisListOK, error) + + DcimVirtualChassisPartialUpdate(params *DcimVirtualChassisPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisPartialUpdateOK, error) + + DcimVirtualChassisRead(params *DcimVirtualChassisReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisReadOK, error) + + DcimVirtualChassisUpdate(params *DcimVirtualChassisUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisUpdateOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* -DcimChoicesList dcim choices list API + DcimChoicesList dcim choices list API */ func (a *Client) DcimChoicesList(params *DcimChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimChoicesListOK, error) { // TODO: Validate the params before sending @@ -53,7 +478,7 @@ func (a *Client) DcimChoicesList(params *DcimChoicesListParams, authInfo runtime PathPattern: "/dcim/_choices/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimChoicesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -63,12 +488,18 @@ func (a *Client) DcimChoicesList(params *DcimChoicesListParams, authInfo runtime if err != nil { return nil, err } - return result.(*DcimChoicesListOK), nil - + success, ok := result.(*DcimChoicesListOK) + 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__choices_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimChoicesRead dcim choices read API + DcimChoicesRead dcim choices read API */ func (a *Client) DcimChoicesRead(params *DcimChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimChoicesReadOK, error) { // TODO: Validate the params before sending @@ -82,7 +513,7 @@ func (a *Client) DcimChoicesRead(params *DcimChoicesReadParams, authInfo runtime PathPattern: "/dcim/_choices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimChoicesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -92,12 +523,18 @@ func (a *Client) DcimChoicesRead(params *DcimChoicesReadParams, authInfo runtime if err != nil { return nil, err } - return result.(*DcimChoicesReadOK), nil - + success, ok := result.(*DcimChoicesReadOK) + 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__choices_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimCablesCreate dcim cables create API + DcimCablesCreate dcim cables create API */ func (a *Client) DcimCablesCreate(params *DcimCablesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimCablesCreateCreated, error) { // TODO: Validate the params before sending @@ -111,7 +548,7 @@ func (a *Client) DcimCablesCreate(params *DcimCablesCreateParams, authInfo runti PathPattern: "/dcim/cables/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -121,12 +558,18 @@ func (a *Client) DcimCablesCreate(params *DcimCablesCreateParams, authInfo runti if err != nil { return nil, err } - return result.(*DcimCablesCreateCreated), nil - + success, ok := result.(*DcimCablesCreateCreated) + 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_cables_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimCablesDelete dcim cables delete API + DcimCablesDelete dcim cables delete API */ func (a *Client) DcimCablesDelete(params *DcimCablesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimCablesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -140,7 +583,7 @@ func (a *Client) DcimCablesDelete(params *DcimCablesDeleteParams, authInfo runti PathPattern: "/dcim/cables/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -150,12 +593,18 @@ func (a *Client) DcimCablesDelete(params *DcimCablesDeleteParams, authInfo runti if err != nil { return nil, err } - return result.(*DcimCablesDeleteNoContent), nil - + success, ok := result.(*DcimCablesDeleteNoContent) + 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_cables_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimCablesList Call to super to allow for caching + DcimCablesList Call to super to allow for caching */ func (a *Client) DcimCablesList(params *DcimCablesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimCablesListOK, error) { // TODO: Validate the params before sending @@ -169,7 +618,7 @@ func (a *Client) DcimCablesList(params *DcimCablesListParams, authInfo runtime.C PathPattern: "/dcim/cables/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -179,12 +628,18 @@ func (a *Client) DcimCablesList(params *DcimCablesListParams, authInfo runtime.C if err != nil { return nil, err } - return result.(*DcimCablesListOK), nil - + success, ok := result.(*DcimCablesListOK) + 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_cables_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimCablesPartialUpdate dcim cables partial update API + DcimCablesPartialUpdate dcim cables partial update API */ func (a *Client) DcimCablesPartialUpdate(params *DcimCablesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimCablesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -198,7 +653,7 @@ func (a *Client) DcimCablesPartialUpdate(params *DcimCablesPartialUpdateParams, PathPattern: "/dcim/cables/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -208,12 +663,18 @@ func (a *Client) DcimCablesPartialUpdate(params *DcimCablesPartialUpdateParams, if err != nil { return nil, err } - return result.(*DcimCablesPartialUpdateOK), nil - + success, ok := result.(*DcimCablesPartialUpdateOK) + 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_cables_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimCablesRead Call to super to allow for caching + DcimCablesRead Call to super to allow for caching */ func (a *Client) DcimCablesRead(params *DcimCablesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimCablesReadOK, error) { // TODO: Validate the params before sending @@ -227,7 +688,7 @@ func (a *Client) DcimCablesRead(params *DcimCablesReadParams, authInfo runtime.C PathPattern: "/dcim/cables/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -237,12 +698,18 @@ func (a *Client) DcimCablesRead(params *DcimCablesReadParams, authInfo runtime.C if err != nil { return nil, err } - return result.(*DcimCablesReadOK), nil - + success, ok := result.(*DcimCablesReadOK) + 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_cables_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimCablesUpdate dcim cables update API + DcimCablesUpdate dcim cables update API */ func (a *Client) DcimCablesUpdate(params *DcimCablesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimCablesUpdateOK, error) { // TODO: Validate the params before sending @@ -256,7 +723,7 @@ func (a *Client) DcimCablesUpdate(params *DcimCablesUpdateParams, authInfo runti PathPattern: "/dcim/cables/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -266,12 +733,18 @@ func (a *Client) DcimCablesUpdate(params *DcimCablesUpdateParams, authInfo runti if err != nil { return nil, err } - return result.(*DcimCablesUpdateOK), nil - + success, ok := result.(*DcimCablesUpdateOK) + 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_cables_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConnectedDeviceList This endpoint allows a user to determine what device (if any) is connected to a given peer device and peer + DcimConnectedDeviceList This endpoint allows a user to determine what device (if any) is connected to a given peer device and peer interface. This is useful in a situation where a device boots with no configuration, but can detect its neighbors via a protocol such as LLDP. Two query parameters must be included in the request: @@ -290,7 +763,7 @@ func (a *Client) DcimConnectedDeviceList(params *DcimConnectedDeviceListParams, PathPattern: "/dcim/connected-device/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConnectedDeviceListReader{formats: a.formats}, AuthInfo: authInfo, @@ -300,12 +773,18 @@ func (a *Client) DcimConnectedDeviceList(params *DcimConnectedDeviceListParams, if err != nil { return nil, err } - return result.(*DcimConnectedDeviceListOK), nil - + success, ok := result.(*DcimConnectedDeviceListOK) + 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_connected-device_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsoleConnectionsList dcim console connections list API + DcimConsoleConnectionsList dcim console connections list API */ func (a *Client) DcimConsoleConnectionsList(params *DcimConsoleConnectionsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleConnectionsListOK, error) { // TODO: Validate the params before sending @@ -319,7 +798,7 @@ func (a *Client) DcimConsoleConnectionsList(params *DcimConsoleConnectionsListPa PathPattern: "/dcim/console-connections/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleConnectionsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -329,12 +808,18 @@ func (a *Client) DcimConsoleConnectionsList(params *DcimConsoleConnectionsListPa if err != nil { return nil, err } - return result.(*DcimConsoleConnectionsListOK), nil - + 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) } /* -DcimConsolePortTemplatesCreate dcim console port templates create API + DcimConsolePortTemplatesCreate dcim console port templates create API */ func (a *Client) DcimConsolePortTemplatesCreate(params *DcimConsolePortTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesCreateCreated, error) { // TODO: Validate the params before sending @@ -348,7 +833,7 @@ func (a *Client) DcimConsolePortTemplatesCreate(params *DcimConsolePortTemplates PathPattern: "/dcim/console-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -358,12 +843,18 @@ func (a *Client) DcimConsolePortTemplatesCreate(params *DcimConsolePortTemplates if err != nil { return nil, err } - return result.(*DcimConsolePortTemplatesCreateCreated), nil - + success, ok := result.(*DcimConsolePortTemplatesCreateCreated) + 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-port-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsolePortTemplatesDelete dcim console port templates delete API + DcimConsolePortTemplatesDelete dcim console port templates delete API */ func (a *Client) DcimConsolePortTemplatesDelete(params *DcimConsolePortTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -377,7 +868,7 @@ func (a *Client) DcimConsolePortTemplatesDelete(params *DcimConsolePortTemplates PathPattern: "/dcim/console-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -387,12 +878,18 @@ func (a *Client) DcimConsolePortTemplatesDelete(params *DcimConsolePortTemplates if err != nil { return nil, err } - return result.(*DcimConsolePortTemplatesDeleteNoContent), nil - + success, ok := result.(*DcimConsolePortTemplatesDeleteNoContent) + 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-port-templates_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsolePortTemplatesList Call to super to allow for caching + DcimConsolePortTemplatesList Call to super to allow for caching */ func (a *Client) DcimConsolePortTemplatesList(params *DcimConsolePortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -406,7 +903,7 @@ func (a *Client) DcimConsolePortTemplatesList(params *DcimConsolePortTemplatesLi PathPattern: "/dcim/console-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -416,12 +913,18 @@ func (a *Client) DcimConsolePortTemplatesList(params *DcimConsolePortTemplatesLi if err != nil { return nil, err } - return result.(*DcimConsolePortTemplatesListOK), nil - + success, ok := result.(*DcimConsolePortTemplatesListOK) + 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-port-templates_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsolePortTemplatesPartialUpdate dcim console port templates partial update API + DcimConsolePortTemplatesPartialUpdate dcim console port templates partial update API */ func (a *Client) DcimConsolePortTemplatesPartialUpdate(params *DcimConsolePortTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -435,7 +938,7 @@ func (a *Client) DcimConsolePortTemplatesPartialUpdate(params *DcimConsolePortTe PathPattern: "/dcim/console-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -445,12 +948,18 @@ func (a *Client) DcimConsolePortTemplatesPartialUpdate(params *DcimConsolePortTe if err != nil { return nil, err } - return result.(*DcimConsolePortTemplatesPartialUpdateOK), nil - + success, ok := result.(*DcimConsolePortTemplatesPartialUpdateOK) + 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-port-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsolePortTemplatesRead Call to super to allow for caching + DcimConsolePortTemplatesRead Call to super to allow for caching */ func (a *Client) DcimConsolePortTemplatesRead(params *DcimConsolePortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -464,7 +973,7 @@ func (a *Client) DcimConsolePortTemplatesRead(params *DcimConsolePortTemplatesRe PathPattern: "/dcim/console-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -474,12 +983,18 @@ func (a *Client) DcimConsolePortTemplatesRead(params *DcimConsolePortTemplatesRe if err != nil { return nil, err } - return result.(*DcimConsolePortTemplatesReadOK), nil - + success, ok := result.(*DcimConsolePortTemplatesReadOK) + 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-port-templates_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsolePortTemplatesUpdate dcim console port templates update API + DcimConsolePortTemplatesUpdate dcim console port templates update API */ func (a *Client) DcimConsolePortTemplatesUpdate(params *DcimConsolePortTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesUpdateOK, error) { // TODO: Validate the params before sending @@ -493,7 +1008,7 @@ func (a *Client) DcimConsolePortTemplatesUpdate(params *DcimConsolePortTemplates PathPattern: "/dcim/console-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -503,12 +1018,18 @@ func (a *Client) DcimConsolePortTemplatesUpdate(params *DcimConsolePortTemplates if err != nil { return nil, err } - return result.(*DcimConsolePortTemplatesUpdateOK), nil - + success, ok := result.(*DcimConsolePortTemplatesUpdateOK) + 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-port-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsolePortsCreate dcim console ports create API + DcimConsolePortsCreate dcim console ports create API */ func (a *Client) DcimConsolePortsCreate(params *DcimConsolePortsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsCreateCreated, error) { // TODO: Validate the params before sending @@ -522,7 +1043,7 @@ func (a *Client) DcimConsolePortsCreate(params *DcimConsolePortsCreateParams, au PathPattern: "/dcim/console-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -532,12 +1053,18 @@ func (a *Client) DcimConsolePortsCreate(params *DcimConsolePortsCreateParams, au if err != nil { return nil, err } - return result.(*DcimConsolePortsCreateCreated), nil - + success, ok := result.(*DcimConsolePortsCreateCreated) + 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-ports_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsolePortsDelete dcim console ports delete API + DcimConsolePortsDelete dcim console ports delete API */ func (a *Client) DcimConsolePortsDelete(params *DcimConsolePortsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -551,7 +1078,7 @@ func (a *Client) DcimConsolePortsDelete(params *DcimConsolePortsDeleteParams, au PathPattern: "/dcim/console-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -561,12 +1088,18 @@ func (a *Client) DcimConsolePortsDelete(params *DcimConsolePortsDeleteParams, au if err != nil { return nil, err } - return result.(*DcimConsolePortsDeleteNoContent), nil - + success, ok := result.(*DcimConsolePortsDeleteNoContent) + 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-ports_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsolePortsList Call to super to allow for caching + DcimConsolePortsList Call to super to allow for caching */ func (a *Client) DcimConsolePortsList(params *DcimConsolePortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsListOK, error) { // TODO: Validate the params before sending @@ -580,7 +1113,7 @@ func (a *Client) DcimConsolePortsList(params *DcimConsolePortsListParams, authIn PathPattern: "/dcim/console-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -590,12 +1123,18 @@ func (a *Client) DcimConsolePortsList(params *DcimConsolePortsListParams, authIn if err != nil { return nil, err } - return result.(*DcimConsolePortsListOK), nil - + success, ok := result.(*DcimConsolePortsListOK) + 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-ports_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsolePortsPartialUpdate dcim console ports partial update API + DcimConsolePortsPartialUpdate dcim console ports partial update API */ func (a *Client) DcimConsolePortsPartialUpdate(params *DcimConsolePortsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -609,7 +1148,7 @@ func (a *Client) DcimConsolePortsPartialUpdate(params *DcimConsolePortsPartialUp PathPattern: "/dcim/console-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -619,12 +1158,18 @@ func (a *Client) DcimConsolePortsPartialUpdate(params *DcimConsolePortsPartialUp if err != nil { return nil, err } - return result.(*DcimConsolePortsPartialUpdateOK), nil - + success, ok := result.(*DcimConsolePortsPartialUpdateOK) + 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-ports_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsolePortsRead Call to super to allow for caching + DcimConsolePortsRead Call to super to allow for caching */ func (a *Client) DcimConsolePortsRead(params *DcimConsolePortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsReadOK, error) { // TODO: Validate the params before sending @@ -638,7 +1183,7 @@ func (a *Client) DcimConsolePortsRead(params *DcimConsolePortsReadParams, authIn PathPattern: "/dcim/console-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -648,12 +1193,18 @@ func (a *Client) DcimConsolePortsRead(params *DcimConsolePortsReadParams, authIn if err != nil { return nil, err } - return result.(*DcimConsolePortsReadOK), nil - + success, ok := result.(*DcimConsolePortsReadOK) + 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-ports_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsolePortsTrace Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination). + DcimConsolePortsTrace Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination). */ func (a *Client) DcimConsolePortsTrace(params *DcimConsolePortsTraceParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsTraceOK, error) { // TODO: Validate the params before sending @@ -667,7 +1218,7 @@ func (a *Client) DcimConsolePortsTrace(params *DcimConsolePortsTraceParams, auth PathPattern: "/dcim/console-ports/{id}/trace/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsTraceReader{formats: a.formats}, AuthInfo: authInfo, @@ -677,12 +1228,18 @@ func (a *Client) DcimConsolePortsTrace(params *DcimConsolePortsTraceParams, auth if err != nil { return nil, err } - return result.(*DcimConsolePortsTraceOK), nil - + success, ok := result.(*DcimConsolePortsTraceOK) + 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-ports_trace: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsolePortsUpdate dcim console ports update API + DcimConsolePortsUpdate dcim console ports update API */ func (a *Client) DcimConsolePortsUpdate(params *DcimConsolePortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsUpdateOK, error) { // TODO: Validate the params before sending @@ -696,7 +1253,7 @@ func (a *Client) DcimConsolePortsUpdate(params *DcimConsolePortsUpdateParams, au PathPattern: "/dcim/console-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -706,12 +1263,18 @@ func (a *Client) DcimConsolePortsUpdate(params *DcimConsolePortsUpdateParams, au if err != nil { return nil, err } - return result.(*DcimConsolePortsUpdateOK), nil - + success, ok := result.(*DcimConsolePortsUpdateOK) + 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-ports_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsoleServerPortTemplatesCreate dcim console server port templates create API + DcimConsoleServerPortTemplatesCreate dcim console server port templates create API */ func (a *Client) DcimConsoleServerPortTemplatesCreate(params *DcimConsoleServerPortTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesCreateCreated, error) { // TODO: Validate the params before sending @@ -725,7 +1288,7 @@ func (a *Client) DcimConsoleServerPortTemplatesCreate(params *DcimConsoleServerP PathPattern: "/dcim/console-server-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -735,12 +1298,18 @@ func (a *Client) DcimConsoleServerPortTemplatesCreate(params *DcimConsoleServerP if err != nil { return nil, err } - return result.(*DcimConsoleServerPortTemplatesCreateCreated), nil - + success, ok := result.(*DcimConsoleServerPortTemplatesCreateCreated) + 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-server-port-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsoleServerPortTemplatesDelete dcim console server port templates delete API + DcimConsoleServerPortTemplatesDelete dcim console server port templates delete API */ func (a *Client) DcimConsoleServerPortTemplatesDelete(params *DcimConsoleServerPortTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -754,7 +1323,7 @@ func (a *Client) DcimConsoleServerPortTemplatesDelete(params *DcimConsoleServerP PathPattern: "/dcim/console-server-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -764,12 +1333,18 @@ func (a *Client) DcimConsoleServerPortTemplatesDelete(params *DcimConsoleServerP if err != nil { return nil, err } - return result.(*DcimConsoleServerPortTemplatesDeleteNoContent), nil - + success, ok := result.(*DcimConsoleServerPortTemplatesDeleteNoContent) + 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-server-port-templates_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsoleServerPortTemplatesList Call to super to allow for caching + DcimConsoleServerPortTemplatesList Call to super to allow for caching */ func (a *Client) DcimConsoleServerPortTemplatesList(params *DcimConsoleServerPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -783,7 +1358,7 @@ func (a *Client) DcimConsoleServerPortTemplatesList(params *DcimConsoleServerPor PathPattern: "/dcim/console-server-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -793,12 +1368,18 @@ func (a *Client) DcimConsoleServerPortTemplatesList(params *DcimConsoleServerPor if err != nil { return nil, err } - return result.(*DcimConsoleServerPortTemplatesListOK), nil - + success, ok := result.(*DcimConsoleServerPortTemplatesListOK) + 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-server-port-templates_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsoleServerPortTemplatesPartialUpdate dcim console server port templates partial update API + DcimConsoleServerPortTemplatesPartialUpdate dcim console server port templates partial update API */ func (a *Client) DcimConsoleServerPortTemplatesPartialUpdate(params *DcimConsoleServerPortTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -812,7 +1393,7 @@ func (a *Client) DcimConsoleServerPortTemplatesPartialUpdate(params *DcimConsole PathPattern: "/dcim/console-server-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -822,12 +1403,18 @@ func (a *Client) DcimConsoleServerPortTemplatesPartialUpdate(params *DcimConsole if err != nil { return nil, err } - return result.(*DcimConsoleServerPortTemplatesPartialUpdateOK), nil - + success, ok := result.(*DcimConsoleServerPortTemplatesPartialUpdateOK) + 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-server-port-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsoleServerPortTemplatesRead Call to super to allow for caching + DcimConsoleServerPortTemplatesRead Call to super to allow for caching */ func (a *Client) DcimConsoleServerPortTemplatesRead(params *DcimConsoleServerPortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -841,7 +1428,7 @@ func (a *Client) DcimConsoleServerPortTemplatesRead(params *DcimConsoleServerPor PathPattern: "/dcim/console-server-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -851,12 +1438,18 @@ func (a *Client) DcimConsoleServerPortTemplatesRead(params *DcimConsoleServerPor if err != nil { return nil, err } - return result.(*DcimConsoleServerPortTemplatesReadOK), nil - + success, ok := result.(*DcimConsoleServerPortTemplatesReadOK) + 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-server-port-templates_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsoleServerPortTemplatesUpdate dcim console server port templates update API + DcimConsoleServerPortTemplatesUpdate dcim console server port templates update API */ func (a *Client) DcimConsoleServerPortTemplatesUpdate(params *DcimConsoleServerPortTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesUpdateOK, error) { // TODO: Validate the params before sending @@ -870,7 +1463,7 @@ func (a *Client) DcimConsoleServerPortTemplatesUpdate(params *DcimConsoleServerP PathPattern: "/dcim/console-server-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -880,12 +1473,18 @@ func (a *Client) DcimConsoleServerPortTemplatesUpdate(params *DcimConsoleServerP if err != nil { return nil, err } - return result.(*DcimConsoleServerPortTemplatesUpdateOK), nil - + success, ok := result.(*DcimConsoleServerPortTemplatesUpdateOK) + 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-server-port-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsoleServerPortsCreate dcim console server ports create API + DcimConsoleServerPortsCreate dcim console server ports create API */ func (a *Client) DcimConsoleServerPortsCreate(params *DcimConsoleServerPortsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsCreateCreated, error) { // TODO: Validate the params before sending @@ -899,7 +1498,7 @@ func (a *Client) DcimConsoleServerPortsCreate(params *DcimConsoleServerPortsCrea PathPattern: "/dcim/console-server-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -909,12 +1508,18 @@ func (a *Client) DcimConsoleServerPortsCreate(params *DcimConsoleServerPortsCrea if err != nil { return nil, err } - return result.(*DcimConsoleServerPortsCreateCreated), nil - + success, ok := result.(*DcimConsoleServerPortsCreateCreated) + 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-server-ports_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsoleServerPortsDelete dcim console server ports delete API + DcimConsoleServerPortsDelete dcim console server ports delete API */ func (a *Client) DcimConsoleServerPortsDelete(params *DcimConsoleServerPortsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -928,7 +1533,7 @@ func (a *Client) DcimConsoleServerPortsDelete(params *DcimConsoleServerPortsDele PathPattern: "/dcim/console-server-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -938,12 +1543,18 @@ func (a *Client) DcimConsoleServerPortsDelete(params *DcimConsoleServerPortsDele if err != nil { return nil, err } - return result.(*DcimConsoleServerPortsDeleteNoContent), nil - + success, ok := result.(*DcimConsoleServerPortsDeleteNoContent) + 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-server-ports_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsoleServerPortsList Call to super to allow for caching + DcimConsoleServerPortsList Call to super to allow for caching */ func (a *Client) DcimConsoleServerPortsList(params *DcimConsoleServerPortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsListOK, error) { // TODO: Validate the params before sending @@ -957,7 +1568,7 @@ func (a *Client) DcimConsoleServerPortsList(params *DcimConsoleServerPortsListPa PathPattern: "/dcim/console-server-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -967,12 +1578,18 @@ func (a *Client) DcimConsoleServerPortsList(params *DcimConsoleServerPortsListPa if err != nil { return nil, err } - return result.(*DcimConsoleServerPortsListOK), nil - + success, ok := result.(*DcimConsoleServerPortsListOK) + 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-server-ports_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsoleServerPortsPartialUpdate dcim console server ports partial update API + DcimConsoleServerPortsPartialUpdate dcim console server ports partial update API */ func (a *Client) DcimConsoleServerPortsPartialUpdate(params *DcimConsoleServerPortsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -986,7 +1603,7 @@ func (a *Client) DcimConsoleServerPortsPartialUpdate(params *DcimConsoleServerPo PathPattern: "/dcim/console-server-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -996,12 +1613,18 @@ func (a *Client) DcimConsoleServerPortsPartialUpdate(params *DcimConsoleServerPo if err != nil { return nil, err } - return result.(*DcimConsoleServerPortsPartialUpdateOK), nil - + success, ok := result.(*DcimConsoleServerPortsPartialUpdateOK) + 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-server-ports_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsoleServerPortsRead Call to super to allow for caching + DcimConsoleServerPortsRead Call to super to allow for caching */ func (a *Client) DcimConsoleServerPortsRead(params *DcimConsoleServerPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsReadOK, error) { // TODO: Validate the params before sending @@ -1015,7 +1638,7 @@ func (a *Client) DcimConsoleServerPortsRead(params *DcimConsoleServerPortsReadPa PathPattern: "/dcim/console-server-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1025,12 +1648,18 @@ func (a *Client) DcimConsoleServerPortsRead(params *DcimConsoleServerPortsReadPa if err != nil { return nil, err } - return result.(*DcimConsoleServerPortsReadOK), nil - + success, ok := result.(*DcimConsoleServerPortsReadOK) + 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-server-ports_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsoleServerPortsTrace Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination). + DcimConsoleServerPortsTrace Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination). */ func (a *Client) DcimConsoleServerPortsTrace(params *DcimConsoleServerPortsTraceParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsTraceOK, error) { // TODO: Validate the params before sending @@ -1044,7 +1673,7 @@ func (a *Client) DcimConsoleServerPortsTrace(params *DcimConsoleServerPortsTrace PathPattern: "/dcim/console-server-ports/{id}/trace/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsTraceReader{formats: a.formats}, AuthInfo: authInfo, @@ -1054,12 +1683,18 @@ func (a *Client) DcimConsoleServerPortsTrace(params *DcimConsoleServerPortsTrace if err != nil { return nil, err } - return result.(*DcimConsoleServerPortsTraceOK), nil - + success, ok := result.(*DcimConsoleServerPortsTraceOK) + 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-server-ports_trace: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimConsoleServerPortsUpdate dcim console server ports update API + DcimConsoleServerPortsUpdate dcim console server ports update API */ func (a *Client) DcimConsoleServerPortsUpdate(params *DcimConsoleServerPortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsUpdateOK, error) { // TODO: Validate the params before sending @@ -1073,7 +1708,7 @@ func (a *Client) DcimConsoleServerPortsUpdate(params *DcimConsoleServerPortsUpda PathPattern: "/dcim/console-server-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1083,12 +1718,18 @@ func (a *Client) DcimConsoleServerPortsUpdate(params *DcimConsoleServerPortsUpda if err != nil { return nil, err } - return result.(*DcimConsoleServerPortsUpdateOK), nil - + success, ok := result.(*DcimConsoleServerPortsUpdateOK) + 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-server-ports_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceBayTemplatesCreate dcim device bay templates create API + DcimDeviceBayTemplatesCreate dcim device bay templates create API */ func (a *Client) DcimDeviceBayTemplatesCreate(params *DcimDeviceBayTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesCreateCreated, error) { // TODO: Validate the params before sending @@ -1102,7 +1743,7 @@ func (a *Client) DcimDeviceBayTemplatesCreate(params *DcimDeviceBayTemplatesCrea PathPattern: "/dcim/device-bay-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1112,12 +1753,18 @@ func (a *Client) DcimDeviceBayTemplatesCreate(params *DcimDeviceBayTemplatesCrea if err != nil { return nil, err } - return result.(*DcimDeviceBayTemplatesCreateCreated), nil - + success, ok := result.(*DcimDeviceBayTemplatesCreateCreated) + 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_device-bay-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceBayTemplatesDelete dcim device bay templates delete API + DcimDeviceBayTemplatesDelete dcim device bay templates delete API */ func (a *Client) DcimDeviceBayTemplatesDelete(params *DcimDeviceBayTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -1131,7 +1778,7 @@ func (a *Client) DcimDeviceBayTemplatesDelete(params *DcimDeviceBayTemplatesDele PathPattern: "/dcim/device-bay-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1141,12 +1788,18 @@ func (a *Client) DcimDeviceBayTemplatesDelete(params *DcimDeviceBayTemplatesDele if err != nil { return nil, err } - return result.(*DcimDeviceBayTemplatesDeleteNoContent), nil - + success, ok := result.(*DcimDeviceBayTemplatesDeleteNoContent) + 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_device-bay-templates_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceBayTemplatesList Call to super to allow for caching + DcimDeviceBayTemplatesList Call to super to allow for caching */ func (a *Client) DcimDeviceBayTemplatesList(params *DcimDeviceBayTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesListOK, error) { // TODO: Validate the params before sending @@ -1160,7 +1813,7 @@ func (a *Client) DcimDeviceBayTemplatesList(params *DcimDeviceBayTemplatesListPa PathPattern: "/dcim/device-bay-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1170,12 +1823,18 @@ func (a *Client) DcimDeviceBayTemplatesList(params *DcimDeviceBayTemplatesListPa if err != nil { return nil, err } - return result.(*DcimDeviceBayTemplatesListOK), nil - + success, ok := result.(*DcimDeviceBayTemplatesListOK) + 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_device-bay-templates_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceBayTemplatesPartialUpdate dcim device bay templates partial update API + DcimDeviceBayTemplatesPartialUpdate dcim device bay templates partial update API */ func (a *Client) DcimDeviceBayTemplatesPartialUpdate(params *DcimDeviceBayTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -1189,7 +1848,7 @@ func (a *Client) DcimDeviceBayTemplatesPartialUpdate(params *DcimDeviceBayTempla PathPattern: "/dcim/device-bay-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1199,12 +1858,18 @@ func (a *Client) DcimDeviceBayTemplatesPartialUpdate(params *DcimDeviceBayTempla if err != nil { return nil, err } - return result.(*DcimDeviceBayTemplatesPartialUpdateOK), nil - + success, ok := result.(*DcimDeviceBayTemplatesPartialUpdateOK) + 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_device-bay-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceBayTemplatesRead Call to super to allow for caching + DcimDeviceBayTemplatesRead Call to super to allow for caching */ func (a *Client) DcimDeviceBayTemplatesRead(params *DcimDeviceBayTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -1218,7 +1883,7 @@ func (a *Client) DcimDeviceBayTemplatesRead(params *DcimDeviceBayTemplatesReadPa PathPattern: "/dcim/device-bay-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1228,12 +1893,18 @@ func (a *Client) DcimDeviceBayTemplatesRead(params *DcimDeviceBayTemplatesReadPa if err != nil { return nil, err } - return result.(*DcimDeviceBayTemplatesReadOK), nil - + success, ok := result.(*DcimDeviceBayTemplatesReadOK) + 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_device-bay-templates_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceBayTemplatesUpdate dcim device bay templates update API + DcimDeviceBayTemplatesUpdate dcim device bay templates update API */ func (a *Client) DcimDeviceBayTemplatesUpdate(params *DcimDeviceBayTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesUpdateOK, error) { // TODO: Validate the params before sending @@ -1247,7 +1918,7 @@ func (a *Client) DcimDeviceBayTemplatesUpdate(params *DcimDeviceBayTemplatesUpda PathPattern: "/dcim/device-bay-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1257,12 +1928,18 @@ func (a *Client) DcimDeviceBayTemplatesUpdate(params *DcimDeviceBayTemplatesUpda if err != nil { return nil, err } - return result.(*DcimDeviceBayTemplatesUpdateOK), nil - + success, ok := result.(*DcimDeviceBayTemplatesUpdateOK) + 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_device-bay-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceBaysCreate dcim device bays create API + DcimDeviceBaysCreate dcim device bays create API */ func (a *Client) DcimDeviceBaysCreate(params *DcimDeviceBaysCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysCreateCreated, error) { // TODO: Validate the params before sending @@ -1276,7 +1953,7 @@ func (a *Client) DcimDeviceBaysCreate(params *DcimDeviceBaysCreateParams, authIn PathPattern: "/dcim/device-bays/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1286,12 +1963,18 @@ func (a *Client) DcimDeviceBaysCreate(params *DcimDeviceBaysCreateParams, authIn if err != nil { return nil, err } - return result.(*DcimDeviceBaysCreateCreated), nil - + success, ok := result.(*DcimDeviceBaysCreateCreated) + 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_device-bays_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceBaysDelete dcim device bays delete API + DcimDeviceBaysDelete dcim device bays delete API */ func (a *Client) DcimDeviceBaysDelete(params *DcimDeviceBaysDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysDeleteNoContent, error) { // TODO: Validate the params before sending @@ -1305,7 +1988,7 @@ func (a *Client) DcimDeviceBaysDelete(params *DcimDeviceBaysDeleteParams, authIn PathPattern: "/dcim/device-bays/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1315,12 +1998,18 @@ func (a *Client) DcimDeviceBaysDelete(params *DcimDeviceBaysDeleteParams, authIn if err != nil { return nil, err } - return result.(*DcimDeviceBaysDeleteNoContent), nil - + success, ok := result.(*DcimDeviceBaysDeleteNoContent) + 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_device-bays_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceBaysList Call to super to allow for caching + DcimDeviceBaysList Call to super to allow for caching */ func (a *Client) DcimDeviceBaysList(params *DcimDeviceBaysListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysListOK, error) { // TODO: Validate the params before sending @@ -1334,7 +2023,7 @@ func (a *Client) DcimDeviceBaysList(params *DcimDeviceBaysListParams, authInfo r PathPattern: "/dcim/device-bays/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1344,12 +2033,18 @@ func (a *Client) DcimDeviceBaysList(params *DcimDeviceBaysListParams, authInfo r if err != nil { return nil, err } - return result.(*DcimDeviceBaysListOK), nil - + success, ok := result.(*DcimDeviceBaysListOK) + 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_device-bays_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceBaysPartialUpdate dcim device bays partial update API + DcimDeviceBaysPartialUpdate dcim device bays partial update API */ func (a *Client) DcimDeviceBaysPartialUpdate(params *DcimDeviceBaysPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -1363,7 +2058,7 @@ func (a *Client) DcimDeviceBaysPartialUpdate(params *DcimDeviceBaysPartialUpdate PathPattern: "/dcim/device-bays/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1373,12 +2068,18 @@ func (a *Client) DcimDeviceBaysPartialUpdate(params *DcimDeviceBaysPartialUpdate if err != nil { return nil, err } - return result.(*DcimDeviceBaysPartialUpdateOK), nil - + success, ok := result.(*DcimDeviceBaysPartialUpdateOK) + 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_device-bays_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceBaysRead Call to super to allow for caching + DcimDeviceBaysRead Call to super to allow for caching */ func (a *Client) DcimDeviceBaysRead(params *DcimDeviceBaysReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysReadOK, error) { // TODO: Validate the params before sending @@ -1392,7 +2093,7 @@ func (a *Client) DcimDeviceBaysRead(params *DcimDeviceBaysReadParams, authInfo r PathPattern: "/dcim/device-bays/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1402,12 +2103,18 @@ func (a *Client) DcimDeviceBaysRead(params *DcimDeviceBaysReadParams, authInfo r if err != nil { return nil, err } - return result.(*DcimDeviceBaysReadOK), nil - + success, ok := result.(*DcimDeviceBaysReadOK) + 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_device-bays_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceBaysUpdate dcim device bays update API + DcimDeviceBaysUpdate dcim device bays update API */ func (a *Client) DcimDeviceBaysUpdate(params *DcimDeviceBaysUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysUpdateOK, error) { // TODO: Validate the params before sending @@ -1421,7 +2128,7 @@ func (a *Client) DcimDeviceBaysUpdate(params *DcimDeviceBaysUpdateParams, authIn PathPattern: "/dcim/device-bays/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1431,12 +2138,18 @@ func (a *Client) DcimDeviceBaysUpdate(params *DcimDeviceBaysUpdateParams, authIn if err != nil { return nil, err } - return result.(*DcimDeviceBaysUpdateOK), nil - + success, ok := result.(*DcimDeviceBaysUpdateOK) + 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_device-bays_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceRolesCreate dcim device roles create API + DcimDeviceRolesCreate dcim device roles create API */ func (a *Client) DcimDeviceRolesCreate(params *DcimDeviceRolesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesCreateCreated, error) { // TODO: Validate the params before sending @@ -1450,7 +2163,7 @@ func (a *Client) DcimDeviceRolesCreate(params *DcimDeviceRolesCreateParams, auth PathPattern: "/dcim/device-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1460,12 +2173,18 @@ func (a *Client) DcimDeviceRolesCreate(params *DcimDeviceRolesCreateParams, auth if err != nil { return nil, err } - return result.(*DcimDeviceRolesCreateCreated), nil - + success, ok := result.(*DcimDeviceRolesCreateCreated) + 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_device-roles_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceRolesDelete dcim device roles delete API + DcimDeviceRolesDelete dcim device roles delete API */ func (a *Client) DcimDeviceRolesDelete(params *DcimDeviceRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -1479,7 +2198,7 @@ func (a *Client) DcimDeviceRolesDelete(params *DcimDeviceRolesDeleteParams, auth PathPattern: "/dcim/device-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1489,12 +2208,18 @@ func (a *Client) DcimDeviceRolesDelete(params *DcimDeviceRolesDeleteParams, auth if err != nil { return nil, err } - return result.(*DcimDeviceRolesDeleteNoContent), nil - + success, ok := result.(*DcimDeviceRolesDeleteNoContent) + 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_device-roles_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceRolesList Call to super to allow for caching + DcimDeviceRolesList Call to super to allow for caching */ func (a *Client) DcimDeviceRolesList(params *DcimDeviceRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesListOK, error) { // TODO: Validate the params before sending @@ -1508,7 +2233,7 @@ func (a *Client) DcimDeviceRolesList(params *DcimDeviceRolesListParams, authInfo PathPattern: "/dcim/device-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1518,12 +2243,18 @@ func (a *Client) DcimDeviceRolesList(params *DcimDeviceRolesListParams, authInfo if err != nil { return nil, err } - return result.(*DcimDeviceRolesListOK), nil - + success, ok := result.(*DcimDeviceRolesListOK) + 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_device-roles_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceRolesPartialUpdate dcim device roles partial update API + DcimDeviceRolesPartialUpdate dcim device roles partial update API */ func (a *Client) DcimDeviceRolesPartialUpdate(params *DcimDeviceRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -1537,7 +2268,7 @@ func (a *Client) DcimDeviceRolesPartialUpdate(params *DcimDeviceRolesPartialUpda PathPattern: "/dcim/device-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1547,12 +2278,18 @@ func (a *Client) DcimDeviceRolesPartialUpdate(params *DcimDeviceRolesPartialUpda if err != nil { return nil, err } - return result.(*DcimDeviceRolesPartialUpdateOK), nil - + success, ok := result.(*DcimDeviceRolesPartialUpdateOK) + 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_device-roles_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceRolesRead Call to super to allow for caching + DcimDeviceRolesRead Call to super to allow for caching */ func (a *Client) DcimDeviceRolesRead(params *DcimDeviceRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesReadOK, error) { // TODO: Validate the params before sending @@ -1566,7 +2303,7 @@ func (a *Client) DcimDeviceRolesRead(params *DcimDeviceRolesReadParams, authInfo PathPattern: "/dcim/device-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1576,12 +2313,18 @@ func (a *Client) DcimDeviceRolesRead(params *DcimDeviceRolesReadParams, authInfo if err != nil { return nil, err } - return result.(*DcimDeviceRolesReadOK), nil - + success, ok := result.(*DcimDeviceRolesReadOK) + 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_device-roles_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceRolesUpdate dcim device roles update API + DcimDeviceRolesUpdate dcim device roles update API */ func (a *Client) DcimDeviceRolesUpdate(params *DcimDeviceRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesUpdateOK, error) { // TODO: Validate the params before sending @@ -1595,7 +2338,7 @@ func (a *Client) DcimDeviceRolesUpdate(params *DcimDeviceRolesUpdateParams, auth PathPattern: "/dcim/device-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1605,12 +2348,18 @@ func (a *Client) DcimDeviceRolesUpdate(params *DcimDeviceRolesUpdateParams, auth if err != nil { return nil, err } - return result.(*DcimDeviceRolesUpdateOK), nil - + success, ok := result.(*DcimDeviceRolesUpdateOK) + 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_device-roles_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceTypesCreate dcim device types create API + DcimDeviceTypesCreate dcim device types create API */ func (a *Client) DcimDeviceTypesCreate(params *DcimDeviceTypesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesCreateCreated, error) { // TODO: Validate the params before sending @@ -1624,7 +2373,7 @@ func (a *Client) DcimDeviceTypesCreate(params *DcimDeviceTypesCreateParams, auth PathPattern: "/dcim/device-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1634,12 +2383,18 @@ func (a *Client) DcimDeviceTypesCreate(params *DcimDeviceTypesCreateParams, auth if err != nil { return nil, err } - return result.(*DcimDeviceTypesCreateCreated), nil - + success, ok := result.(*DcimDeviceTypesCreateCreated) + 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_device-types_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceTypesDelete dcim device types delete API + DcimDeviceTypesDelete dcim device types delete API */ func (a *Client) DcimDeviceTypesDelete(params *DcimDeviceTypesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -1653,7 +2408,7 @@ func (a *Client) DcimDeviceTypesDelete(params *DcimDeviceTypesDeleteParams, auth PathPattern: "/dcim/device-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1663,12 +2418,18 @@ func (a *Client) DcimDeviceTypesDelete(params *DcimDeviceTypesDeleteParams, auth if err != nil { return nil, err } - return result.(*DcimDeviceTypesDeleteNoContent), nil - + success, ok := result.(*DcimDeviceTypesDeleteNoContent) + 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_device-types_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceTypesList Call to super to allow for caching + DcimDeviceTypesList Call to super to allow for caching */ func (a *Client) DcimDeviceTypesList(params *DcimDeviceTypesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesListOK, error) { // TODO: Validate the params before sending @@ -1682,7 +2443,7 @@ func (a *Client) DcimDeviceTypesList(params *DcimDeviceTypesListParams, authInfo PathPattern: "/dcim/device-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1692,12 +2453,18 @@ func (a *Client) DcimDeviceTypesList(params *DcimDeviceTypesListParams, authInfo if err != nil { return nil, err } - return result.(*DcimDeviceTypesListOK), nil - + success, ok := result.(*DcimDeviceTypesListOK) + 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_device-types_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceTypesPartialUpdate dcim device types partial update API + DcimDeviceTypesPartialUpdate dcim device types partial update API */ func (a *Client) DcimDeviceTypesPartialUpdate(params *DcimDeviceTypesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -1711,7 +2478,7 @@ func (a *Client) DcimDeviceTypesPartialUpdate(params *DcimDeviceTypesPartialUpda PathPattern: "/dcim/device-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1721,12 +2488,18 @@ func (a *Client) DcimDeviceTypesPartialUpdate(params *DcimDeviceTypesPartialUpda if err != nil { return nil, err } - return result.(*DcimDeviceTypesPartialUpdateOK), nil - + success, ok := result.(*DcimDeviceTypesPartialUpdateOK) + 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_device-types_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceTypesRead Call to super to allow for caching + DcimDeviceTypesRead Call to super to allow for caching */ func (a *Client) DcimDeviceTypesRead(params *DcimDeviceTypesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesReadOK, error) { // TODO: Validate the params before sending @@ -1740,7 +2513,7 @@ func (a *Client) DcimDeviceTypesRead(params *DcimDeviceTypesReadParams, authInfo PathPattern: "/dcim/device-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1750,12 +2523,18 @@ func (a *Client) DcimDeviceTypesRead(params *DcimDeviceTypesReadParams, authInfo if err != nil { return nil, err } - return result.(*DcimDeviceTypesReadOK), nil - + success, ok := result.(*DcimDeviceTypesReadOK) + 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_device-types_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDeviceTypesUpdate dcim device types update API + DcimDeviceTypesUpdate dcim device types update API */ func (a *Client) DcimDeviceTypesUpdate(params *DcimDeviceTypesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesUpdateOK, error) { // TODO: Validate the params before sending @@ -1769,7 +2548,7 @@ func (a *Client) DcimDeviceTypesUpdate(params *DcimDeviceTypesUpdateParams, auth PathPattern: "/dcim/device-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1779,12 +2558,18 @@ func (a *Client) DcimDeviceTypesUpdate(params *DcimDeviceTypesUpdateParams, auth if err != nil { return nil, err } - return result.(*DcimDeviceTypesUpdateOK), nil - + success, ok := result.(*DcimDeviceTypesUpdateOK) + 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_device-types_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDevicesCreate dcim devices create API + DcimDevicesCreate dcim devices create API */ func (a *Client) DcimDevicesCreate(params *DcimDevicesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesCreateCreated, error) { // TODO: Validate the params before sending @@ -1798,7 +2583,7 @@ func (a *Client) DcimDevicesCreate(params *DcimDevicesCreateParams, authInfo run PathPattern: "/dcim/devices/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1808,12 +2593,18 @@ func (a *Client) DcimDevicesCreate(params *DcimDevicesCreateParams, authInfo run if err != nil { return nil, err } - return result.(*DcimDevicesCreateCreated), nil - + success, ok := result.(*DcimDevicesCreateCreated) + 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_devices_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDevicesDelete dcim devices delete API + DcimDevicesDelete dcim devices delete API */ func (a *Client) DcimDevicesDelete(params *DcimDevicesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -1827,7 +2618,7 @@ func (a *Client) DcimDevicesDelete(params *DcimDevicesDeleteParams, authInfo run PathPattern: "/dcim/devices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1837,12 +2628,53 @@ func (a *Client) DcimDevicesDelete(params *DcimDevicesDeleteParams, authInfo run if err != nil { return nil, err } - return result.(*DcimDevicesDeleteNoContent), nil + success, ok := result.(*DcimDevicesDeleteNoContent) + 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_devices_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} +/* + DcimDevicesGraphs A convenience method for rendering graphs for a particular Device. +*/ +func (a *Client) DcimDevicesGraphs(params *DcimDevicesGraphsParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesGraphsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimDevicesGraphsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "dcim_devices_graphs", + Method: "GET", + PathPattern: "/dcim/devices/{id}/graphs/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimDevicesGraphsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DcimDevicesGraphsOK) + 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_devices_graphs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDevicesList Call to super to allow for caching + DcimDevicesList Call to super to allow for caching */ func (a *Client) DcimDevicesList(params *DcimDevicesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesListOK, error) { // TODO: Validate the params before sending @@ -1856,7 +2688,7 @@ func (a *Client) DcimDevicesList(params *DcimDevicesListParams, authInfo runtime PathPattern: "/dcim/devices/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1866,12 +2698,18 @@ func (a *Client) DcimDevicesList(params *DcimDevicesListParams, authInfo runtime if err != nil { return nil, err } - return result.(*DcimDevicesListOK), nil - + success, ok := result.(*DcimDevicesListOK) + 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_devices_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDevicesNapalm Execute a NAPALM method on a Device + DcimDevicesNapalm Execute a NAPALM method on a Device */ func (a *Client) DcimDevicesNapalm(params *DcimDevicesNapalmParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesNapalmOK, error) { // TODO: Validate the params before sending @@ -1885,7 +2723,7 @@ func (a *Client) DcimDevicesNapalm(params *DcimDevicesNapalmParams, authInfo run PathPattern: "/dcim/devices/{id}/napalm/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesNapalmReader{formats: a.formats}, AuthInfo: authInfo, @@ -1895,12 +2733,18 @@ func (a *Client) DcimDevicesNapalm(params *DcimDevicesNapalmParams, authInfo run if err != nil { return nil, err } - return result.(*DcimDevicesNapalmOK), nil - + success, ok := result.(*DcimDevicesNapalmOK) + 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_devices_napalm: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDevicesPartialUpdate dcim devices partial update API + DcimDevicesPartialUpdate dcim devices partial update API */ func (a *Client) DcimDevicesPartialUpdate(params *DcimDevicesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -1914,7 +2758,7 @@ func (a *Client) DcimDevicesPartialUpdate(params *DcimDevicesPartialUpdateParams PathPattern: "/dcim/devices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1924,12 +2768,18 @@ func (a *Client) DcimDevicesPartialUpdate(params *DcimDevicesPartialUpdateParams if err != nil { return nil, err } - return result.(*DcimDevicesPartialUpdateOK), nil - + success, ok := result.(*DcimDevicesPartialUpdateOK) + 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_devices_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDevicesRead Call to super to allow for caching + DcimDevicesRead Call to super to allow for caching */ func (a *Client) DcimDevicesRead(params *DcimDevicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesReadOK, error) { // TODO: Validate the params before sending @@ -1943,7 +2793,7 @@ func (a *Client) DcimDevicesRead(params *DcimDevicesReadParams, authInfo runtime PathPattern: "/dcim/devices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1953,12 +2803,18 @@ func (a *Client) DcimDevicesRead(params *DcimDevicesReadParams, authInfo runtime if err != nil { return nil, err } - return result.(*DcimDevicesReadOK), nil - + success, ok := result.(*DcimDevicesReadOK) + 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_devices_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimDevicesUpdate dcim devices update API + DcimDevicesUpdate dcim devices update API */ func (a *Client) DcimDevicesUpdate(params *DcimDevicesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesUpdateOK, error) { // TODO: Validate the params before sending @@ -1972,7 +2828,7 @@ func (a *Client) DcimDevicesUpdate(params *DcimDevicesUpdateParams, authInfo run PathPattern: "/dcim/devices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1982,12 +2838,18 @@ func (a *Client) DcimDevicesUpdate(params *DcimDevicesUpdateParams, authInfo run if err != nil { return nil, err } - return result.(*DcimDevicesUpdateOK), nil - + success, ok := result.(*DcimDevicesUpdateOK) + 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_devices_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimFrontPortTemplatesCreate dcim front port templates create API + DcimFrontPortTemplatesCreate dcim front port templates create API */ func (a *Client) DcimFrontPortTemplatesCreate(params *DcimFrontPortTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortTemplatesCreateCreated, error) { // TODO: Validate the params before sending @@ -2001,7 +2863,7 @@ func (a *Client) DcimFrontPortTemplatesCreate(params *DcimFrontPortTemplatesCrea PathPattern: "/dcim/front-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2011,12 +2873,18 @@ func (a *Client) DcimFrontPortTemplatesCreate(params *DcimFrontPortTemplatesCrea if err != nil { return nil, err } - return result.(*DcimFrontPortTemplatesCreateCreated), nil - + success, ok := result.(*DcimFrontPortTemplatesCreateCreated) + 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_front-port-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimFrontPortTemplatesDelete dcim front port templates delete API + DcimFrontPortTemplatesDelete dcim front port templates delete API */ func (a *Client) DcimFrontPortTemplatesDelete(params *DcimFrontPortTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortTemplatesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -2030,7 +2898,7 @@ func (a *Client) DcimFrontPortTemplatesDelete(params *DcimFrontPortTemplatesDele PathPattern: "/dcim/front-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2040,12 +2908,18 @@ func (a *Client) DcimFrontPortTemplatesDelete(params *DcimFrontPortTemplatesDele if err != nil { return nil, err } - return result.(*DcimFrontPortTemplatesDeleteNoContent), nil - + success, ok := result.(*DcimFrontPortTemplatesDeleteNoContent) + 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_front-port-templates_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimFrontPortTemplatesList Call to super to allow for caching + DcimFrontPortTemplatesList Call to super to allow for caching */ func (a *Client) DcimFrontPortTemplatesList(params *DcimFrontPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -2059,7 +2933,7 @@ func (a *Client) DcimFrontPortTemplatesList(params *DcimFrontPortTemplatesListPa PathPattern: "/dcim/front-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2069,12 +2943,18 @@ func (a *Client) DcimFrontPortTemplatesList(params *DcimFrontPortTemplatesListPa if err != nil { return nil, err } - return result.(*DcimFrontPortTemplatesListOK), nil - + success, ok := result.(*DcimFrontPortTemplatesListOK) + 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_front-port-templates_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimFrontPortTemplatesPartialUpdate dcim front port templates partial update API + DcimFrontPortTemplatesPartialUpdate dcim front port templates partial update API */ func (a *Client) DcimFrontPortTemplatesPartialUpdate(params *DcimFrontPortTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortTemplatesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -2088,7 +2968,7 @@ func (a *Client) DcimFrontPortTemplatesPartialUpdate(params *DcimFrontPortTempla PathPattern: "/dcim/front-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2098,12 +2978,18 @@ func (a *Client) DcimFrontPortTemplatesPartialUpdate(params *DcimFrontPortTempla if err != nil { return nil, err } - return result.(*DcimFrontPortTemplatesPartialUpdateOK), nil - + success, ok := result.(*DcimFrontPortTemplatesPartialUpdateOK) + 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_front-port-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimFrontPortTemplatesRead Call to super to allow for caching + DcimFrontPortTemplatesRead Call to super to allow for caching */ func (a *Client) DcimFrontPortTemplatesRead(params *DcimFrontPortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -2117,7 +3003,7 @@ func (a *Client) DcimFrontPortTemplatesRead(params *DcimFrontPortTemplatesReadPa PathPattern: "/dcim/front-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -2127,12 +3013,18 @@ func (a *Client) DcimFrontPortTemplatesRead(params *DcimFrontPortTemplatesReadPa if err != nil { return nil, err } - return result.(*DcimFrontPortTemplatesReadOK), nil - + success, ok := result.(*DcimFrontPortTemplatesReadOK) + 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_front-port-templates_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimFrontPortTemplatesUpdate dcim front port templates update API + DcimFrontPortTemplatesUpdate dcim front port templates update API */ func (a *Client) DcimFrontPortTemplatesUpdate(params *DcimFrontPortTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortTemplatesUpdateOK, error) { // TODO: Validate the params before sending @@ -2146,7 +3038,7 @@ func (a *Client) DcimFrontPortTemplatesUpdate(params *DcimFrontPortTemplatesUpda PathPattern: "/dcim/front-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2156,12 +3048,18 @@ func (a *Client) DcimFrontPortTemplatesUpdate(params *DcimFrontPortTemplatesUpda if err != nil { return nil, err } - return result.(*DcimFrontPortTemplatesUpdateOK), nil - + success, ok := result.(*DcimFrontPortTemplatesUpdateOK) + 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_front-port-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimFrontPortsCreate dcim front ports create API + DcimFrontPortsCreate dcim front ports create API */ func (a *Client) DcimFrontPortsCreate(params *DcimFrontPortsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsCreateCreated, error) { // TODO: Validate the params before sending @@ -2175,7 +3073,7 @@ func (a *Client) DcimFrontPortsCreate(params *DcimFrontPortsCreateParams, authIn PathPattern: "/dcim/front-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2185,12 +3083,18 @@ func (a *Client) DcimFrontPortsCreate(params *DcimFrontPortsCreateParams, authIn if err != nil { return nil, err } - return result.(*DcimFrontPortsCreateCreated), nil - + success, ok := result.(*DcimFrontPortsCreateCreated) + 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_front-ports_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimFrontPortsDelete dcim front ports delete API + DcimFrontPortsDelete dcim front ports delete API */ func (a *Client) DcimFrontPortsDelete(params *DcimFrontPortsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -2204,7 +3108,7 @@ func (a *Client) DcimFrontPortsDelete(params *DcimFrontPortsDeleteParams, authIn PathPattern: "/dcim/front-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2214,12 +3118,18 @@ func (a *Client) DcimFrontPortsDelete(params *DcimFrontPortsDeleteParams, authIn if err != nil { return nil, err } - return result.(*DcimFrontPortsDeleteNoContent), nil - + success, ok := result.(*DcimFrontPortsDeleteNoContent) + 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_front-ports_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimFrontPortsList Call to super to allow for caching + DcimFrontPortsList Call to super to allow for caching */ func (a *Client) DcimFrontPortsList(params *DcimFrontPortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsListOK, error) { // TODO: Validate the params before sending @@ -2233,7 +3143,7 @@ func (a *Client) DcimFrontPortsList(params *DcimFrontPortsListParams, authInfo r PathPattern: "/dcim/front-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2243,12 +3153,18 @@ func (a *Client) DcimFrontPortsList(params *DcimFrontPortsListParams, authInfo r if err != nil { return nil, err } - return result.(*DcimFrontPortsListOK), nil - + success, ok := result.(*DcimFrontPortsListOK) + 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_front-ports_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimFrontPortsPartialUpdate dcim front ports partial update API + DcimFrontPortsPartialUpdate dcim front ports partial update API */ func (a *Client) DcimFrontPortsPartialUpdate(params *DcimFrontPortsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -2262,7 +3178,7 @@ func (a *Client) DcimFrontPortsPartialUpdate(params *DcimFrontPortsPartialUpdate PathPattern: "/dcim/front-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2272,12 +3188,18 @@ func (a *Client) DcimFrontPortsPartialUpdate(params *DcimFrontPortsPartialUpdate if err != nil { return nil, err } - return result.(*DcimFrontPortsPartialUpdateOK), nil - + success, ok := result.(*DcimFrontPortsPartialUpdateOK) + 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_front-ports_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimFrontPortsRead Call to super to allow for caching + DcimFrontPortsRead Call to super to allow for caching */ func (a *Client) DcimFrontPortsRead(params *DcimFrontPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsReadOK, error) { // TODO: Validate the params before sending @@ -2291,7 +3213,7 @@ func (a *Client) DcimFrontPortsRead(params *DcimFrontPortsReadParams, authInfo r PathPattern: "/dcim/front-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -2301,12 +3223,18 @@ func (a *Client) DcimFrontPortsRead(params *DcimFrontPortsReadParams, authInfo r if err != nil { return nil, err } - return result.(*DcimFrontPortsReadOK), nil - + success, ok := result.(*DcimFrontPortsReadOK) + 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_front-ports_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimFrontPortsUpdate dcim front ports update API + DcimFrontPortsUpdate dcim front ports update API */ func (a *Client) DcimFrontPortsUpdate(params *DcimFrontPortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsUpdateOK, error) { // TODO: Validate the params before sending @@ -2320,7 +3248,7 @@ func (a *Client) DcimFrontPortsUpdate(params *DcimFrontPortsUpdateParams, authIn PathPattern: "/dcim/front-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2330,12 +3258,18 @@ func (a *Client) DcimFrontPortsUpdate(params *DcimFrontPortsUpdateParams, authIn if err != nil { return nil, err } - return result.(*DcimFrontPortsUpdateOK), nil - + success, ok := result.(*DcimFrontPortsUpdateOK) + 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_front-ports_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInterfaceConnectionsList dcim interface connections list API + DcimInterfaceConnectionsList dcim interface connections list API */ func (a *Client) DcimInterfaceConnectionsList(params *DcimInterfaceConnectionsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceConnectionsListOK, error) { // TODO: Validate the params before sending @@ -2349,7 +3283,7 @@ func (a *Client) DcimInterfaceConnectionsList(params *DcimInterfaceConnectionsLi PathPattern: "/dcim/interface-connections/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceConnectionsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2359,12 +3293,18 @@ func (a *Client) DcimInterfaceConnectionsList(params *DcimInterfaceConnectionsLi if err != nil { return nil, err } - return result.(*DcimInterfaceConnectionsListOK), nil - + 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) } /* -DcimInterfaceTemplatesCreate dcim interface templates create API + DcimInterfaceTemplatesCreate dcim interface templates create API */ func (a *Client) DcimInterfaceTemplatesCreate(params *DcimInterfaceTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesCreateCreated, error) { // TODO: Validate the params before sending @@ -2378,7 +3318,7 @@ func (a *Client) DcimInterfaceTemplatesCreate(params *DcimInterfaceTemplatesCrea PathPattern: "/dcim/interface-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2388,12 +3328,18 @@ func (a *Client) DcimInterfaceTemplatesCreate(params *DcimInterfaceTemplatesCrea if err != nil { return nil, err } - return result.(*DcimInterfaceTemplatesCreateCreated), nil - + success, ok := result.(*DcimInterfaceTemplatesCreateCreated) + 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-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInterfaceTemplatesDelete dcim interface templates delete API + DcimInterfaceTemplatesDelete dcim interface templates delete API */ func (a *Client) DcimInterfaceTemplatesDelete(params *DcimInterfaceTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -2407,7 +3353,7 @@ func (a *Client) DcimInterfaceTemplatesDelete(params *DcimInterfaceTemplatesDele PathPattern: "/dcim/interface-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2417,12 +3363,18 @@ func (a *Client) DcimInterfaceTemplatesDelete(params *DcimInterfaceTemplatesDele if err != nil { return nil, err } - return result.(*DcimInterfaceTemplatesDeleteNoContent), nil - + success, ok := result.(*DcimInterfaceTemplatesDeleteNoContent) + 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-templates_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInterfaceTemplatesList Call to super to allow for caching + DcimInterfaceTemplatesList Call to super to allow for caching */ func (a *Client) DcimInterfaceTemplatesList(params *DcimInterfaceTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesListOK, error) { // TODO: Validate the params before sending @@ -2436,7 +3388,7 @@ func (a *Client) DcimInterfaceTemplatesList(params *DcimInterfaceTemplatesListPa PathPattern: "/dcim/interface-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2446,12 +3398,18 @@ func (a *Client) DcimInterfaceTemplatesList(params *DcimInterfaceTemplatesListPa if err != nil { return nil, err } - return result.(*DcimInterfaceTemplatesListOK), nil - + success, ok := result.(*DcimInterfaceTemplatesListOK) + 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-templates_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInterfaceTemplatesPartialUpdate dcim interface templates partial update API + DcimInterfaceTemplatesPartialUpdate dcim interface templates partial update API */ func (a *Client) DcimInterfaceTemplatesPartialUpdate(params *DcimInterfaceTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -2465,7 +3423,7 @@ func (a *Client) DcimInterfaceTemplatesPartialUpdate(params *DcimInterfaceTempla PathPattern: "/dcim/interface-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2475,12 +3433,18 @@ func (a *Client) DcimInterfaceTemplatesPartialUpdate(params *DcimInterfaceTempla if err != nil { return nil, err } - return result.(*DcimInterfaceTemplatesPartialUpdateOK), nil - + success, ok := result.(*DcimInterfaceTemplatesPartialUpdateOK) + 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-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInterfaceTemplatesRead Call to super to allow for caching + DcimInterfaceTemplatesRead Call to super to allow for caching */ func (a *Client) DcimInterfaceTemplatesRead(params *DcimInterfaceTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -2494,7 +3458,7 @@ func (a *Client) DcimInterfaceTemplatesRead(params *DcimInterfaceTemplatesReadPa PathPattern: "/dcim/interface-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -2504,12 +3468,18 @@ func (a *Client) DcimInterfaceTemplatesRead(params *DcimInterfaceTemplatesReadPa if err != nil { return nil, err } - return result.(*DcimInterfaceTemplatesReadOK), nil - + success, ok := result.(*DcimInterfaceTemplatesReadOK) + 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-templates_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInterfaceTemplatesUpdate dcim interface templates update API + DcimInterfaceTemplatesUpdate dcim interface templates update API */ func (a *Client) DcimInterfaceTemplatesUpdate(params *DcimInterfaceTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesUpdateOK, error) { // TODO: Validate the params before sending @@ -2523,7 +3493,7 @@ func (a *Client) DcimInterfaceTemplatesUpdate(params *DcimInterfaceTemplatesUpda PathPattern: "/dcim/interface-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2533,12 +3503,18 @@ func (a *Client) DcimInterfaceTemplatesUpdate(params *DcimInterfaceTemplatesUpda if err != nil { return nil, err } - return result.(*DcimInterfaceTemplatesUpdateOK), nil - + success, ok := result.(*DcimInterfaceTemplatesUpdateOK) + 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-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInterfacesCreate dcim interfaces create API + DcimInterfacesCreate dcim interfaces create API */ func (a *Client) DcimInterfacesCreate(params *DcimInterfacesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesCreateCreated, error) { // TODO: Validate the params before sending @@ -2552,7 +3528,7 @@ func (a *Client) DcimInterfacesCreate(params *DcimInterfacesCreateParams, authIn PathPattern: "/dcim/interfaces/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2562,12 +3538,18 @@ func (a *Client) DcimInterfacesCreate(params *DcimInterfacesCreateParams, authIn if err != nil { return nil, err } - return result.(*DcimInterfacesCreateCreated), nil - + success, ok := result.(*DcimInterfacesCreateCreated) + 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_interfaces_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInterfacesDelete dcim interfaces delete API + DcimInterfacesDelete dcim interfaces delete API */ func (a *Client) DcimInterfacesDelete(params *DcimInterfacesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -2581,7 +3563,7 @@ func (a *Client) DcimInterfacesDelete(params *DcimInterfacesDeleteParams, authIn PathPattern: "/dcim/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2591,12 +3573,18 @@ func (a *Client) DcimInterfacesDelete(params *DcimInterfacesDeleteParams, authIn if err != nil { return nil, err } - return result.(*DcimInterfacesDeleteNoContent), nil - + success, ok := result.(*DcimInterfacesDeleteNoContent) + 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_interfaces_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInterfacesGraphs A convenience method for rendering graphs for a particular interface. + DcimInterfacesGraphs A convenience method for rendering graphs for a particular interface. */ func (a *Client) DcimInterfacesGraphs(params *DcimInterfacesGraphsParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesGraphsOK, error) { // TODO: Validate the params before sending @@ -2610,7 +3598,7 @@ func (a *Client) DcimInterfacesGraphs(params *DcimInterfacesGraphsParams, authIn PathPattern: "/dcim/interfaces/{id}/graphs/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesGraphsReader{formats: a.formats}, AuthInfo: authInfo, @@ -2620,12 +3608,18 @@ func (a *Client) DcimInterfacesGraphs(params *DcimInterfacesGraphsParams, authIn if err != nil { return nil, err } - return result.(*DcimInterfacesGraphsOK), nil - + success, ok := result.(*DcimInterfacesGraphsOK) + 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_interfaces_graphs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInterfacesList Call to super to allow for caching + DcimInterfacesList Call to super to allow for caching */ func (a *Client) DcimInterfacesList(params *DcimInterfacesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesListOK, error) { // TODO: Validate the params before sending @@ -2639,7 +3633,7 @@ func (a *Client) DcimInterfacesList(params *DcimInterfacesListParams, authInfo r PathPattern: "/dcim/interfaces/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2649,12 +3643,18 @@ func (a *Client) DcimInterfacesList(params *DcimInterfacesListParams, authInfo r if err != nil { return nil, err } - return result.(*DcimInterfacesListOK), nil - + success, ok := result.(*DcimInterfacesListOK) + 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_interfaces_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInterfacesPartialUpdate dcim interfaces partial update API + DcimInterfacesPartialUpdate dcim interfaces partial update API */ func (a *Client) DcimInterfacesPartialUpdate(params *DcimInterfacesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -2668,7 +3668,7 @@ func (a *Client) DcimInterfacesPartialUpdate(params *DcimInterfacesPartialUpdate PathPattern: "/dcim/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2678,12 +3678,18 @@ func (a *Client) DcimInterfacesPartialUpdate(params *DcimInterfacesPartialUpdate if err != nil { return nil, err } - return result.(*DcimInterfacesPartialUpdateOK), nil - + success, ok := result.(*DcimInterfacesPartialUpdateOK) + 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_interfaces_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInterfacesRead Call to super to allow for caching + DcimInterfacesRead Call to super to allow for caching */ func (a *Client) DcimInterfacesRead(params *DcimInterfacesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesReadOK, error) { // TODO: Validate the params before sending @@ -2697,7 +3703,7 @@ func (a *Client) DcimInterfacesRead(params *DcimInterfacesReadParams, authInfo r PathPattern: "/dcim/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -2707,12 +3713,18 @@ func (a *Client) DcimInterfacesRead(params *DcimInterfacesReadParams, authInfo r if err != nil { return nil, err } - return result.(*DcimInterfacesReadOK), nil - + success, ok := result.(*DcimInterfacesReadOK) + 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_interfaces_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInterfacesTrace Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination). + DcimInterfacesTrace Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination). */ func (a *Client) DcimInterfacesTrace(params *DcimInterfacesTraceParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesTraceOK, error) { // TODO: Validate the params before sending @@ -2726,7 +3738,7 @@ func (a *Client) DcimInterfacesTrace(params *DcimInterfacesTraceParams, authInfo PathPattern: "/dcim/interfaces/{id}/trace/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesTraceReader{formats: a.formats}, AuthInfo: authInfo, @@ -2736,12 +3748,18 @@ func (a *Client) DcimInterfacesTrace(params *DcimInterfacesTraceParams, authInfo if err != nil { return nil, err } - return result.(*DcimInterfacesTraceOK), nil - + success, ok := result.(*DcimInterfacesTraceOK) + 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_interfaces_trace: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInterfacesUpdate dcim interfaces update API + DcimInterfacesUpdate dcim interfaces update API */ func (a *Client) DcimInterfacesUpdate(params *DcimInterfacesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesUpdateOK, error) { // TODO: Validate the params before sending @@ -2755,7 +3773,7 @@ func (a *Client) DcimInterfacesUpdate(params *DcimInterfacesUpdateParams, authIn PathPattern: "/dcim/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2765,12 +3783,18 @@ func (a *Client) DcimInterfacesUpdate(params *DcimInterfacesUpdateParams, authIn if err != nil { return nil, err } - return result.(*DcimInterfacesUpdateOK), nil - + success, ok := result.(*DcimInterfacesUpdateOK) + 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_interfaces_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInventoryItemsCreate dcim inventory items create API + DcimInventoryItemsCreate dcim inventory items create API */ func (a *Client) DcimInventoryItemsCreate(params *DcimInventoryItemsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsCreateCreated, error) { // TODO: Validate the params before sending @@ -2784,7 +3808,7 @@ func (a *Client) DcimInventoryItemsCreate(params *DcimInventoryItemsCreateParams PathPattern: "/dcim/inventory-items/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInventoryItemsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2794,12 +3818,18 @@ func (a *Client) DcimInventoryItemsCreate(params *DcimInventoryItemsCreateParams if err != nil { return nil, err } - return result.(*DcimInventoryItemsCreateCreated), nil - + success, ok := result.(*DcimInventoryItemsCreateCreated) + 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_inventory-items_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInventoryItemsDelete dcim inventory items delete API + DcimInventoryItemsDelete dcim inventory items delete API */ func (a *Client) DcimInventoryItemsDelete(params *DcimInventoryItemsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -2813,7 +3843,7 @@ func (a *Client) DcimInventoryItemsDelete(params *DcimInventoryItemsDeleteParams PathPattern: "/dcim/inventory-items/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInventoryItemsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2823,12 +3853,18 @@ func (a *Client) DcimInventoryItemsDelete(params *DcimInventoryItemsDeleteParams if err != nil { return nil, err } - return result.(*DcimInventoryItemsDeleteNoContent), nil - + success, ok := result.(*DcimInventoryItemsDeleteNoContent) + 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_inventory-items_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInventoryItemsList Call to super to allow for caching + DcimInventoryItemsList Call to super to allow for caching */ func (a *Client) DcimInventoryItemsList(params *DcimInventoryItemsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsListOK, error) { // TODO: Validate the params before sending @@ -2842,7 +3878,7 @@ func (a *Client) DcimInventoryItemsList(params *DcimInventoryItemsListParams, au PathPattern: "/dcim/inventory-items/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInventoryItemsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2852,12 +3888,18 @@ func (a *Client) DcimInventoryItemsList(params *DcimInventoryItemsListParams, au if err != nil { return nil, err } - return result.(*DcimInventoryItemsListOK), nil - + success, ok := result.(*DcimInventoryItemsListOK) + 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_inventory-items_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInventoryItemsPartialUpdate dcim inventory items partial update API + DcimInventoryItemsPartialUpdate dcim inventory items partial update API */ func (a *Client) DcimInventoryItemsPartialUpdate(params *DcimInventoryItemsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -2871,7 +3913,7 @@ func (a *Client) DcimInventoryItemsPartialUpdate(params *DcimInventoryItemsParti PathPattern: "/dcim/inventory-items/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInventoryItemsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2881,12 +3923,18 @@ func (a *Client) DcimInventoryItemsPartialUpdate(params *DcimInventoryItemsParti if err != nil { return nil, err } - return result.(*DcimInventoryItemsPartialUpdateOK), nil - + success, ok := result.(*DcimInventoryItemsPartialUpdateOK) + 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_inventory-items_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInventoryItemsRead Call to super to allow for caching + DcimInventoryItemsRead Call to super to allow for caching */ func (a *Client) DcimInventoryItemsRead(params *DcimInventoryItemsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsReadOK, error) { // TODO: Validate the params before sending @@ -2900,7 +3948,7 @@ func (a *Client) DcimInventoryItemsRead(params *DcimInventoryItemsReadParams, au PathPattern: "/dcim/inventory-items/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInventoryItemsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -2910,12 +3958,18 @@ func (a *Client) DcimInventoryItemsRead(params *DcimInventoryItemsReadParams, au if err != nil { return nil, err } - return result.(*DcimInventoryItemsReadOK), nil - + success, ok := result.(*DcimInventoryItemsReadOK) + 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_inventory-items_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimInventoryItemsUpdate dcim inventory items update API + DcimInventoryItemsUpdate dcim inventory items update API */ func (a *Client) DcimInventoryItemsUpdate(params *DcimInventoryItemsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsUpdateOK, error) { // TODO: Validate the params before sending @@ -2929,7 +3983,7 @@ func (a *Client) DcimInventoryItemsUpdate(params *DcimInventoryItemsUpdateParams PathPattern: "/dcim/inventory-items/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInventoryItemsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2939,12 +3993,18 @@ func (a *Client) DcimInventoryItemsUpdate(params *DcimInventoryItemsUpdateParams if err != nil { return nil, err } - return result.(*DcimInventoryItemsUpdateOK), nil - + success, ok := result.(*DcimInventoryItemsUpdateOK) + 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_inventory-items_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimManufacturersCreate dcim manufacturers create API + DcimManufacturersCreate dcim manufacturers create API */ func (a *Client) DcimManufacturersCreate(params *DcimManufacturersCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersCreateCreated, error) { // TODO: Validate the params before sending @@ -2958,7 +4018,7 @@ func (a *Client) DcimManufacturersCreate(params *DcimManufacturersCreateParams, PathPattern: "/dcim/manufacturers/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimManufacturersCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2968,12 +4028,18 @@ func (a *Client) DcimManufacturersCreate(params *DcimManufacturersCreateParams, if err != nil { return nil, err } - return result.(*DcimManufacturersCreateCreated), nil - + success, ok := result.(*DcimManufacturersCreateCreated) + 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_manufacturers_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimManufacturersDelete dcim manufacturers delete API + DcimManufacturersDelete dcim manufacturers delete API */ func (a *Client) DcimManufacturersDelete(params *DcimManufacturersDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersDeleteNoContent, error) { // TODO: Validate the params before sending @@ -2987,7 +4053,7 @@ func (a *Client) DcimManufacturersDelete(params *DcimManufacturersDeleteParams, PathPattern: "/dcim/manufacturers/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimManufacturersDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2997,12 +4063,18 @@ func (a *Client) DcimManufacturersDelete(params *DcimManufacturersDeleteParams, if err != nil { return nil, err } - return result.(*DcimManufacturersDeleteNoContent), nil - + success, ok := result.(*DcimManufacturersDeleteNoContent) + 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_manufacturers_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimManufacturersList Call to super to allow for caching + DcimManufacturersList Call to super to allow for caching */ func (a *Client) DcimManufacturersList(params *DcimManufacturersListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersListOK, error) { // TODO: Validate the params before sending @@ -3016,7 +4088,7 @@ func (a *Client) DcimManufacturersList(params *DcimManufacturersListParams, auth PathPattern: "/dcim/manufacturers/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimManufacturersListReader{formats: a.formats}, AuthInfo: authInfo, @@ -3026,12 +4098,18 @@ func (a *Client) DcimManufacturersList(params *DcimManufacturersListParams, auth if err != nil { return nil, err } - return result.(*DcimManufacturersListOK), nil - + success, ok := result.(*DcimManufacturersListOK) + 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_manufacturers_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimManufacturersPartialUpdate dcim manufacturers partial update API + DcimManufacturersPartialUpdate dcim manufacturers partial update API */ func (a *Client) DcimManufacturersPartialUpdate(params *DcimManufacturersPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -3045,7 +4123,7 @@ func (a *Client) DcimManufacturersPartialUpdate(params *DcimManufacturersPartial PathPattern: "/dcim/manufacturers/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimManufacturersPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3055,12 +4133,18 @@ func (a *Client) DcimManufacturersPartialUpdate(params *DcimManufacturersPartial if err != nil { return nil, err } - return result.(*DcimManufacturersPartialUpdateOK), nil - + success, ok := result.(*DcimManufacturersPartialUpdateOK) + 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_manufacturers_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimManufacturersRead Call to super to allow for caching + DcimManufacturersRead Call to super to allow for caching */ func (a *Client) DcimManufacturersRead(params *DcimManufacturersReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersReadOK, error) { // TODO: Validate the params before sending @@ -3074,7 +4158,7 @@ func (a *Client) DcimManufacturersRead(params *DcimManufacturersReadParams, auth PathPattern: "/dcim/manufacturers/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimManufacturersReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -3084,12 +4168,18 @@ func (a *Client) DcimManufacturersRead(params *DcimManufacturersReadParams, auth if err != nil { return nil, err } - return result.(*DcimManufacturersReadOK), nil - + success, ok := result.(*DcimManufacturersReadOK) + 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_manufacturers_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimManufacturersUpdate dcim manufacturers update API + DcimManufacturersUpdate dcim manufacturers update API */ func (a *Client) DcimManufacturersUpdate(params *DcimManufacturersUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersUpdateOK, error) { // TODO: Validate the params before sending @@ -3103,7 +4193,7 @@ func (a *Client) DcimManufacturersUpdate(params *DcimManufacturersUpdateParams, PathPattern: "/dcim/manufacturers/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimManufacturersUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3113,12 +4203,18 @@ func (a *Client) DcimManufacturersUpdate(params *DcimManufacturersUpdateParams, if err != nil { return nil, err } - return result.(*DcimManufacturersUpdateOK), nil - + success, ok := result.(*DcimManufacturersUpdateOK) + 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_manufacturers_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPlatformsCreate dcim platforms create API + DcimPlatformsCreate dcim platforms create API */ func (a *Client) DcimPlatformsCreate(params *DcimPlatformsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsCreateCreated, error) { // TODO: Validate the params before sending @@ -3132,7 +4228,7 @@ func (a *Client) DcimPlatformsCreate(params *DcimPlatformsCreateParams, authInfo PathPattern: "/dcim/platforms/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3142,12 +4238,18 @@ func (a *Client) DcimPlatformsCreate(params *DcimPlatformsCreateParams, authInfo if err != nil { return nil, err } - return result.(*DcimPlatformsCreateCreated), nil - + success, ok := result.(*DcimPlatformsCreateCreated) + 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_platforms_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPlatformsDelete dcim platforms delete API + DcimPlatformsDelete dcim platforms delete API */ func (a *Client) DcimPlatformsDelete(params *DcimPlatformsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -3161,7 +4263,7 @@ func (a *Client) DcimPlatformsDelete(params *DcimPlatformsDeleteParams, authInfo PathPattern: "/dcim/platforms/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3171,12 +4273,18 @@ func (a *Client) DcimPlatformsDelete(params *DcimPlatformsDeleteParams, authInfo if err != nil { return nil, err } - return result.(*DcimPlatformsDeleteNoContent), nil - + success, ok := result.(*DcimPlatformsDeleteNoContent) + 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_platforms_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPlatformsList Call to super to allow for caching + DcimPlatformsList Call to super to allow for caching */ func (a *Client) DcimPlatformsList(params *DcimPlatformsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsListOK, error) { // TODO: Validate the params before sending @@ -3190,7 +4298,7 @@ func (a *Client) DcimPlatformsList(params *DcimPlatformsListParams, authInfo run PathPattern: "/dcim/platforms/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -3200,12 +4308,18 @@ func (a *Client) DcimPlatformsList(params *DcimPlatformsListParams, authInfo run if err != nil { return nil, err } - return result.(*DcimPlatformsListOK), nil - + success, ok := result.(*DcimPlatformsListOK) + 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_platforms_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPlatformsPartialUpdate dcim platforms partial update API + DcimPlatformsPartialUpdate dcim platforms partial update API */ func (a *Client) DcimPlatformsPartialUpdate(params *DcimPlatformsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -3219,7 +4333,7 @@ func (a *Client) DcimPlatformsPartialUpdate(params *DcimPlatformsPartialUpdatePa PathPattern: "/dcim/platforms/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3229,12 +4343,18 @@ func (a *Client) DcimPlatformsPartialUpdate(params *DcimPlatformsPartialUpdatePa if err != nil { return nil, err } - return result.(*DcimPlatformsPartialUpdateOK), nil - + success, ok := result.(*DcimPlatformsPartialUpdateOK) + 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_platforms_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPlatformsRead Call to super to allow for caching + DcimPlatformsRead Call to super to allow for caching */ func (a *Client) DcimPlatformsRead(params *DcimPlatformsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsReadOK, error) { // TODO: Validate the params before sending @@ -3248,7 +4368,7 @@ func (a *Client) DcimPlatformsRead(params *DcimPlatformsReadParams, authInfo run PathPattern: "/dcim/platforms/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -3258,12 +4378,18 @@ func (a *Client) DcimPlatformsRead(params *DcimPlatformsReadParams, authInfo run if err != nil { return nil, err } - return result.(*DcimPlatformsReadOK), nil - + success, ok := result.(*DcimPlatformsReadOK) + 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_platforms_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPlatformsUpdate dcim platforms update API + DcimPlatformsUpdate dcim platforms update API */ func (a *Client) DcimPlatformsUpdate(params *DcimPlatformsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsUpdateOK, error) { // TODO: Validate the params before sending @@ -3277,7 +4403,7 @@ func (a *Client) DcimPlatformsUpdate(params *DcimPlatformsUpdateParams, authInfo PathPattern: "/dcim/platforms/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3287,12 +4413,18 @@ func (a *Client) DcimPlatformsUpdate(params *DcimPlatformsUpdateParams, authInfo if err != nil { return nil, err } - return result.(*DcimPlatformsUpdateOK), nil - + success, ok := result.(*DcimPlatformsUpdateOK) + 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_platforms_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerConnectionsList dcim power connections list API + DcimPowerConnectionsList dcim power connections list API */ func (a *Client) DcimPowerConnectionsList(params *DcimPowerConnectionsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerConnectionsListOK, error) { // TODO: Validate the params before sending @@ -3306,7 +4438,7 @@ func (a *Client) DcimPowerConnectionsList(params *DcimPowerConnectionsListParams PathPattern: "/dcim/power-connections/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerConnectionsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -3316,12 +4448,18 @@ func (a *Client) DcimPowerConnectionsList(params *DcimPowerConnectionsListParams if err != nil { return nil, err } - return result.(*DcimPowerConnectionsListOK), nil - + 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) } /* -DcimPowerFeedsCreate dcim power feeds create API + DcimPowerFeedsCreate dcim power feeds create API */ func (a *Client) DcimPowerFeedsCreate(params *DcimPowerFeedsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerFeedsCreateCreated, error) { // TODO: Validate the params before sending @@ -3335,7 +4473,7 @@ func (a *Client) DcimPowerFeedsCreate(params *DcimPowerFeedsCreateParams, authIn PathPattern: "/dcim/power-feeds/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3345,12 +4483,18 @@ func (a *Client) DcimPowerFeedsCreate(params *DcimPowerFeedsCreateParams, authIn if err != nil { return nil, err } - return result.(*DcimPowerFeedsCreateCreated), nil - + success, ok := result.(*DcimPowerFeedsCreateCreated) + 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-feeds_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerFeedsDelete dcim power feeds delete API + DcimPowerFeedsDelete dcim power feeds delete API */ func (a *Client) DcimPowerFeedsDelete(params *DcimPowerFeedsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerFeedsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -3364,7 +4508,7 @@ func (a *Client) DcimPowerFeedsDelete(params *DcimPowerFeedsDeleteParams, authIn PathPattern: "/dcim/power-feeds/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3374,12 +4518,18 @@ func (a *Client) DcimPowerFeedsDelete(params *DcimPowerFeedsDeleteParams, authIn if err != nil { return nil, err } - return result.(*DcimPowerFeedsDeleteNoContent), nil - + success, ok := result.(*DcimPowerFeedsDeleteNoContent) + 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-feeds_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerFeedsList Call to super to allow for caching + DcimPowerFeedsList Call to super to allow for caching */ func (a *Client) DcimPowerFeedsList(params *DcimPowerFeedsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerFeedsListOK, error) { // TODO: Validate the params before sending @@ -3393,7 +4543,7 @@ func (a *Client) DcimPowerFeedsList(params *DcimPowerFeedsListParams, authInfo r PathPattern: "/dcim/power-feeds/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -3403,12 +4553,18 @@ func (a *Client) DcimPowerFeedsList(params *DcimPowerFeedsListParams, authInfo r if err != nil { return nil, err } - return result.(*DcimPowerFeedsListOK), nil - + success, ok := result.(*DcimPowerFeedsListOK) + 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-feeds_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerFeedsPartialUpdate dcim power feeds partial update API + DcimPowerFeedsPartialUpdate dcim power feeds partial update API */ func (a *Client) DcimPowerFeedsPartialUpdate(params *DcimPowerFeedsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerFeedsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -3422,7 +4578,7 @@ func (a *Client) DcimPowerFeedsPartialUpdate(params *DcimPowerFeedsPartialUpdate PathPattern: "/dcim/power-feeds/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3432,12 +4588,18 @@ func (a *Client) DcimPowerFeedsPartialUpdate(params *DcimPowerFeedsPartialUpdate if err != nil { return nil, err } - return result.(*DcimPowerFeedsPartialUpdateOK), nil - + success, ok := result.(*DcimPowerFeedsPartialUpdateOK) + 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-feeds_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerFeedsRead Call to super to allow for caching + DcimPowerFeedsRead Call to super to allow for caching */ func (a *Client) DcimPowerFeedsRead(params *DcimPowerFeedsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerFeedsReadOK, error) { // TODO: Validate the params before sending @@ -3451,7 +4613,7 @@ func (a *Client) DcimPowerFeedsRead(params *DcimPowerFeedsReadParams, authInfo r PathPattern: "/dcim/power-feeds/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -3461,12 +4623,18 @@ func (a *Client) DcimPowerFeedsRead(params *DcimPowerFeedsReadParams, authInfo r if err != nil { return nil, err } - return result.(*DcimPowerFeedsReadOK), nil - + success, ok := result.(*DcimPowerFeedsReadOK) + 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-feeds_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerFeedsUpdate dcim power feeds update API + DcimPowerFeedsUpdate dcim power feeds update API */ func (a *Client) DcimPowerFeedsUpdate(params *DcimPowerFeedsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerFeedsUpdateOK, error) { // TODO: Validate the params before sending @@ -3480,7 +4648,7 @@ func (a *Client) DcimPowerFeedsUpdate(params *DcimPowerFeedsUpdateParams, authIn PathPattern: "/dcim/power-feeds/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3490,12 +4658,18 @@ func (a *Client) DcimPowerFeedsUpdate(params *DcimPowerFeedsUpdateParams, authIn if err != nil { return nil, err } - return result.(*DcimPowerFeedsUpdateOK), nil - + success, ok := result.(*DcimPowerFeedsUpdateOK) + 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-feeds_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerOutletTemplatesCreate dcim power outlet templates create API + DcimPowerOutletTemplatesCreate dcim power outlet templates create API */ func (a *Client) DcimPowerOutletTemplatesCreate(params *DcimPowerOutletTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesCreateCreated, error) { // TODO: Validate the params before sending @@ -3509,7 +4683,7 @@ func (a *Client) DcimPowerOutletTemplatesCreate(params *DcimPowerOutletTemplates PathPattern: "/dcim/power-outlet-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3519,12 +4693,18 @@ func (a *Client) DcimPowerOutletTemplatesCreate(params *DcimPowerOutletTemplates if err != nil { return nil, err } - return result.(*DcimPowerOutletTemplatesCreateCreated), nil - + success, ok := result.(*DcimPowerOutletTemplatesCreateCreated) + 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-outlet-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerOutletTemplatesDelete dcim power outlet templates delete API + DcimPowerOutletTemplatesDelete dcim power outlet templates delete API */ func (a *Client) DcimPowerOutletTemplatesDelete(params *DcimPowerOutletTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -3538,7 +4718,7 @@ func (a *Client) DcimPowerOutletTemplatesDelete(params *DcimPowerOutletTemplates PathPattern: "/dcim/power-outlet-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3548,12 +4728,18 @@ func (a *Client) DcimPowerOutletTemplatesDelete(params *DcimPowerOutletTemplates if err != nil { return nil, err } - return result.(*DcimPowerOutletTemplatesDeleteNoContent), nil - + success, ok := result.(*DcimPowerOutletTemplatesDeleteNoContent) + 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-outlet-templates_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerOutletTemplatesList Call to super to allow for caching + DcimPowerOutletTemplatesList Call to super to allow for caching */ func (a *Client) DcimPowerOutletTemplatesList(params *DcimPowerOutletTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesListOK, error) { // TODO: Validate the params before sending @@ -3567,7 +4753,7 @@ func (a *Client) DcimPowerOutletTemplatesList(params *DcimPowerOutletTemplatesLi PathPattern: "/dcim/power-outlet-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -3577,12 +4763,18 @@ func (a *Client) DcimPowerOutletTemplatesList(params *DcimPowerOutletTemplatesLi if err != nil { return nil, err } - return result.(*DcimPowerOutletTemplatesListOK), nil - + success, ok := result.(*DcimPowerOutletTemplatesListOK) + 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-outlet-templates_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerOutletTemplatesPartialUpdate dcim power outlet templates partial update API + DcimPowerOutletTemplatesPartialUpdate dcim power outlet templates partial update API */ func (a *Client) DcimPowerOutletTemplatesPartialUpdate(params *DcimPowerOutletTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -3596,7 +4788,7 @@ func (a *Client) DcimPowerOutletTemplatesPartialUpdate(params *DcimPowerOutletTe PathPattern: "/dcim/power-outlet-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3606,12 +4798,18 @@ func (a *Client) DcimPowerOutletTemplatesPartialUpdate(params *DcimPowerOutletTe if err != nil { return nil, err } - return result.(*DcimPowerOutletTemplatesPartialUpdateOK), nil - + success, ok := result.(*DcimPowerOutletTemplatesPartialUpdateOK) + 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-outlet-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerOutletTemplatesRead Call to super to allow for caching + DcimPowerOutletTemplatesRead Call to super to allow for caching */ func (a *Client) DcimPowerOutletTemplatesRead(params *DcimPowerOutletTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -3625,7 +4823,7 @@ func (a *Client) DcimPowerOutletTemplatesRead(params *DcimPowerOutletTemplatesRe PathPattern: "/dcim/power-outlet-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -3635,12 +4833,18 @@ func (a *Client) DcimPowerOutletTemplatesRead(params *DcimPowerOutletTemplatesRe if err != nil { return nil, err } - return result.(*DcimPowerOutletTemplatesReadOK), nil - + success, ok := result.(*DcimPowerOutletTemplatesReadOK) + 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-outlet-templates_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerOutletTemplatesUpdate dcim power outlet templates update API + DcimPowerOutletTemplatesUpdate dcim power outlet templates update API */ func (a *Client) DcimPowerOutletTemplatesUpdate(params *DcimPowerOutletTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesUpdateOK, error) { // TODO: Validate the params before sending @@ -3654,7 +4858,7 @@ func (a *Client) DcimPowerOutletTemplatesUpdate(params *DcimPowerOutletTemplates PathPattern: "/dcim/power-outlet-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3664,12 +4868,18 @@ func (a *Client) DcimPowerOutletTemplatesUpdate(params *DcimPowerOutletTemplates if err != nil { return nil, err } - return result.(*DcimPowerOutletTemplatesUpdateOK), nil - + success, ok := result.(*DcimPowerOutletTemplatesUpdateOK) + 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-outlet-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerOutletsCreate dcim power outlets create API + DcimPowerOutletsCreate dcim power outlets create API */ func (a *Client) DcimPowerOutletsCreate(params *DcimPowerOutletsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsCreateCreated, error) { // TODO: Validate the params before sending @@ -3683,7 +4893,7 @@ func (a *Client) DcimPowerOutletsCreate(params *DcimPowerOutletsCreateParams, au PathPattern: "/dcim/power-outlets/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3693,12 +4903,18 @@ func (a *Client) DcimPowerOutletsCreate(params *DcimPowerOutletsCreateParams, au if err != nil { return nil, err } - return result.(*DcimPowerOutletsCreateCreated), nil - + success, ok := result.(*DcimPowerOutletsCreateCreated) + 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-outlets_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerOutletsDelete dcim power outlets delete API + DcimPowerOutletsDelete dcim power outlets delete API */ func (a *Client) DcimPowerOutletsDelete(params *DcimPowerOutletsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -3712,7 +4928,7 @@ func (a *Client) DcimPowerOutletsDelete(params *DcimPowerOutletsDeleteParams, au PathPattern: "/dcim/power-outlets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3722,12 +4938,18 @@ func (a *Client) DcimPowerOutletsDelete(params *DcimPowerOutletsDeleteParams, au if err != nil { return nil, err } - return result.(*DcimPowerOutletsDeleteNoContent), nil - + success, ok := result.(*DcimPowerOutletsDeleteNoContent) + 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-outlets_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerOutletsList Call to super to allow for caching + DcimPowerOutletsList Call to super to allow for caching */ func (a *Client) DcimPowerOutletsList(params *DcimPowerOutletsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsListOK, error) { // TODO: Validate the params before sending @@ -3741,7 +4963,7 @@ func (a *Client) DcimPowerOutletsList(params *DcimPowerOutletsListParams, authIn PathPattern: "/dcim/power-outlets/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -3751,12 +4973,18 @@ func (a *Client) DcimPowerOutletsList(params *DcimPowerOutletsListParams, authIn if err != nil { return nil, err } - return result.(*DcimPowerOutletsListOK), nil - + success, ok := result.(*DcimPowerOutletsListOK) + 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-outlets_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerOutletsPartialUpdate dcim power outlets partial update API + DcimPowerOutletsPartialUpdate dcim power outlets partial update API */ func (a *Client) DcimPowerOutletsPartialUpdate(params *DcimPowerOutletsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -3770,7 +4998,7 @@ func (a *Client) DcimPowerOutletsPartialUpdate(params *DcimPowerOutletsPartialUp PathPattern: "/dcim/power-outlets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3780,12 +5008,18 @@ func (a *Client) DcimPowerOutletsPartialUpdate(params *DcimPowerOutletsPartialUp if err != nil { return nil, err } - return result.(*DcimPowerOutletsPartialUpdateOK), nil - + success, ok := result.(*DcimPowerOutletsPartialUpdateOK) + 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-outlets_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerOutletsRead Call to super to allow for caching + DcimPowerOutletsRead Call to super to allow for caching */ func (a *Client) DcimPowerOutletsRead(params *DcimPowerOutletsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsReadOK, error) { // TODO: Validate the params before sending @@ -3799,7 +5033,7 @@ func (a *Client) DcimPowerOutletsRead(params *DcimPowerOutletsReadParams, authIn PathPattern: "/dcim/power-outlets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -3809,12 +5043,18 @@ func (a *Client) DcimPowerOutletsRead(params *DcimPowerOutletsReadParams, authIn if err != nil { return nil, err } - return result.(*DcimPowerOutletsReadOK), nil - + success, ok := result.(*DcimPowerOutletsReadOK) + 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-outlets_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerOutletsTrace Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination). + DcimPowerOutletsTrace Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination). */ func (a *Client) DcimPowerOutletsTrace(params *DcimPowerOutletsTraceParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsTraceOK, error) { // TODO: Validate the params before sending @@ -3828,7 +5068,7 @@ func (a *Client) DcimPowerOutletsTrace(params *DcimPowerOutletsTraceParams, auth PathPattern: "/dcim/power-outlets/{id}/trace/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsTraceReader{formats: a.formats}, AuthInfo: authInfo, @@ -3838,12 +5078,18 @@ func (a *Client) DcimPowerOutletsTrace(params *DcimPowerOutletsTraceParams, auth if err != nil { return nil, err } - return result.(*DcimPowerOutletsTraceOK), nil - + success, ok := result.(*DcimPowerOutletsTraceOK) + 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-outlets_trace: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerOutletsUpdate dcim power outlets update API + DcimPowerOutletsUpdate dcim power outlets update API */ func (a *Client) DcimPowerOutletsUpdate(params *DcimPowerOutletsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsUpdateOK, error) { // TODO: Validate the params before sending @@ -3857,7 +5103,7 @@ func (a *Client) DcimPowerOutletsUpdate(params *DcimPowerOutletsUpdateParams, au PathPattern: "/dcim/power-outlets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3867,12 +5113,18 @@ func (a *Client) DcimPowerOutletsUpdate(params *DcimPowerOutletsUpdateParams, au if err != nil { return nil, err } - return result.(*DcimPowerOutletsUpdateOK), nil - + success, ok := result.(*DcimPowerOutletsUpdateOK) + 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-outlets_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPanelsCreate dcim power panels create API + DcimPowerPanelsCreate dcim power panels create API */ func (a *Client) DcimPowerPanelsCreate(params *DcimPowerPanelsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPanelsCreateCreated, error) { // TODO: Validate the params before sending @@ -3886,7 +5138,7 @@ func (a *Client) DcimPowerPanelsCreate(params *DcimPowerPanelsCreateParams, auth PathPattern: "/dcim/power-panels/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3896,12 +5148,18 @@ func (a *Client) DcimPowerPanelsCreate(params *DcimPowerPanelsCreateParams, auth if err != nil { return nil, err } - return result.(*DcimPowerPanelsCreateCreated), nil - + success, ok := result.(*DcimPowerPanelsCreateCreated) + 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-panels_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPanelsDelete dcim power panels delete API + DcimPowerPanelsDelete dcim power panels delete API */ func (a *Client) DcimPowerPanelsDelete(params *DcimPowerPanelsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPanelsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -3915,7 +5173,7 @@ func (a *Client) DcimPowerPanelsDelete(params *DcimPowerPanelsDeleteParams, auth PathPattern: "/dcim/power-panels/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3925,12 +5183,18 @@ func (a *Client) DcimPowerPanelsDelete(params *DcimPowerPanelsDeleteParams, auth if err != nil { return nil, err } - return result.(*DcimPowerPanelsDeleteNoContent), nil - + success, ok := result.(*DcimPowerPanelsDeleteNoContent) + 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-panels_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPanelsList Call to super to allow for caching + DcimPowerPanelsList Call to super to allow for caching */ func (a *Client) DcimPowerPanelsList(params *DcimPowerPanelsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPanelsListOK, error) { // TODO: Validate the params before sending @@ -3944,7 +5208,7 @@ func (a *Client) DcimPowerPanelsList(params *DcimPowerPanelsListParams, authInfo PathPattern: "/dcim/power-panels/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -3954,12 +5218,18 @@ func (a *Client) DcimPowerPanelsList(params *DcimPowerPanelsListParams, authInfo if err != nil { return nil, err } - return result.(*DcimPowerPanelsListOK), nil - + success, ok := result.(*DcimPowerPanelsListOK) + 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-panels_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPanelsPartialUpdate dcim power panels partial update API + DcimPowerPanelsPartialUpdate dcim power panels partial update API */ func (a *Client) DcimPowerPanelsPartialUpdate(params *DcimPowerPanelsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPanelsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -3973,7 +5243,7 @@ func (a *Client) DcimPowerPanelsPartialUpdate(params *DcimPowerPanelsPartialUpda PathPattern: "/dcim/power-panels/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3983,12 +5253,18 @@ func (a *Client) DcimPowerPanelsPartialUpdate(params *DcimPowerPanelsPartialUpda if err != nil { return nil, err } - return result.(*DcimPowerPanelsPartialUpdateOK), nil - + success, ok := result.(*DcimPowerPanelsPartialUpdateOK) + 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-panels_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPanelsRead Call to super to allow for caching + DcimPowerPanelsRead Call to super to allow for caching */ func (a *Client) DcimPowerPanelsRead(params *DcimPowerPanelsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPanelsReadOK, error) { // TODO: Validate the params before sending @@ -4002,7 +5278,7 @@ func (a *Client) DcimPowerPanelsRead(params *DcimPowerPanelsReadParams, authInfo PathPattern: "/dcim/power-panels/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -4012,12 +5288,18 @@ func (a *Client) DcimPowerPanelsRead(params *DcimPowerPanelsReadParams, authInfo if err != nil { return nil, err } - return result.(*DcimPowerPanelsReadOK), nil - + success, ok := result.(*DcimPowerPanelsReadOK) + 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-panels_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPanelsUpdate dcim power panels update API + DcimPowerPanelsUpdate dcim power panels update API */ func (a *Client) DcimPowerPanelsUpdate(params *DcimPowerPanelsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPanelsUpdateOK, error) { // TODO: Validate the params before sending @@ -4031,7 +5313,7 @@ func (a *Client) DcimPowerPanelsUpdate(params *DcimPowerPanelsUpdateParams, auth PathPattern: "/dcim/power-panels/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4041,12 +5323,18 @@ func (a *Client) DcimPowerPanelsUpdate(params *DcimPowerPanelsUpdateParams, auth if err != nil { return nil, err } - return result.(*DcimPowerPanelsUpdateOK), nil - + success, ok := result.(*DcimPowerPanelsUpdateOK) + 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-panels_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPortTemplatesCreate dcim power port templates create API + DcimPowerPortTemplatesCreate dcim power port templates create API */ func (a *Client) DcimPowerPortTemplatesCreate(params *DcimPowerPortTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesCreateCreated, error) { // TODO: Validate the params before sending @@ -4060,7 +5348,7 @@ func (a *Client) DcimPowerPortTemplatesCreate(params *DcimPowerPortTemplatesCrea PathPattern: "/dcim/power-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4070,12 +5358,18 @@ func (a *Client) DcimPowerPortTemplatesCreate(params *DcimPowerPortTemplatesCrea if err != nil { return nil, err } - return result.(*DcimPowerPortTemplatesCreateCreated), nil - + success, ok := result.(*DcimPowerPortTemplatesCreateCreated) + 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-port-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPortTemplatesDelete dcim power port templates delete API + DcimPowerPortTemplatesDelete dcim power port templates delete API */ func (a *Client) DcimPowerPortTemplatesDelete(params *DcimPowerPortTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -4089,7 +5383,7 @@ func (a *Client) DcimPowerPortTemplatesDelete(params *DcimPowerPortTemplatesDele PathPattern: "/dcim/power-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -4099,12 +5393,18 @@ func (a *Client) DcimPowerPortTemplatesDelete(params *DcimPowerPortTemplatesDele if err != nil { return nil, err } - return result.(*DcimPowerPortTemplatesDeleteNoContent), nil - + success, ok := result.(*DcimPowerPortTemplatesDeleteNoContent) + 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-port-templates_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPortTemplatesList Call to super to allow for caching + DcimPowerPortTemplatesList Call to super to allow for caching */ func (a *Client) DcimPowerPortTemplatesList(params *DcimPowerPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -4118,7 +5418,7 @@ func (a *Client) DcimPowerPortTemplatesList(params *DcimPowerPortTemplatesListPa PathPattern: "/dcim/power-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -4128,12 +5428,18 @@ func (a *Client) DcimPowerPortTemplatesList(params *DcimPowerPortTemplatesListPa if err != nil { return nil, err } - return result.(*DcimPowerPortTemplatesListOK), nil - + success, ok := result.(*DcimPowerPortTemplatesListOK) + 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-port-templates_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPortTemplatesPartialUpdate dcim power port templates partial update API + DcimPowerPortTemplatesPartialUpdate dcim power port templates partial update API */ func (a *Client) DcimPowerPortTemplatesPartialUpdate(params *DcimPowerPortTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -4147,7 +5453,7 @@ func (a *Client) DcimPowerPortTemplatesPartialUpdate(params *DcimPowerPortTempla PathPattern: "/dcim/power-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4157,12 +5463,18 @@ func (a *Client) DcimPowerPortTemplatesPartialUpdate(params *DcimPowerPortTempla if err != nil { return nil, err } - return result.(*DcimPowerPortTemplatesPartialUpdateOK), nil - + success, ok := result.(*DcimPowerPortTemplatesPartialUpdateOK) + 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-port-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPortTemplatesRead Call to super to allow for caching + DcimPowerPortTemplatesRead Call to super to allow for caching */ func (a *Client) DcimPowerPortTemplatesRead(params *DcimPowerPortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -4176,7 +5488,7 @@ func (a *Client) DcimPowerPortTemplatesRead(params *DcimPowerPortTemplatesReadPa PathPattern: "/dcim/power-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -4186,12 +5498,18 @@ func (a *Client) DcimPowerPortTemplatesRead(params *DcimPowerPortTemplatesReadPa if err != nil { return nil, err } - return result.(*DcimPowerPortTemplatesReadOK), nil - + success, ok := result.(*DcimPowerPortTemplatesReadOK) + 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-port-templates_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPortTemplatesUpdate dcim power port templates update API + DcimPowerPortTemplatesUpdate dcim power port templates update API */ func (a *Client) DcimPowerPortTemplatesUpdate(params *DcimPowerPortTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesUpdateOK, error) { // TODO: Validate the params before sending @@ -4205,7 +5523,7 @@ func (a *Client) DcimPowerPortTemplatesUpdate(params *DcimPowerPortTemplatesUpda PathPattern: "/dcim/power-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4215,12 +5533,18 @@ func (a *Client) DcimPowerPortTemplatesUpdate(params *DcimPowerPortTemplatesUpda if err != nil { return nil, err } - return result.(*DcimPowerPortTemplatesUpdateOK), nil - + success, ok := result.(*DcimPowerPortTemplatesUpdateOK) + 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-port-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPortsCreate dcim power ports create API + DcimPowerPortsCreate dcim power ports create API */ func (a *Client) DcimPowerPortsCreate(params *DcimPowerPortsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsCreateCreated, error) { // TODO: Validate the params before sending @@ -4234,7 +5558,7 @@ func (a *Client) DcimPowerPortsCreate(params *DcimPowerPortsCreateParams, authIn PathPattern: "/dcim/power-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4244,12 +5568,18 @@ func (a *Client) DcimPowerPortsCreate(params *DcimPowerPortsCreateParams, authIn if err != nil { return nil, err } - return result.(*DcimPowerPortsCreateCreated), nil - + success, ok := result.(*DcimPowerPortsCreateCreated) + 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-ports_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPortsDelete dcim power ports delete API + DcimPowerPortsDelete dcim power ports delete API */ func (a *Client) DcimPowerPortsDelete(params *DcimPowerPortsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -4263,7 +5593,7 @@ func (a *Client) DcimPowerPortsDelete(params *DcimPowerPortsDeleteParams, authIn PathPattern: "/dcim/power-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -4273,12 +5603,18 @@ func (a *Client) DcimPowerPortsDelete(params *DcimPowerPortsDeleteParams, authIn if err != nil { return nil, err } - return result.(*DcimPowerPortsDeleteNoContent), nil - + success, ok := result.(*DcimPowerPortsDeleteNoContent) + 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-ports_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPortsList Call to super to allow for caching + DcimPowerPortsList Call to super to allow for caching */ func (a *Client) DcimPowerPortsList(params *DcimPowerPortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsListOK, error) { // TODO: Validate the params before sending @@ -4292,7 +5628,7 @@ func (a *Client) DcimPowerPortsList(params *DcimPowerPortsListParams, authInfo r PathPattern: "/dcim/power-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -4302,12 +5638,18 @@ func (a *Client) DcimPowerPortsList(params *DcimPowerPortsListParams, authInfo r if err != nil { return nil, err } - return result.(*DcimPowerPortsListOK), nil - + success, ok := result.(*DcimPowerPortsListOK) + 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-ports_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPortsPartialUpdate dcim power ports partial update API + DcimPowerPortsPartialUpdate dcim power ports partial update API */ func (a *Client) DcimPowerPortsPartialUpdate(params *DcimPowerPortsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -4321,7 +5663,7 @@ func (a *Client) DcimPowerPortsPartialUpdate(params *DcimPowerPortsPartialUpdate PathPattern: "/dcim/power-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4331,12 +5673,18 @@ func (a *Client) DcimPowerPortsPartialUpdate(params *DcimPowerPortsPartialUpdate if err != nil { return nil, err } - return result.(*DcimPowerPortsPartialUpdateOK), nil - + success, ok := result.(*DcimPowerPortsPartialUpdateOK) + 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-ports_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPortsRead Call to super to allow for caching + DcimPowerPortsRead Call to super to allow for caching */ func (a *Client) DcimPowerPortsRead(params *DcimPowerPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsReadOK, error) { // TODO: Validate the params before sending @@ -4350,7 +5698,7 @@ func (a *Client) DcimPowerPortsRead(params *DcimPowerPortsReadParams, authInfo r PathPattern: "/dcim/power-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -4360,12 +5708,18 @@ func (a *Client) DcimPowerPortsRead(params *DcimPowerPortsReadParams, authInfo r if err != nil { return nil, err } - return result.(*DcimPowerPortsReadOK), nil - + success, ok := result.(*DcimPowerPortsReadOK) + 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-ports_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPortsTrace Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination). + DcimPowerPortsTrace Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination). */ func (a *Client) DcimPowerPortsTrace(params *DcimPowerPortsTraceParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsTraceOK, error) { // TODO: Validate the params before sending @@ -4379,7 +5733,7 @@ func (a *Client) DcimPowerPortsTrace(params *DcimPowerPortsTraceParams, authInfo PathPattern: "/dcim/power-ports/{id}/trace/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsTraceReader{formats: a.formats}, AuthInfo: authInfo, @@ -4389,12 +5743,18 @@ func (a *Client) DcimPowerPortsTrace(params *DcimPowerPortsTraceParams, authInfo if err != nil { return nil, err } - return result.(*DcimPowerPortsTraceOK), nil - + success, ok := result.(*DcimPowerPortsTraceOK) + 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-ports_trace: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimPowerPortsUpdate dcim power ports update API + DcimPowerPortsUpdate dcim power ports update API */ func (a *Client) DcimPowerPortsUpdate(params *DcimPowerPortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsUpdateOK, error) { // TODO: Validate the params before sending @@ -4408,7 +5768,7 @@ func (a *Client) DcimPowerPortsUpdate(params *DcimPowerPortsUpdateParams, authIn PathPattern: "/dcim/power-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4418,12 +5778,18 @@ func (a *Client) DcimPowerPortsUpdate(params *DcimPowerPortsUpdateParams, authIn if err != nil { return nil, err } - return result.(*DcimPowerPortsUpdateOK), nil - + success, ok := result.(*DcimPowerPortsUpdateOK) + 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-ports_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackGroupsCreate dcim rack groups create API + DcimRackGroupsCreate dcim rack groups create API */ func (a *Client) DcimRackGroupsCreate(params *DcimRackGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsCreateCreated, error) { // TODO: Validate the params before sending @@ -4437,7 +5803,7 @@ func (a *Client) DcimRackGroupsCreate(params *DcimRackGroupsCreateParams, authIn PathPattern: "/dcim/rack-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackGroupsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4447,12 +5813,18 @@ func (a *Client) DcimRackGroupsCreate(params *DcimRackGroupsCreateParams, authIn if err != nil { return nil, err } - return result.(*DcimRackGroupsCreateCreated), nil - + success, ok := result.(*DcimRackGroupsCreateCreated) + 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_rack-groups_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackGroupsDelete dcim rack groups delete API + DcimRackGroupsDelete dcim rack groups delete API */ func (a *Client) DcimRackGroupsDelete(params *DcimRackGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -4466,7 +5838,7 @@ func (a *Client) DcimRackGroupsDelete(params *DcimRackGroupsDeleteParams, authIn PathPattern: "/dcim/rack-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackGroupsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -4476,12 +5848,18 @@ func (a *Client) DcimRackGroupsDelete(params *DcimRackGroupsDeleteParams, authIn if err != nil { return nil, err } - return result.(*DcimRackGroupsDeleteNoContent), nil - + success, ok := result.(*DcimRackGroupsDeleteNoContent) + 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_rack-groups_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackGroupsList Call to super to allow for caching + DcimRackGroupsList Call to super to allow for caching */ func (a *Client) DcimRackGroupsList(params *DcimRackGroupsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsListOK, error) { // TODO: Validate the params before sending @@ -4495,7 +5873,7 @@ func (a *Client) DcimRackGroupsList(params *DcimRackGroupsListParams, authInfo r PathPattern: "/dcim/rack-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackGroupsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -4505,12 +5883,18 @@ func (a *Client) DcimRackGroupsList(params *DcimRackGroupsListParams, authInfo r if err != nil { return nil, err } - return result.(*DcimRackGroupsListOK), nil - + success, ok := result.(*DcimRackGroupsListOK) + 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_rack-groups_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackGroupsPartialUpdate dcim rack groups partial update API + DcimRackGroupsPartialUpdate dcim rack groups partial update API */ func (a *Client) DcimRackGroupsPartialUpdate(params *DcimRackGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -4524,7 +5908,7 @@ func (a *Client) DcimRackGroupsPartialUpdate(params *DcimRackGroupsPartialUpdate PathPattern: "/dcim/rack-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackGroupsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4534,12 +5918,18 @@ func (a *Client) DcimRackGroupsPartialUpdate(params *DcimRackGroupsPartialUpdate if err != nil { return nil, err } - return result.(*DcimRackGroupsPartialUpdateOK), nil - + success, ok := result.(*DcimRackGroupsPartialUpdateOK) + 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_rack-groups_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackGroupsRead Call to super to allow for caching + DcimRackGroupsRead Call to super to allow for caching */ func (a *Client) DcimRackGroupsRead(params *DcimRackGroupsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsReadOK, error) { // TODO: Validate the params before sending @@ -4553,7 +5943,7 @@ func (a *Client) DcimRackGroupsRead(params *DcimRackGroupsReadParams, authInfo r PathPattern: "/dcim/rack-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackGroupsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -4563,12 +5953,18 @@ func (a *Client) DcimRackGroupsRead(params *DcimRackGroupsReadParams, authInfo r if err != nil { return nil, err } - return result.(*DcimRackGroupsReadOK), nil - + success, ok := result.(*DcimRackGroupsReadOK) + 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_rack-groups_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackGroupsUpdate dcim rack groups update API + DcimRackGroupsUpdate dcim rack groups update API */ func (a *Client) DcimRackGroupsUpdate(params *DcimRackGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsUpdateOK, error) { // TODO: Validate the params before sending @@ -4582,7 +5978,7 @@ func (a *Client) DcimRackGroupsUpdate(params *DcimRackGroupsUpdateParams, authIn PathPattern: "/dcim/rack-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackGroupsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4592,12 +5988,18 @@ func (a *Client) DcimRackGroupsUpdate(params *DcimRackGroupsUpdateParams, authIn if err != nil { return nil, err } - return result.(*DcimRackGroupsUpdateOK), nil - + success, ok := result.(*DcimRackGroupsUpdateOK) + 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_rack-groups_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackReservationsCreate dcim rack reservations create API + DcimRackReservationsCreate dcim rack reservations create API */ func (a *Client) DcimRackReservationsCreate(params *DcimRackReservationsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsCreateCreated, error) { // TODO: Validate the params before sending @@ -4611,7 +6013,7 @@ func (a *Client) DcimRackReservationsCreate(params *DcimRackReservationsCreatePa PathPattern: "/dcim/rack-reservations/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4621,12 +6023,18 @@ func (a *Client) DcimRackReservationsCreate(params *DcimRackReservationsCreatePa if err != nil { return nil, err } - return result.(*DcimRackReservationsCreateCreated), nil - + success, ok := result.(*DcimRackReservationsCreateCreated) + 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_rack-reservations_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackReservationsDelete dcim rack reservations delete API + DcimRackReservationsDelete dcim rack reservations delete API */ func (a *Client) DcimRackReservationsDelete(params *DcimRackReservationsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -4640,7 +6048,7 @@ func (a *Client) DcimRackReservationsDelete(params *DcimRackReservationsDeletePa PathPattern: "/dcim/rack-reservations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -4650,12 +6058,18 @@ func (a *Client) DcimRackReservationsDelete(params *DcimRackReservationsDeletePa if err != nil { return nil, err } - return result.(*DcimRackReservationsDeleteNoContent), nil - + success, ok := result.(*DcimRackReservationsDeleteNoContent) + 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_rack-reservations_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackReservationsList Call to super to allow for caching + DcimRackReservationsList Call to super to allow for caching */ func (a *Client) DcimRackReservationsList(params *DcimRackReservationsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsListOK, error) { // TODO: Validate the params before sending @@ -4669,7 +6083,7 @@ func (a *Client) DcimRackReservationsList(params *DcimRackReservationsListParams PathPattern: "/dcim/rack-reservations/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -4679,12 +6093,18 @@ func (a *Client) DcimRackReservationsList(params *DcimRackReservationsListParams if err != nil { return nil, err } - return result.(*DcimRackReservationsListOK), nil - + success, ok := result.(*DcimRackReservationsListOK) + 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_rack-reservations_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackReservationsPartialUpdate dcim rack reservations partial update API + DcimRackReservationsPartialUpdate dcim rack reservations partial update API */ func (a *Client) DcimRackReservationsPartialUpdate(params *DcimRackReservationsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -4698,7 +6118,7 @@ func (a *Client) DcimRackReservationsPartialUpdate(params *DcimRackReservationsP PathPattern: "/dcim/rack-reservations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4708,12 +6128,18 @@ func (a *Client) DcimRackReservationsPartialUpdate(params *DcimRackReservationsP if err != nil { return nil, err } - return result.(*DcimRackReservationsPartialUpdateOK), nil - + success, ok := result.(*DcimRackReservationsPartialUpdateOK) + 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_rack-reservations_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackReservationsRead Call to super to allow for caching + DcimRackReservationsRead Call to super to allow for caching */ func (a *Client) DcimRackReservationsRead(params *DcimRackReservationsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsReadOK, error) { // TODO: Validate the params before sending @@ -4727,7 +6153,7 @@ func (a *Client) DcimRackReservationsRead(params *DcimRackReservationsReadParams PathPattern: "/dcim/rack-reservations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -4737,12 +6163,18 @@ func (a *Client) DcimRackReservationsRead(params *DcimRackReservationsReadParams if err != nil { return nil, err } - return result.(*DcimRackReservationsReadOK), nil - + success, ok := result.(*DcimRackReservationsReadOK) + 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_rack-reservations_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackReservationsUpdate dcim rack reservations update API + DcimRackReservationsUpdate dcim rack reservations update API */ func (a *Client) DcimRackReservationsUpdate(params *DcimRackReservationsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsUpdateOK, error) { // TODO: Validate the params before sending @@ -4756,7 +6188,7 @@ func (a *Client) DcimRackReservationsUpdate(params *DcimRackReservationsUpdatePa PathPattern: "/dcim/rack-reservations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4766,12 +6198,18 @@ func (a *Client) DcimRackReservationsUpdate(params *DcimRackReservationsUpdatePa if err != nil { return nil, err } - return result.(*DcimRackReservationsUpdateOK), nil - + success, ok := result.(*DcimRackReservationsUpdateOK) + 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_rack-reservations_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackRolesCreate dcim rack roles create API + DcimRackRolesCreate dcim rack roles create API */ func (a *Client) DcimRackRolesCreate(params *DcimRackRolesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesCreateCreated, error) { // TODO: Validate the params before sending @@ -4785,7 +6223,7 @@ func (a *Client) DcimRackRolesCreate(params *DcimRackRolesCreateParams, authInfo PathPattern: "/dcim/rack-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4795,12 +6233,18 @@ func (a *Client) DcimRackRolesCreate(params *DcimRackRolesCreateParams, authInfo if err != nil { return nil, err } - return result.(*DcimRackRolesCreateCreated), nil - + success, ok := result.(*DcimRackRolesCreateCreated) + 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_rack-roles_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackRolesDelete dcim rack roles delete API + DcimRackRolesDelete dcim rack roles delete API */ func (a *Client) DcimRackRolesDelete(params *DcimRackRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -4814,7 +6258,7 @@ func (a *Client) DcimRackRolesDelete(params *DcimRackRolesDeleteParams, authInfo PathPattern: "/dcim/rack-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -4824,12 +6268,18 @@ func (a *Client) DcimRackRolesDelete(params *DcimRackRolesDeleteParams, authInfo if err != nil { return nil, err } - return result.(*DcimRackRolesDeleteNoContent), nil - + success, ok := result.(*DcimRackRolesDeleteNoContent) + 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_rack-roles_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackRolesList Call to super to allow for caching + DcimRackRolesList Call to super to allow for caching */ func (a *Client) DcimRackRolesList(params *DcimRackRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesListOK, error) { // TODO: Validate the params before sending @@ -4843,7 +6293,7 @@ func (a *Client) DcimRackRolesList(params *DcimRackRolesListParams, authInfo run PathPattern: "/dcim/rack-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -4853,12 +6303,18 @@ func (a *Client) DcimRackRolesList(params *DcimRackRolesListParams, authInfo run if err != nil { return nil, err } - return result.(*DcimRackRolesListOK), nil - + success, ok := result.(*DcimRackRolesListOK) + 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_rack-roles_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackRolesPartialUpdate dcim rack roles partial update API + DcimRackRolesPartialUpdate dcim rack roles partial update API */ func (a *Client) DcimRackRolesPartialUpdate(params *DcimRackRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -4872,7 +6328,7 @@ func (a *Client) DcimRackRolesPartialUpdate(params *DcimRackRolesPartialUpdatePa PathPattern: "/dcim/rack-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4882,12 +6338,18 @@ func (a *Client) DcimRackRolesPartialUpdate(params *DcimRackRolesPartialUpdatePa if err != nil { return nil, err } - return result.(*DcimRackRolesPartialUpdateOK), nil - + success, ok := result.(*DcimRackRolesPartialUpdateOK) + 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_rack-roles_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackRolesRead Call to super to allow for caching + DcimRackRolesRead Call to super to allow for caching */ func (a *Client) DcimRackRolesRead(params *DcimRackRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesReadOK, error) { // TODO: Validate the params before sending @@ -4901,7 +6363,7 @@ func (a *Client) DcimRackRolesRead(params *DcimRackRolesReadParams, authInfo run PathPattern: "/dcim/rack-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -4911,12 +6373,18 @@ func (a *Client) DcimRackRolesRead(params *DcimRackRolesReadParams, authInfo run if err != nil { return nil, err } - return result.(*DcimRackRolesReadOK), nil - + success, ok := result.(*DcimRackRolesReadOK) + 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_rack-roles_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRackRolesUpdate dcim rack roles update API + DcimRackRolesUpdate dcim rack roles update API */ func (a *Client) DcimRackRolesUpdate(params *DcimRackRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesUpdateOK, error) { // TODO: Validate the params before sending @@ -4930,7 +6398,7 @@ func (a *Client) DcimRackRolesUpdate(params *DcimRackRolesUpdateParams, authInfo PathPattern: "/dcim/rack-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4940,12 +6408,18 @@ func (a *Client) DcimRackRolesUpdate(params *DcimRackRolesUpdateParams, authInfo if err != nil { return nil, err } - return result.(*DcimRackRolesUpdateOK), nil - + success, ok := result.(*DcimRackRolesUpdateOK) + 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_rack-roles_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRacksCreate dcim racks create API + DcimRacksCreate dcim racks create API */ func (a *Client) DcimRacksCreate(params *DcimRacksCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksCreateCreated, error) { // TODO: Validate the params before sending @@ -4959,7 +6433,7 @@ func (a *Client) DcimRacksCreate(params *DcimRacksCreateParams, authInfo runtime PathPattern: "/dcim/racks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4969,12 +6443,18 @@ func (a *Client) DcimRacksCreate(params *DcimRacksCreateParams, authInfo runtime if err != nil { return nil, err } - return result.(*DcimRacksCreateCreated), nil - + success, ok := result.(*DcimRacksCreateCreated) + 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_racks_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRacksDelete dcim racks delete API + DcimRacksDelete dcim racks delete API */ func (a *Client) DcimRacksDelete(params *DcimRacksDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksDeleteNoContent, error) { // TODO: Validate the params before sending @@ -4988,7 +6468,7 @@ func (a *Client) DcimRacksDelete(params *DcimRacksDeleteParams, authInfo runtime PathPattern: "/dcim/racks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -4998,12 +6478,53 @@ func (a *Client) DcimRacksDelete(params *DcimRacksDeleteParams, authInfo runtime if err != nil { return nil, err } - return result.(*DcimRacksDeleteNoContent), nil + success, ok := result.(*DcimRacksDeleteNoContent) + 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_racks_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimRacksElevation Rack elevation representing the list of rack units. Also supports rendering the elevation as an SVG. +*/ +func (a *Client) DcimRacksElevation(params *DcimRacksElevationParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksElevationOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimRacksElevationParams() + } + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "dcim_racks_elevation", + Method: "GET", + PathPattern: "/dcim/racks/{id}/elevation/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimRacksElevationReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DcimRacksElevationOK) + 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_racks_elevation: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRacksList Call to super to allow for caching + DcimRacksList Call to super to allow for caching */ func (a *Client) DcimRacksList(params *DcimRacksListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksListOK, error) { // TODO: Validate the params before sending @@ -5017,7 +6538,7 @@ func (a *Client) DcimRacksList(params *DcimRacksListParams, authInfo runtime.Cli PathPattern: "/dcim/racks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksListReader{formats: a.formats}, AuthInfo: authInfo, @@ -5027,12 +6548,18 @@ func (a *Client) DcimRacksList(params *DcimRacksListParams, authInfo runtime.Cli if err != nil { return nil, err } - return result.(*DcimRacksListOK), nil - + success, ok := result.(*DcimRacksListOK) + 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_racks_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRacksPartialUpdate dcim racks partial update API + DcimRacksPartialUpdate dcim racks partial update API */ func (a *Client) DcimRacksPartialUpdate(params *DcimRacksPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -5046,7 +6573,7 @@ func (a *Client) DcimRacksPartialUpdate(params *DcimRacksPartialUpdateParams, au PathPattern: "/dcim/racks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5056,12 +6583,18 @@ func (a *Client) DcimRacksPartialUpdate(params *DcimRacksPartialUpdateParams, au if err != nil { return nil, err } - return result.(*DcimRacksPartialUpdateOK), nil - + success, ok := result.(*DcimRacksPartialUpdateOK) + 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_racks_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRacksRead Call to super to allow for caching + DcimRacksRead Call to super to allow for caching */ func (a *Client) DcimRacksRead(params *DcimRacksReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksReadOK, error) { // TODO: Validate the params before sending @@ -5075,7 +6608,7 @@ func (a *Client) DcimRacksRead(params *DcimRacksReadParams, authInfo runtime.Cli PathPattern: "/dcim/racks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -5085,12 +6618,18 @@ func (a *Client) DcimRacksRead(params *DcimRacksReadParams, authInfo runtime.Cli if err != nil { return nil, err } - return result.(*DcimRacksReadOK), nil - + success, ok := result.(*DcimRacksReadOK) + 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_racks_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRacksUnits List rack units (by rack) + DcimRacksUnits List rack units (by rack) */ func (a *Client) DcimRacksUnits(params *DcimRacksUnitsParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksUnitsOK, error) { // TODO: Validate the params before sending @@ -5104,7 +6643,7 @@ func (a *Client) DcimRacksUnits(params *DcimRacksUnitsParams, authInfo runtime.C PathPattern: "/dcim/racks/{id}/units/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksUnitsReader{formats: a.formats}, AuthInfo: authInfo, @@ -5114,12 +6653,18 @@ func (a *Client) DcimRacksUnits(params *DcimRacksUnitsParams, authInfo runtime.C if err != nil { return nil, err } - return result.(*DcimRacksUnitsOK), nil - + success, ok := result.(*DcimRacksUnitsOK) + 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_racks_units: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRacksUpdate dcim racks update API + DcimRacksUpdate dcim racks update API */ func (a *Client) DcimRacksUpdate(params *DcimRacksUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksUpdateOK, error) { // TODO: Validate the params before sending @@ -5133,7 +6678,7 @@ func (a *Client) DcimRacksUpdate(params *DcimRacksUpdateParams, authInfo runtime PathPattern: "/dcim/racks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5143,12 +6688,18 @@ func (a *Client) DcimRacksUpdate(params *DcimRacksUpdateParams, authInfo runtime if err != nil { return nil, err } - return result.(*DcimRacksUpdateOK), nil - + success, ok := result.(*DcimRacksUpdateOK) + 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_racks_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRearPortTemplatesCreate dcim rear port templates create API + DcimRearPortTemplatesCreate dcim rear port templates create API */ func (a *Client) DcimRearPortTemplatesCreate(params *DcimRearPortTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortTemplatesCreateCreated, error) { // TODO: Validate the params before sending @@ -5162,7 +6713,7 @@ func (a *Client) DcimRearPortTemplatesCreate(params *DcimRearPortTemplatesCreate PathPattern: "/dcim/rear-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5172,12 +6723,18 @@ func (a *Client) DcimRearPortTemplatesCreate(params *DcimRearPortTemplatesCreate if err != nil { return nil, err } - return result.(*DcimRearPortTemplatesCreateCreated), nil - + success, ok := result.(*DcimRearPortTemplatesCreateCreated) + 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_rear-port-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRearPortTemplatesDelete dcim rear port templates delete API + DcimRearPortTemplatesDelete dcim rear port templates delete API */ func (a *Client) DcimRearPortTemplatesDelete(params *DcimRearPortTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortTemplatesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -5191,7 +6748,7 @@ func (a *Client) DcimRearPortTemplatesDelete(params *DcimRearPortTemplatesDelete PathPattern: "/dcim/rear-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -5201,12 +6758,18 @@ func (a *Client) DcimRearPortTemplatesDelete(params *DcimRearPortTemplatesDelete if err != nil { return nil, err } - return result.(*DcimRearPortTemplatesDeleteNoContent), nil - + success, ok := result.(*DcimRearPortTemplatesDeleteNoContent) + 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_rear-port-templates_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRearPortTemplatesList Call to super to allow for caching + DcimRearPortTemplatesList Call to super to allow for caching */ func (a *Client) DcimRearPortTemplatesList(params *DcimRearPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -5220,7 +6783,7 @@ func (a *Client) DcimRearPortTemplatesList(params *DcimRearPortTemplatesListPara PathPattern: "/dcim/rear-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -5230,12 +6793,18 @@ func (a *Client) DcimRearPortTemplatesList(params *DcimRearPortTemplatesListPara if err != nil { return nil, err } - return result.(*DcimRearPortTemplatesListOK), nil - + success, ok := result.(*DcimRearPortTemplatesListOK) + 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_rear-port-templates_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRearPortTemplatesPartialUpdate dcim rear port templates partial update API + DcimRearPortTemplatesPartialUpdate dcim rear port templates partial update API */ func (a *Client) DcimRearPortTemplatesPartialUpdate(params *DcimRearPortTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortTemplatesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -5249,7 +6818,7 @@ func (a *Client) DcimRearPortTemplatesPartialUpdate(params *DcimRearPortTemplate PathPattern: "/dcim/rear-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5259,12 +6828,18 @@ func (a *Client) DcimRearPortTemplatesPartialUpdate(params *DcimRearPortTemplate if err != nil { return nil, err } - return result.(*DcimRearPortTemplatesPartialUpdateOK), nil - + success, ok := result.(*DcimRearPortTemplatesPartialUpdateOK) + 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_rear-port-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRearPortTemplatesRead Call to super to allow for caching + DcimRearPortTemplatesRead Call to super to allow for caching */ func (a *Client) DcimRearPortTemplatesRead(params *DcimRearPortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -5278,7 +6853,7 @@ func (a *Client) DcimRearPortTemplatesRead(params *DcimRearPortTemplatesReadPara PathPattern: "/dcim/rear-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -5288,12 +6863,18 @@ func (a *Client) DcimRearPortTemplatesRead(params *DcimRearPortTemplatesReadPara if err != nil { return nil, err } - return result.(*DcimRearPortTemplatesReadOK), nil - + success, ok := result.(*DcimRearPortTemplatesReadOK) + 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_rear-port-templates_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRearPortTemplatesUpdate dcim rear port templates update API + DcimRearPortTemplatesUpdate dcim rear port templates update API */ func (a *Client) DcimRearPortTemplatesUpdate(params *DcimRearPortTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortTemplatesUpdateOK, error) { // TODO: Validate the params before sending @@ -5307,7 +6888,7 @@ func (a *Client) DcimRearPortTemplatesUpdate(params *DcimRearPortTemplatesUpdate PathPattern: "/dcim/rear-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5317,12 +6898,18 @@ func (a *Client) DcimRearPortTemplatesUpdate(params *DcimRearPortTemplatesUpdate if err != nil { return nil, err } - return result.(*DcimRearPortTemplatesUpdateOK), nil - + success, ok := result.(*DcimRearPortTemplatesUpdateOK) + 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_rear-port-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRearPortsCreate dcim rear ports create API + DcimRearPortsCreate dcim rear ports create API */ func (a *Client) DcimRearPortsCreate(params *DcimRearPortsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsCreateCreated, error) { // TODO: Validate the params before sending @@ -5336,7 +6923,7 @@ func (a *Client) DcimRearPortsCreate(params *DcimRearPortsCreateParams, authInfo PathPattern: "/dcim/rear-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5346,12 +6933,18 @@ func (a *Client) DcimRearPortsCreate(params *DcimRearPortsCreateParams, authInfo if err != nil { return nil, err } - return result.(*DcimRearPortsCreateCreated), nil - + success, ok := result.(*DcimRearPortsCreateCreated) + 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_rear-ports_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRearPortsDelete dcim rear ports delete API + DcimRearPortsDelete dcim rear ports delete API */ func (a *Client) DcimRearPortsDelete(params *DcimRearPortsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -5365,7 +6958,7 @@ func (a *Client) DcimRearPortsDelete(params *DcimRearPortsDeleteParams, authInfo PathPattern: "/dcim/rear-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -5375,12 +6968,18 @@ func (a *Client) DcimRearPortsDelete(params *DcimRearPortsDeleteParams, authInfo if err != nil { return nil, err } - return result.(*DcimRearPortsDeleteNoContent), nil - + success, ok := result.(*DcimRearPortsDeleteNoContent) + 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_rear-ports_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRearPortsList Call to super to allow for caching + DcimRearPortsList Call to super to allow for caching */ func (a *Client) DcimRearPortsList(params *DcimRearPortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsListOK, error) { // TODO: Validate the params before sending @@ -5394,7 +6993,7 @@ func (a *Client) DcimRearPortsList(params *DcimRearPortsListParams, authInfo run PathPattern: "/dcim/rear-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -5404,12 +7003,18 @@ func (a *Client) DcimRearPortsList(params *DcimRearPortsListParams, authInfo run if err != nil { return nil, err } - return result.(*DcimRearPortsListOK), nil - + success, ok := result.(*DcimRearPortsListOK) + 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_rear-ports_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRearPortsPartialUpdate dcim rear ports partial update API + DcimRearPortsPartialUpdate dcim rear ports partial update API */ func (a *Client) DcimRearPortsPartialUpdate(params *DcimRearPortsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -5423,7 +7028,7 @@ func (a *Client) DcimRearPortsPartialUpdate(params *DcimRearPortsPartialUpdatePa PathPattern: "/dcim/rear-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5433,12 +7038,18 @@ func (a *Client) DcimRearPortsPartialUpdate(params *DcimRearPortsPartialUpdatePa if err != nil { return nil, err } - return result.(*DcimRearPortsPartialUpdateOK), nil - + success, ok := result.(*DcimRearPortsPartialUpdateOK) + 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_rear-ports_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRearPortsRead Call to super to allow for caching + DcimRearPortsRead Call to super to allow for caching */ func (a *Client) DcimRearPortsRead(params *DcimRearPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsReadOK, error) { // TODO: Validate the params before sending @@ -5452,7 +7063,7 @@ func (a *Client) DcimRearPortsRead(params *DcimRearPortsReadParams, authInfo run PathPattern: "/dcim/rear-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -5462,12 +7073,18 @@ func (a *Client) DcimRearPortsRead(params *DcimRearPortsReadParams, authInfo run if err != nil { return nil, err } - return result.(*DcimRearPortsReadOK), nil - + success, ok := result.(*DcimRearPortsReadOK) + 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_rear-ports_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRearPortsUpdate dcim rear ports update API + DcimRearPortsUpdate dcim rear ports update API */ func (a *Client) DcimRearPortsUpdate(params *DcimRearPortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsUpdateOK, error) { // TODO: Validate the params before sending @@ -5481,7 +7098,7 @@ func (a *Client) DcimRearPortsUpdate(params *DcimRearPortsUpdateParams, authInfo PathPattern: "/dcim/rear-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5491,12 +7108,18 @@ func (a *Client) DcimRearPortsUpdate(params *DcimRearPortsUpdateParams, authInfo if err != nil { return nil, err } - return result.(*DcimRearPortsUpdateOK), nil - + success, ok := result.(*DcimRearPortsUpdateOK) + 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_rear-ports_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRegionsCreate dcim regions create API + DcimRegionsCreate dcim regions create API */ func (a *Client) DcimRegionsCreate(params *DcimRegionsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsCreateCreated, error) { // TODO: Validate the params before sending @@ -5510,7 +7133,7 @@ func (a *Client) DcimRegionsCreate(params *DcimRegionsCreateParams, authInfo run PathPattern: "/dcim/regions/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5520,12 +7143,18 @@ func (a *Client) DcimRegionsCreate(params *DcimRegionsCreateParams, authInfo run if err != nil { return nil, err } - return result.(*DcimRegionsCreateCreated), nil - + success, ok := result.(*DcimRegionsCreateCreated) + 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_regions_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRegionsDelete dcim regions delete API + DcimRegionsDelete dcim regions delete API */ func (a *Client) DcimRegionsDelete(params *DcimRegionsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -5539,7 +7168,7 @@ func (a *Client) DcimRegionsDelete(params *DcimRegionsDeleteParams, authInfo run PathPattern: "/dcim/regions/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -5549,12 +7178,18 @@ func (a *Client) DcimRegionsDelete(params *DcimRegionsDeleteParams, authInfo run if err != nil { return nil, err } - return result.(*DcimRegionsDeleteNoContent), nil - + success, ok := result.(*DcimRegionsDeleteNoContent) + 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_regions_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRegionsList Call to super to allow for caching + DcimRegionsList Call to super to allow for caching */ func (a *Client) DcimRegionsList(params *DcimRegionsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsListOK, error) { // TODO: Validate the params before sending @@ -5568,7 +7203,7 @@ func (a *Client) DcimRegionsList(params *DcimRegionsListParams, authInfo runtime PathPattern: "/dcim/regions/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -5578,12 +7213,18 @@ func (a *Client) DcimRegionsList(params *DcimRegionsListParams, authInfo runtime if err != nil { return nil, err } - return result.(*DcimRegionsListOK), nil - + success, ok := result.(*DcimRegionsListOK) + 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_regions_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRegionsPartialUpdate dcim regions partial update API + DcimRegionsPartialUpdate dcim regions partial update API */ func (a *Client) DcimRegionsPartialUpdate(params *DcimRegionsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -5597,7 +7238,7 @@ func (a *Client) DcimRegionsPartialUpdate(params *DcimRegionsPartialUpdateParams PathPattern: "/dcim/regions/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5607,12 +7248,18 @@ func (a *Client) DcimRegionsPartialUpdate(params *DcimRegionsPartialUpdateParams if err != nil { return nil, err } - return result.(*DcimRegionsPartialUpdateOK), nil - + success, ok := result.(*DcimRegionsPartialUpdateOK) + 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_regions_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRegionsRead Call to super to allow for caching + DcimRegionsRead Call to super to allow for caching */ func (a *Client) DcimRegionsRead(params *DcimRegionsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsReadOK, error) { // TODO: Validate the params before sending @@ -5626,7 +7273,7 @@ func (a *Client) DcimRegionsRead(params *DcimRegionsReadParams, authInfo runtime PathPattern: "/dcim/regions/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -5636,12 +7283,18 @@ func (a *Client) DcimRegionsRead(params *DcimRegionsReadParams, authInfo runtime if err != nil { return nil, err } - return result.(*DcimRegionsReadOK), nil - + success, ok := result.(*DcimRegionsReadOK) + 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_regions_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimRegionsUpdate dcim regions update API + DcimRegionsUpdate dcim regions update API */ func (a *Client) DcimRegionsUpdate(params *DcimRegionsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsUpdateOK, error) { // TODO: Validate the params before sending @@ -5655,7 +7308,7 @@ func (a *Client) DcimRegionsUpdate(params *DcimRegionsUpdateParams, authInfo run PathPattern: "/dcim/regions/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5665,12 +7318,18 @@ func (a *Client) DcimRegionsUpdate(params *DcimRegionsUpdateParams, authInfo run if err != nil { return nil, err } - return result.(*DcimRegionsUpdateOK), nil - + success, ok := result.(*DcimRegionsUpdateOK) + 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_regions_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimSitesCreate dcim sites create API + DcimSitesCreate dcim sites create API */ func (a *Client) DcimSitesCreate(params *DcimSitesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesCreateCreated, error) { // TODO: Validate the params before sending @@ -5684,7 +7343,7 @@ func (a *Client) DcimSitesCreate(params *DcimSitesCreateParams, authInfo runtime PathPattern: "/dcim/sites/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5694,12 +7353,18 @@ func (a *Client) DcimSitesCreate(params *DcimSitesCreateParams, authInfo runtime if err != nil { return nil, err } - return result.(*DcimSitesCreateCreated), nil - + success, ok := result.(*DcimSitesCreateCreated) + 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_sites_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimSitesDelete dcim sites delete API + DcimSitesDelete dcim sites delete API */ func (a *Client) DcimSitesDelete(params *DcimSitesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -5713,7 +7378,7 @@ func (a *Client) DcimSitesDelete(params *DcimSitesDeleteParams, authInfo runtime PathPattern: "/dcim/sites/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -5723,12 +7388,18 @@ func (a *Client) DcimSitesDelete(params *DcimSitesDeleteParams, authInfo runtime if err != nil { return nil, err } - return result.(*DcimSitesDeleteNoContent), nil - + success, ok := result.(*DcimSitesDeleteNoContent) + 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_sites_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimSitesGraphs A convenience method for rendering graphs for a particular site. + DcimSitesGraphs A convenience method for rendering graphs for a particular site. */ func (a *Client) DcimSitesGraphs(params *DcimSitesGraphsParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesGraphsOK, error) { // TODO: Validate the params before sending @@ -5742,7 +7413,7 @@ func (a *Client) DcimSitesGraphs(params *DcimSitesGraphsParams, authInfo runtime PathPattern: "/dcim/sites/{id}/graphs/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesGraphsReader{formats: a.formats}, AuthInfo: authInfo, @@ -5752,12 +7423,18 @@ func (a *Client) DcimSitesGraphs(params *DcimSitesGraphsParams, authInfo runtime if err != nil { return nil, err } - return result.(*DcimSitesGraphsOK), nil - + success, ok := result.(*DcimSitesGraphsOK) + 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_sites_graphs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimSitesList Call to super to allow for caching + DcimSitesList Call to super to allow for caching */ func (a *Client) DcimSitesList(params *DcimSitesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesListOK, error) { // TODO: Validate the params before sending @@ -5771,7 +7448,7 @@ func (a *Client) DcimSitesList(params *DcimSitesListParams, authInfo runtime.Cli PathPattern: "/dcim/sites/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -5781,12 +7458,18 @@ func (a *Client) DcimSitesList(params *DcimSitesListParams, authInfo runtime.Cli if err != nil { return nil, err } - return result.(*DcimSitesListOK), nil - + success, ok := result.(*DcimSitesListOK) + 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_sites_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimSitesPartialUpdate dcim sites partial update API + DcimSitesPartialUpdate dcim sites partial update API */ func (a *Client) DcimSitesPartialUpdate(params *DcimSitesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -5800,7 +7483,7 @@ func (a *Client) DcimSitesPartialUpdate(params *DcimSitesPartialUpdateParams, au PathPattern: "/dcim/sites/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5810,12 +7493,18 @@ func (a *Client) DcimSitesPartialUpdate(params *DcimSitesPartialUpdateParams, au if err != nil { return nil, err } - return result.(*DcimSitesPartialUpdateOK), nil - + success, ok := result.(*DcimSitesPartialUpdateOK) + 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_sites_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimSitesRead Call to super to allow for caching + DcimSitesRead Call to super to allow for caching */ func (a *Client) DcimSitesRead(params *DcimSitesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesReadOK, error) { // TODO: Validate the params before sending @@ -5829,7 +7518,7 @@ func (a *Client) DcimSitesRead(params *DcimSitesReadParams, authInfo runtime.Cli PathPattern: "/dcim/sites/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -5839,12 +7528,18 @@ func (a *Client) DcimSitesRead(params *DcimSitesReadParams, authInfo runtime.Cli if err != nil { return nil, err } - return result.(*DcimSitesReadOK), nil - + success, ok := result.(*DcimSitesReadOK) + 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_sites_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimSitesUpdate dcim sites update API + DcimSitesUpdate dcim sites update API */ func (a *Client) DcimSitesUpdate(params *DcimSitesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesUpdateOK, error) { // TODO: Validate the params before sending @@ -5858,7 +7553,7 @@ func (a *Client) DcimSitesUpdate(params *DcimSitesUpdateParams, authInfo runtime PathPattern: "/dcim/sites/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5868,12 +7563,18 @@ func (a *Client) DcimSitesUpdate(params *DcimSitesUpdateParams, authInfo runtime if err != nil { return nil, err } - return result.(*DcimSitesUpdateOK), nil - + success, ok := result.(*DcimSitesUpdateOK) + 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_sites_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimVirtualChassisCreate dcim virtual chassis create API + DcimVirtualChassisCreate dcim virtual chassis create API */ func (a *Client) DcimVirtualChassisCreate(params *DcimVirtualChassisCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisCreateCreated, error) { // TODO: Validate the params before sending @@ -5887,7 +7588,7 @@ func (a *Client) DcimVirtualChassisCreate(params *DcimVirtualChassisCreateParams PathPattern: "/dcim/virtual-chassis/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5897,12 +7598,18 @@ func (a *Client) DcimVirtualChassisCreate(params *DcimVirtualChassisCreateParams if err != nil { return nil, err } - return result.(*DcimVirtualChassisCreateCreated), nil - + success, ok := result.(*DcimVirtualChassisCreateCreated) + 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_virtual-chassis_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimVirtualChassisDelete dcim virtual chassis delete API + DcimVirtualChassisDelete dcim virtual chassis delete API */ func (a *Client) DcimVirtualChassisDelete(params *DcimVirtualChassisDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisDeleteNoContent, error) { // TODO: Validate the params before sending @@ -5916,7 +7623,7 @@ func (a *Client) DcimVirtualChassisDelete(params *DcimVirtualChassisDeleteParams PathPattern: "/dcim/virtual-chassis/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -5926,12 +7633,18 @@ func (a *Client) DcimVirtualChassisDelete(params *DcimVirtualChassisDeleteParams if err != nil { return nil, err } - return result.(*DcimVirtualChassisDeleteNoContent), nil - + success, ok := result.(*DcimVirtualChassisDeleteNoContent) + 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_virtual-chassis_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimVirtualChassisList Call to super to allow for caching + DcimVirtualChassisList Call to super to allow for caching */ func (a *Client) DcimVirtualChassisList(params *DcimVirtualChassisListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisListOK, error) { // TODO: Validate the params before sending @@ -5945,7 +7658,7 @@ func (a *Client) DcimVirtualChassisList(params *DcimVirtualChassisListParams, au PathPattern: "/dcim/virtual-chassis/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisListReader{formats: a.formats}, AuthInfo: authInfo, @@ -5955,12 +7668,18 @@ func (a *Client) DcimVirtualChassisList(params *DcimVirtualChassisListParams, au if err != nil { return nil, err } - return result.(*DcimVirtualChassisListOK), nil - + success, ok := result.(*DcimVirtualChassisListOK) + 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_virtual-chassis_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimVirtualChassisPartialUpdate dcim virtual chassis partial update API + DcimVirtualChassisPartialUpdate dcim virtual chassis partial update API */ func (a *Client) DcimVirtualChassisPartialUpdate(params *DcimVirtualChassisPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -5974,7 +7693,7 @@ func (a *Client) DcimVirtualChassisPartialUpdate(params *DcimVirtualChassisParti PathPattern: "/dcim/virtual-chassis/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5984,12 +7703,18 @@ func (a *Client) DcimVirtualChassisPartialUpdate(params *DcimVirtualChassisParti if err != nil { return nil, err } - return result.(*DcimVirtualChassisPartialUpdateOK), nil - + success, ok := result.(*DcimVirtualChassisPartialUpdateOK) + 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_virtual-chassis_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimVirtualChassisRead Call to super to allow for caching + DcimVirtualChassisRead Call to super to allow for caching */ func (a *Client) DcimVirtualChassisRead(params *DcimVirtualChassisReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisReadOK, error) { // TODO: Validate the params before sending @@ -6003,7 +7728,7 @@ func (a *Client) DcimVirtualChassisRead(params *DcimVirtualChassisReadParams, au PathPattern: "/dcim/virtual-chassis/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -6013,12 +7738,18 @@ func (a *Client) DcimVirtualChassisRead(params *DcimVirtualChassisReadParams, au if err != nil { return nil, err } - return result.(*DcimVirtualChassisReadOK), nil - + success, ok := result.(*DcimVirtualChassisReadOK) + 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_virtual-chassis_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -DcimVirtualChassisUpdate dcim virtual chassis update API + DcimVirtualChassisUpdate dcim virtual chassis update API */ func (a *Client) DcimVirtualChassisUpdate(params *DcimVirtualChassisUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisUpdateOK, error) { // TODO: Validate the params before sending @@ -6032,7 +7763,7 @@ func (a *Client) DcimVirtualChassisUpdate(params *DcimVirtualChassisUpdateParams PathPattern: "/dcim/virtual-chassis/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -6042,8 +7773,14 @@ func (a *Client) DcimVirtualChassisUpdate(params *DcimVirtualChassisUpdateParams if err != nil { return nil, err } - return result.(*DcimVirtualChassisUpdateOK), nil - + success, ok := result.(*DcimVirtualChassisUpdateOK) + 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_virtual-chassis_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 diff --git a/netbox/client/dcim/dcim_connected_device_list_parameters.go b/netbox/client/dcim/dcim_connected_device_list_parameters.go index 02236fd2a92a7d64cd94725688d85b7cccaf7c9f..df2b117bbb2dff5630e897bf78835a07de3b8066 100644 --- a/netbox/client/dcim/dcim_connected_device_list_parameters.go +++ b/netbox/client/dcim/dcim_connected_device_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_connected_device_list_responses.go b/netbox/client/dcim/dcim_connected_device_list_responses.go index 042ea96721cf99e5e8a9b8569d68e86daeee57c2..89af8877b80ad6fd5dc97a15f572499826795ceb 100644 --- a/netbox/client/dcim/dcim_connected_device_list_responses.go +++ b/netbox/client/dcim/dcim_connected_device_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConnectedDeviceListReader is a Reader for the DcimConnectedDeviceList structure. @@ -38,7 +39,6 @@ type DcimConnectedDeviceListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConnectedDeviceListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConnectedDeviceListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConnectedDeviceListOK) Error() string { return fmt.Sprintf("[GET /dcim/connected-device/][%d] dcimConnectedDeviceListOK %+v", 200, o.Payload) } +func (o *DcimConnectedDeviceListOK) GetPayload() *models.Device { + return o.Payload +} + func (o *DcimConnectedDeviceListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Device) diff --git a/netbox/client/dcim/dcim_console_connections_list_parameters.go b/netbox/client/dcim/dcim_console_connections_list_parameters.go index 6e709573659dae1ab6e3faf16153a5f50812a9bf..99e7df67c79922cfcde3fb82a6c32c4fb4240014 100644 --- a/netbox/client/dcim/dcim_console_connections_list_parameters.go +++ b/netbox/client/dcim/dcim_console_connections_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -80,6 +81,8 @@ type DcimConsoleConnectionsListParams struct { ConnectionStatus *string /*Device*/ Device *string + /*DeviceID*/ + DeviceID *string /*Limit Number of results to return per page. @@ -155,6 +158,17 @@ 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) @@ -239,6 +253,22 @@ func (o *DcimConsoleConnectionsListParams) WriteToRequest(r runtime.ClientReques } + 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 diff --git a/netbox/client/dcim/dcim_console_connections_list_responses.go b/netbox/client/dcim/dcim_console_connections_list_responses.go index ce287fb5745d42fff54c06685ded771de5414e97..5331820486d1b8af722898a939f058e67a27ac82 100644 --- a/netbox/client/dcim/dcim_console_connections_list_responses.go +++ b/netbox/client/dcim/dcim_console_connections_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsoleConnectionsListReader is a Reader for the DcimConsoleConnectionsList structure. @@ -42,7 +43,6 @@ type DcimConsoleConnectionsListReader struct { // 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 { @@ -72,6 +72,10 @@ 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) diff --git a/netbox/client/dcim/dcim_console_port_templates_create_parameters.go b/netbox/client/dcim/dcim_console_port_templates_create_parameters.go index 1b67590a442702fcac49df6bce694bb19e5272e5..8de5957ad587d5f37ccc24177228ebdd20d5142a 100644 --- a/netbox/client/dcim/dcim_console_port_templates_create_parameters.go +++ b/netbox/client/dcim/dcim_console_port_templates_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimConsolePortTemplatesCreateParams creates a new DcimConsolePortTemplatesCreateParams object diff --git a/netbox/client/dcim/dcim_console_port_templates_create_responses.go b/netbox/client/dcim/dcim_console_port_templates_create_responses.go index b12fe3b4cf916c8c19d13658b723373113170878..670ebf785feeab87a572bbcf368200d55859519f 100644 --- a/netbox/client/dcim/dcim_console_port_templates_create_responses.go +++ b/netbox/client/dcim/dcim_console_port_templates_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsolePortTemplatesCreateReader is a Reader for the DcimConsolePortTemplatesCreate structure. @@ -38,7 +39,6 @@ type DcimConsolePortTemplatesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsolePortTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimConsolePortTemplatesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsolePortTemplatesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/console-port-templates/][%d] dcimConsolePortTemplatesCreateCreated %+v", 201, o.Payload) } +func (o *DcimConsolePortTemplatesCreateCreated) GetPayload() *models.ConsolePortTemplate { + return o.Payload +} + func (o *DcimConsolePortTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsolePortTemplate) diff --git a/netbox/client/dcim/dcim_console_port_templates_delete_parameters.go b/netbox/client/dcim/dcim_console_port_templates_delete_parameters.go index fec625f4c9c2879f5809477413561610eb8c0e45..b22ec41a0134a1c175075c625201c6642ec7ea72 100644 --- a/netbox/client/dcim/dcim_console_port_templates_delete_parameters.go +++ b/netbox/client/dcim/dcim_console_port_templates_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_console_port_templates_delete_responses.go b/netbox/client/dcim/dcim_console_port_templates_delete_responses.go index 60f7f0a53cac9140de020f74863631247c7f5a40..351d4a3bc8ee9c256da5f18ab9dc4b4588f104f8 100644 --- a/netbox/client/dcim/dcim_console_port_templates_delete_responses.go +++ b/netbox/client/dcim/dcim_console_port_templates_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimConsolePortTemplatesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsolePortTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimConsolePortTemplatesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_console_port_templates_list_parameters.go b/netbox/client/dcim/dcim_console_port_templates_list_parameters.go index 9a36b54011cb37d000777dc9e6ef1c781a8296c4..6182d826d432b551faefb30f71b63afcdc8f20d6 100644 --- a/netbox/client/dcim/dcim_console_port_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_console_port_templates_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -94,6 +95,8 @@ type DcimConsolePortTemplatesListParams struct { Offset *int64 /*Q*/ Q *string + /*Type*/ + Type *string timeout time.Duration Context context.Context @@ -199,6 +202,17 @@ func (o *DcimConsolePortTemplatesListParams) SetQ(q *string) { o.Q = q } +// WithType adds the typeVar to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) WithType(typeVar *string) *DcimConsolePortTemplatesListParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) SetType(typeVar *string) { + o.Type = typeVar +} + // WriteToRequest writes these params to a swagger request func (o *DcimConsolePortTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -303,6 +317,22 @@ func (o *DcimConsolePortTemplatesListParams) WriteToRequest(r runtime.ClientRequ } + if o.Type != nil { + + // query param type + var qrType string + if o.Type != nil { + qrType = *o.Type + } + qType := qrType + if qType != "" { + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_console_port_templates_list_responses.go b/netbox/client/dcim/dcim_console_port_templates_list_responses.go index a5d303a2d789dcbe61d950c99e5885a732b47d64..5bac1bf4c8b747cb754c5fee7138460f1c46e2b7 100644 --- a/netbox/client/dcim/dcim_console_port_templates_list_responses.go +++ b/netbox/client/dcim/dcim_console_port_templates_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsolePortTemplatesListReader is a Reader for the DcimConsolePortTemplatesList structure. @@ -42,7 +43,6 @@ type DcimConsolePortTemplatesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsolePortTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsolePortTemplatesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimConsolePortTemplatesListOK) Error() string { return fmt.Sprintf("[GET /dcim/console-port-templates/][%d] dcimConsolePortTemplatesListOK %+v", 200, o.Payload) } +func (o *DcimConsolePortTemplatesListOK) GetPayload() *DcimConsolePortTemplatesListOKBody { + return o.Payload +} + func (o *DcimConsolePortTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimConsolePortTemplatesListOKBody) diff --git a/netbox/client/dcim/dcim_console_port_templates_partial_update_parameters.go b/netbox/client/dcim/dcim_console_port_templates_partial_update_parameters.go index 676fe2a8932d12330efe0b441ca6d9f7d1736916..8ad968e8720e228d487b888fb0593973d26343f3 100644 --- a/netbox/client/dcim/dcim_console_port_templates_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_console_port_templates_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimConsolePortTemplatesPartialUpdateParams creates a new DcimConsolePortTemplatesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_console_port_templates_partial_update_responses.go b/netbox/client/dcim/dcim_console_port_templates_partial_update_responses.go index c3ec90a08e581632ec11395824b6582ace86b699..6f7c6711671747d76e56a4b640717c533c787144 100644 --- a/netbox/client/dcim/dcim_console_port_templates_partial_update_responses.go +++ b/netbox/client/dcim/dcim_console_port_templates_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsolePortTemplatesPartialUpdateReader is a Reader for the DcimConsolePortTemplatesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimConsolePortTemplatesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsolePortTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsolePortTemplatesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsolePortTemplatesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/console-port-templates/{id}/][%d] dcimConsolePortTemplatesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimConsolePortTemplatesPartialUpdateOK) GetPayload() *models.ConsolePortTemplate { + return o.Payload +} + func (o *DcimConsolePortTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsolePortTemplate) diff --git a/netbox/client/dcim/dcim_console_port_templates_read_parameters.go b/netbox/client/dcim/dcim_console_port_templates_read_parameters.go index ddec45e2393902e26fbc730054e4ce9869c73a57..4124dcf0a7dfcd4025af218488f682afd57d4dc9 100644 --- a/netbox/client/dcim/dcim_console_port_templates_read_parameters.go +++ b/netbox/client/dcim/dcim_console_port_templates_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_console_port_templates_read_responses.go b/netbox/client/dcim/dcim_console_port_templates_read_responses.go index d1ceb33bef9a79969b1059fb9ebb78839c71ce7d..82f3d35695bdc35051333290a6214fb88426d89a 100644 --- a/netbox/client/dcim/dcim_console_port_templates_read_responses.go +++ b/netbox/client/dcim/dcim_console_port_templates_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsolePortTemplatesReadReader is a Reader for the DcimConsolePortTemplatesRead structure. @@ -38,7 +39,6 @@ type DcimConsolePortTemplatesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsolePortTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsolePortTemplatesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsolePortTemplatesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/console-port-templates/{id}/][%d] dcimConsolePortTemplatesReadOK %+v", 200, o.Payload) } +func (o *DcimConsolePortTemplatesReadOK) GetPayload() *models.ConsolePortTemplate { + return o.Payload +} + func (o *DcimConsolePortTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsolePortTemplate) diff --git a/netbox/client/dcim/dcim_console_port_templates_update_parameters.go b/netbox/client/dcim/dcim_console_port_templates_update_parameters.go index 9e63ccebd4e379e32daf7be84664421fdd5e8634..89bb1f55819514f00887edc69f394774b269a6cb 100644 --- a/netbox/client/dcim/dcim_console_port_templates_update_parameters.go +++ b/netbox/client/dcim/dcim_console_port_templates_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimConsolePortTemplatesUpdateParams creates a new DcimConsolePortTemplatesUpdateParams object diff --git a/netbox/client/dcim/dcim_console_port_templates_update_responses.go b/netbox/client/dcim/dcim_console_port_templates_update_responses.go index 1b1096a9c172145de4e528a8f638d03ea5e28883..eb5a3237d3f535c86894887179cbb90349f54104 100644 --- a/netbox/client/dcim/dcim_console_port_templates_update_responses.go +++ b/netbox/client/dcim/dcim_console_port_templates_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsolePortTemplatesUpdateReader is a Reader for the DcimConsolePortTemplatesUpdate structure. @@ -38,7 +39,6 @@ type DcimConsolePortTemplatesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsolePortTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsolePortTemplatesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsolePortTemplatesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/console-port-templates/{id}/][%d] dcimConsolePortTemplatesUpdateOK %+v", 200, o.Payload) } +func (o *DcimConsolePortTemplatesUpdateOK) GetPayload() *models.ConsolePortTemplate { + return o.Payload +} + func (o *DcimConsolePortTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsolePortTemplate) diff --git a/netbox/client/dcim/dcim_console_ports_create_parameters.go b/netbox/client/dcim/dcim_console_ports_create_parameters.go index b28ad0c7ca92cacfd0d5a09feebbf20d416ad1ff..1595c7038252d70cdba7d54102f9b691adfd7e6b 100644 --- a/netbox/client/dcim/dcim_console_ports_create_parameters.go +++ b/netbox/client/dcim/dcim_console_ports_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimConsolePortsCreateParams creates a new DcimConsolePortsCreateParams object diff --git a/netbox/client/dcim/dcim_console_ports_create_responses.go b/netbox/client/dcim/dcim_console_ports_create_responses.go index 5405349d9570de770a832071d00cc6e1228472e0..a9fcfb65fc92c5f66d1d44e13b9134a6fb310ed3 100644 --- a/netbox/client/dcim/dcim_console_ports_create_responses.go +++ b/netbox/client/dcim/dcim_console_ports_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsolePortsCreateReader is a Reader for the DcimConsolePortsCreate structure. @@ -38,7 +39,6 @@ type DcimConsolePortsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsolePortsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimConsolePortsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsolePortsCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/console-ports/][%d] dcimConsolePortsCreateCreated %+v", 201, o.Payload) } +func (o *DcimConsolePortsCreateCreated) GetPayload() *models.ConsolePort { + return o.Payload +} + func (o *DcimConsolePortsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsolePort) diff --git a/netbox/client/dcim/dcim_console_ports_delete_parameters.go b/netbox/client/dcim/dcim_console_ports_delete_parameters.go index 4229a32f8907bca5e932bba2c4bce94012bf4d43..60c7e9eea54786723b1cc8062957714046a71960 100644 --- a/netbox/client/dcim/dcim_console_ports_delete_parameters.go +++ b/netbox/client/dcim/dcim_console_ports_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_console_ports_delete_responses.go b/netbox/client/dcim/dcim_console_ports_delete_responses.go index 1d41ab5a3d8e4841f0504d7da2af497d1dcb98b7..1ef8ef4d1394ac978412116a730fc8747714c717 100644 --- a/netbox/client/dcim/dcim_console_ports_delete_responses.go +++ b/netbox/client/dcim/dcim_console_ports_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimConsolePortsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsolePortsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimConsolePortsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_console_ports_list_parameters.go b/netbox/client/dcim/dcim_console_ports_list_parameters.go index ef63c063794818580d1f8f7ae37804913819e24e..d2b1c4ac50fdd5531162810b613236993bbeb3f4 100644 --- a/netbox/client/dcim/dcim_console_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_console_ports_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -102,8 +103,18 @@ type DcimConsolePortsListParams struct { Offset *int64 /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string + /*Site*/ + Site *string + /*SiteID*/ + SiteID *string /*Tag*/ Tag *string + /*Type*/ + Type *string timeout time.Duration Context context.Context @@ -253,6 +264,50 @@ func (o *DcimConsolePortsListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithRegion(region *string) *DcimConsolePortsListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithRegionID(regionID *string) *DcimConsolePortsListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + +// WithSite adds the site to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithSite(site *string) *DcimConsolePortsListParams { + o.SetSite(site) + return o +} + +// SetSite adds the site to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetSite(site *string) { + o.Site = site +} + +// WithSiteID adds the siteID to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithSiteID(siteID *string) *DcimConsolePortsListParams { + o.SetSiteID(siteID) + return o +} + +// SetSiteID adds the siteId to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetSiteID(siteID *string) { + o.SiteID = siteID +} + // WithTag adds the tag to the dcim console ports list params func (o *DcimConsolePortsListParams) WithTag(tag *string) *DcimConsolePortsListParams { o.SetTag(tag) @@ -264,6 +319,17 @@ func (o *DcimConsolePortsListParams) SetTag(tag *string) { o.Tag = tag } +// WithType adds the typeVar to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithType(typeVar *string) *DcimConsolePortsListParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetType(typeVar *string) { + o.Type = typeVar +} + // WriteToRequest writes these params to a swagger request func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -432,6 +498,70 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + + if o.Site != nil { + + // query param site + var qrSite string + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + + } + if o.Tag != nil { // query param tag @@ -448,6 +578,22 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } + if o.Type != nil { + + // query param type + var qrType string + if o.Type != nil { + qrType = *o.Type + } + qType := qrType + if qType != "" { + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_console_ports_list_responses.go b/netbox/client/dcim/dcim_console_ports_list_responses.go index 0446211e1b86fe685d667d4ca068a197da5a9477..a07c19e505420cc927d35d062d37cb1ac4a51bfe 100644 --- a/netbox/client/dcim/dcim_console_ports_list_responses.go +++ b/netbox/client/dcim/dcim_console_ports_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsolePortsListReader is a Reader for the DcimConsolePortsList structure. @@ -42,7 +43,6 @@ type DcimConsolePortsListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsolePortsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsolePortsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimConsolePortsListOK) Error() string { return fmt.Sprintf("[GET /dcim/console-ports/][%d] dcimConsolePortsListOK %+v", 200, o.Payload) } +func (o *DcimConsolePortsListOK) GetPayload() *DcimConsolePortsListOKBody { + return o.Payload +} + func (o *DcimConsolePortsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimConsolePortsListOKBody) diff --git a/netbox/client/dcim/dcim_console_ports_partial_update_parameters.go b/netbox/client/dcim/dcim_console_ports_partial_update_parameters.go index 405114ea36fcbacae0e2da789d85ca813b7cebf5..e600d975ef1a2775c8da57f9dc41d44b5075558a 100644 --- a/netbox/client/dcim/dcim_console_ports_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_console_ports_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimConsolePortsPartialUpdateParams creates a new DcimConsolePortsPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_console_ports_partial_update_responses.go b/netbox/client/dcim/dcim_console_ports_partial_update_responses.go index a2c665beb3e5e878ed8026e3bc4218b61254407d..1280cf7b8fb5c690a026de8136c87c6027ad3295 100644 --- a/netbox/client/dcim/dcim_console_ports_partial_update_responses.go +++ b/netbox/client/dcim/dcim_console_ports_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsolePortsPartialUpdateReader is a Reader for the DcimConsolePortsPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimConsolePortsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsolePortsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsolePortsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsolePortsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/console-ports/{id}/][%d] dcimConsolePortsPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimConsolePortsPartialUpdateOK) GetPayload() *models.ConsolePort { + return o.Payload +} + func (o *DcimConsolePortsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsolePort) diff --git a/netbox/client/dcim/dcim_console_ports_read_parameters.go b/netbox/client/dcim/dcim_console_ports_read_parameters.go index 7a441b70c7b3fdf88784604fddaa124fa591dc4b..4e8d0fa8541b4755a52f4a37cbb1565f11c7b860 100644 --- a/netbox/client/dcim/dcim_console_ports_read_parameters.go +++ b/netbox/client/dcim/dcim_console_ports_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_console_ports_read_responses.go b/netbox/client/dcim/dcim_console_ports_read_responses.go index 1cf15a3040d8d6db0e860f8f7cd310d2a67f71d9..367259606b1820a28238950a744936e5a1dc9fa0 100644 --- a/netbox/client/dcim/dcim_console_ports_read_responses.go +++ b/netbox/client/dcim/dcim_console_ports_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsolePortsReadReader is a Reader for the DcimConsolePortsRead structure. @@ -38,7 +39,6 @@ type DcimConsolePortsReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsolePortsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsolePortsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsolePortsReadOK) Error() string { return fmt.Sprintf("[GET /dcim/console-ports/{id}/][%d] dcimConsolePortsReadOK %+v", 200, o.Payload) } +func (o *DcimConsolePortsReadOK) GetPayload() *models.ConsolePort { + return o.Payload +} + func (o *DcimConsolePortsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsolePort) diff --git a/netbox/client/dcim/dcim_console_ports_trace_parameters.go b/netbox/client/dcim/dcim_console_ports_trace_parameters.go index 34352f7c916eb95b5c6c9c7f76e8d83cf76e4238..0c7215041449cd4d75a5942b6d08aabd5e02fbf6 100644 --- a/netbox/client/dcim/dcim_console_ports_trace_parameters.go +++ b/netbox/client/dcim/dcim_console_ports_trace_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_console_ports_trace_responses.go b/netbox/client/dcim/dcim_console_ports_trace_responses.go index ae355bcb5500f4bb9815a346d65f78b513cb66b9..aed5942491deaf2ca32390496660bf43374224be 100644 --- a/netbox/client/dcim/dcim_console_ports_trace_responses.go +++ b/netbox/client/dcim/dcim_console_ports_trace_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsolePortsTraceReader is a Reader for the DcimConsolePortsTrace structure. @@ -38,7 +39,6 @@ type DcimConsolePortsTraceReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsolePortsTraceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsolePortsTraceOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsolePortsTraceOK) Error() string { return fmt.Sprintf("[GET /dcim/console-ports/{id}/trace/][%d] dcimConsolePortsTraceOK %+v", 200, o.Payload) } +func (o *DcimConsolePortsTraceOK) GetPayload() *models.ConsolePort { + return o.Payload +} + func (o *DcimConsolePortsTraceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsolePort) diff --git a/netbox/client/dcim/dcim_console_ports_update_parameters.go b/netbox/client/dcim/dcim_console_ports_update_parameters.go index fc4255cc0518320af0bb79ae8bde5bf0860c0ff6..8bf9363fcc33d489d9419b1bacb53596d1877024 100644 --- a/netbox/client/dcim/dcim_console_ports_update_parameters.go +++ b/netbox/client/dcim/dcim_console_ports_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimConsolePortsUpdateParams creates a new DcimConsolePortsUpdateParams object diff --git a/netbox/client/dcim/dcim_console_ports_update_responses.go b/netbox/client/dcim/dcim_console_ports_update_responses.go index 63096b2e2a3a2658add530041541c2ce291cb389..36f1018ff72273334d9407f802b6a73609523349 100644 --- a/netbox/client/dcim/dcim_console_ports_update_responses.go +++ b/netbox/client/dcim/dcim_console_ports_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsolePortsUpdateReader is a Reader for the DcimConsolePortsUpdate structure. @@ -38,7 +39,6 @@ type DcimConsolePortsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsolePortsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsolePortsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsolePortsUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/console-ports/{id}/][%d] dcimConsolePortsUpdateOK %+v", 200, o.Payload) } +func (o *DcimConsolePortsUpdateOK) GetPayload() *models.ConsolePort { + return o.Payload +} + func (o *DcimConsolePortsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsolePort) diff --git a/netbox/client/dcim/dcim_console_server_port_templates_create_parameters.go b/netbox/client/dcim/dcim_console_server_port_templates_create_parameters.go index f2f11fb97928cbad60fcaf5fee31ecf43c0692fa..ba2c9d7ea4d8bfbee8a5a51b4438a290f9bc59a2 100644 --- a/netbox/client/dcim/dcim_console_server_port_templates_create_parameters.go +++ b/netbox/client/dcim/dcim_console_server_port_templates_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimConsoleServerPortTemplatesCreateParams creates a new DcimConsoleServerPortTemplatesCreateParams object diff --git a/netbox/client/dcim/dcim_console_server_port_templates_create_responses.go b/netbox/client/dcim/dcim_console_server_port_templates_create_responses.go index 5752bdb855adba454fd261a05b0e4358ab850818..9fbdafaf692bb531e7cf07637755caa8233f547c 100644 --- a/netbox/client/dcim/dcim_console_server_port_templates_create_responses.go +++ b/netbox/client/dcim/dcim_console_server_port_templates_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsoleServerPortTemplatesCreateReader is a Reader for the DcimConsoleServerPortTemplatesCreate structure. @@ -38,7 +39,6 @@ type DcimConsoleServerPortTemplatesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsoleServerPortTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimConsoleServerPortTemplatesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsoleServerPortTemplatesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/console-server-port-templates/][%d] dcimConsoleServerPortTemplatesCreateCreated %+v", 201, o.Payload) } +func (o *DcimConsoleServerPortTemplatesCreateCreated) GetPayload() *models.ConsoleServerPortTemplate { + return o.Payload +} + func (o *DcimConsoleServerPortTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsoleServerPortTemplate) diff --git a/netbox/client/dcim/dcim_console_server_port_templates_delete_parameters.go b/netbox/client/dcim/dcim_console_server_port_templates_delete_parameters.go index 35922d40e9626243727c31339269996262e498ce..21933f20e8efa652a6ebb3da24f72b5f5a2b42b0 100644 --- a/netbox/client/dcim/dcim_console_server_port_templates_delete_parameters.go +++ b/netbox/client/dcim/dcim_console_server_port_templates_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_console_server_port_templates_delete_responses.go b/netbox/client/dcim/dcim_console_server_port_templates_delete_responses.go index 42c7d417a37948e426ece4778f75fe080e5cbd7a..8469cc62ad9575abfcf7eb089fafc6efe1b0ac49 100644 --- a/netbox/client/dcim/dcim_console_server_port_templates_delete_responses.go +++ b/netbox/client/dcim/dcim_console_server_port_templates_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimConsoleServerPortTemplatesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsoleServerPortTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimConsoleServerPortTemplatesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go b/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go index da847d0591baa43a9e8a54e98515e5adcd5b6266..d575a1ab7430e5ae464f563d59b36192eb269eb7 100644 --- a/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -94,6 +95,8 @@ type DcimConsoleServerPortTemplatesListParams struct { Offset *int64 /*Q*/ Q *string + /*Type*/ + Type *string timeout time.Duration Context context.Context @@ -199,6 +202,17 @@ func (o *DcimConsoleServerPortTemplatesListParams) SetQ(q *string) { o.Q = q } +// WithType adds the typeVar to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) WithType(typeVar *string) *DcimConsoleServerPortTemplatesListParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) SetType(typeVar *string) { + o.Type = typeVar +} + // WriteToRequest writes these params to a swagger request func (o *DcimConsoleServerPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -303,6 +317,22 @@ func (o *DcimConsoleServerPortTemplatesListParams) WriteToRequest(r runtime.Clie } + if o.Type != nil { + + // query param type + var qrType string + if o.Type != nil { + qrType = *o.Type + } + qType := qrType + if qType != "" { + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go b/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go index d824fe3bcb7404840499d3aa0414426364974430..9955e06e996efa737f15c0cf09cad17259235d4d 100644 --- a/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go +++ b/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsoleServerPortTemplatesListReader is a Reader for the DcimConsoleServerPortTemplatesList structure. @@ -42,7 +43,6 @@ type DcimConsoleServerPortTemplatesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsoleServerPortTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsoleServerPortTemplatesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimConsoleServerPortTemplatesListOK) Error() string { return fmt.Sprintf("[GET /dcim/console-server-port-templates/][%d] dcimConsoleServerPortTemplatesListOK %+v", 200, o.Payload) } +func (o *DcimConsoleServerPortTemplatesListOK) GetPayload() *DcimConsoleServerPortTemplatesListOKBody { + return o.Payload +} + func (o *DcimConsoleServerPortTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimConsoleServerPortTemplatesListOKBody) diff --git a/netbox/client/dcim/dcim_console_server_port_templates_partial_update_parameters.go b/netbox/client/dcim/dcim_console_server_port_templates_partial_update_parameters.go index 5d1e3b3862567e8ba71d1c04a81ac8d8abce3f4e..7ecdbe8bff165687263578fc2062bfac1bc46a8b 100644 --- a/netbox/client/dcim/dcim_console_server_port_templates_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_console_server_port_templates_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimConsoleServerPortTemplatesPartialUpdateParams creates a new DcimConsoleServerPortTemplatesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_console_server_port_templates_partial_update_responses.go b/netbox/client/dcim/dcim_console_server_port_templates_partial_update_responses.go index 661df679e9bd7d84927d3f23435a7535e257a1f2..a338c14b9ecb5073b8f5699df3eb40e71a451071 100644 --- a/netbox/client/dcim/dcim_console_server_port_templates_partial_update_responses.go +++ b/netbox/client/dcim/dcim_console_server_port_templates_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsoleServerPortTemplatesPartialUpdateReader is a Reader for the DcimConsoleServerPortTemplatesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimConsoleServerPortTemplatesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsoleServerPortTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsoleServerPortTemplatesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsoleServerPortTemplatesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/console-server-port-templates/{id}/][%d] dcimConsoleServerPortTemplatesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimConsoleServerPortTemplatesPartialUpdateOK) GetPayload() *models.ConsoleServerPortTemplate { + return o.Payload +} + func (o *DcimConsoleServerPortTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsoleServerPortTemplate) diff --git a/netbox/client/dcim/dcim_console_server_port_templates_read_parameters.go b/netbox/client/dcim/dcim_console_server_port_templates_read_parameters.go index 655b890df5f9119c9ad9c217a9faf213e0bf2cc1..ede7d5d32ec31517f46bf3f3ad2379af503cf252 100644 --- a/netbox/client/dcim/dcim_console_server_port_templates_read_parameters.go +++ b/netbox/client/dcim/dcim_console_server_port_templates_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_console_server_port_templates_read_responses.go b/netbox/client/dcim/dcim_console_server_port_templates_read_responses.go index f958988ebe03d0643529e5801d3fd7c8e79a7728..2f4144c22014e15ea63df97115409057853f1477 100644 --- a/netbox/client/dcim/dcim_console_server_port_templates_read_responses.go +++ b/netbox/client/dcim/dcim_console_server_port_templates_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsoleServerPortTemplatesReadReader is a Reader for the DcimConsoleServerPortTemplatesRead structure. @@ -38,7 +39,6 @@ type DcimConsoleServerPortTemplatesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsoleServerPortTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsoleServerPortTemplatesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsoleServerPortTemplatesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/console-server-port-templates/{id}/][%d] dcimConsoleServerPortTemplatesReadOK %+v", 200, o.Payload) } +func (o *DcimConsoleServerPortTemplatesReadOK) GetPayload() *models.ConsoleServerPortTemplate { + return o.Payload +} + func (o *DcimConsoleServerPortTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsoleServerPortTemplate) diff --git a/netbox/client/dcim/dcim_console_server_port_templates_update_parameters.go b/netbox/client/dcim/dcim_console_server_port_templates_update_parameters.go index 938db13a9a0d5fbe1451060a09efdcd63243bf1c..2b04f7a2503ae66d8e376827f67affc467ba4631 100644 --- a/netbox/client/dcim/dcim_console_server_port_templates_update_parameters.go +++ b/netbox/client/dcim/dcim_console_server_port_templates_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimConsoleServerPortTemplatesUpdateParams creates a new DcimConsoleServerPortTemplatesUpdateParams object diff --git a/netbox/client/dcim/dcim_console_server_port_templates_update_responses.go b/netbox/client/dcim/dcim_console_server_port_templates_update_responses.go index f8e80b6dfc7eb5e215c1f1f7a1d4d6fe25f4dde8..77629858701663213f6927dc7d456625997bf4cb 100644 --- a/netbox/client/dcim/dcim_console_server_port_templates_update_responses.go +++ b/netbox/client/dcim/dcim_console_server_port_templates_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsoleServerPortTemplatesUpdateReader is a Reader for the DcimConsoleServerPortTemplatesUpdate structure. @@ -38,7 +39,6 @@ type DcimConsoleServerPortTemplatesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsoleServerPortTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsoleServerPortTemplatesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsoleServerPortTemplatesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/console-server-port-templates/{id}/][%d] dcimConsoleServerPortTemplatesUpdateOK %+v", 200, o.Payload) } +func (o *DcimConsoleServerPortTemplatesUpdateOK) GetPayload() *models.ConsoleServerPortTemplate { + return o.Payload +} + func (o *DcimConsoleServerPortTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsoleServerPortTemplate) diff --git a/netbox/client/dcim/dcim_console_server_ports_create_parameters.go b/netbox/client/dcim/dcim_console_server_ports_create_parameters.go index 3ac20961c45596669c7174ffb7637079227e1c60..632fe6be2fae84e631fa3e835ed8066f17cf1a79 100644 --- a/netbox/client/dcim/dcim_console_server_ports_create_parameters.go +++ b/netbox/client/dcim/dcim_console_server_ports_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimConsoleServerPortsCreateParams creates a new DcimConsoleServerPortsCreateParams object diff --git a/netbox/client/dcim/dcim_console_server_ports_create_responses.go b/netbox/client/dcim/dcim_console_server_ports_create_responses.go index 9d751bbb80ab2c08c0db56f9318a29dc242d3b00..261f1eb77a18edc18589da2ebd350be932721a82 100644 --- a/netbox/client/dcim/dcim_console_server_ports_create_responses.go +++ b/netbox/client/dcim/dcim_console_server_ports_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsoleServerPortsCreateReader is a Reader for the DcimConsoleServerPortsCreate structure. @@ -38,7 +39,6 @@ type DcimConsoleServerPortsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsoleServerPortsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimConsoleServerPortsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsoleServerPortsCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/console-server-ports/][%d] dcimConsoleServerPortsCreateCreated %+v", 201, o.Payload) } +func (o *DcimConsoleServerPortsCreateCreated) GetPayload() *models.ConsoleServerPort { + return o.Payload +} + func (o *DcimConsoleServerPortsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsoleServerPort) diff --git a/netbox/client/dcim/dcim_console_server_ports_delete_parameters.go b/netbox/client/dcim/dcim_console_server_ports_delete_parameters.go index 53506437d17789a03c3a3d63de28e7d2b27ca64d..75fb800931c7a91b638a4e413e8bee21610125b6 100644 --- a/netbox/client/dcim/dcim_console_server_ports_delete_parameters.go +++ b/netbox/client/dcim/dcim_console_server_ports_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_console_server_ports_delete_responses.go b/netbox/client/dcim/dcim_console_server_ports_delete_responses.go index 6332fe0b2f364db0f1ef45f03f404015c0a35b1d..8399224f034efed039b08e3ff07fe718750efa16 100644 --- a/netbox/client/dcim/dcim_console_server_ports_delete_responses.go +++ b/netbox/client/dcim/dcim_console_server_ports_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimConsoleServerPortsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsoleServerPortsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimConsoleServerPortsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { 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 1577bf03f7ba18bf618467a724378be23e924b43..b7b8ae562baa94f32109ae2246324f6db5d52325 100644 --- a/netbox/client/dcim/dcim_console_server_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_console_server_ports_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -102,8 +103,18 @@ type DcimConsoleServerPortsListParams struct { Offset *int64 /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string + /*Site*/ + Site *string + /*SiteID*/ + SiteID *string /*Tag*/ Tag *string + /*Type*/ + Type *string timeout time.Duration Context context.Context @@ -253,6 +264,50 @@ func (o *DcimConsoleServerPortsListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithRegion(region *string) *DcimConsoleServerPortsListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithRegionID(regionID *string) *DcimConsoleServerPortsListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + +// WithSite adds the site to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithSite(site *string) *DcimConsoleServerPortsListParams { + o.SetSite(site) + return o +} + +// SetSite adds the site to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetSite(site *string) { + o.Site = site +} + +// WithSiteID adds the siteID to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithSiteID(siteID *string) *DcimConsoleServerPortsListParams { + o.SetSiteID(siteID) + return o +} + +// SetSiteID adds the siteId to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetSiteID(siteID *string) { + o.SiteID = siteID +} + // WithTag adds the tag to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithTag(tag *string) *DcimConsoleServerPortsListParams { o.SetTag(tag) @@ -264,6 +319,17 @@ func (o *DcimConsoleServerPortsListParams) SetTag(tag *string) { o.Tag = tag } +// WithType adds the typeVar to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithType(typeVar *string) *DcimConsoleServerPortsListParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetType(typeVar *string) { + o.Type = typeVar +} + // WriteToRequest writes these params to a swagger request func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -432,6 +498,70 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + + if o.Site != nil { + + // query param site + var qrSite string + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + + } + if o.Tag != nil { // query param tag @@ -448,6 +578,22 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } + if o.Type != nil { + + // query param type + var qrType string + if o.Type != nil { + qrType = *o.Type + } + qType := qrType + if qType != "" { + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_console_server_ports_list_responses.go b/netbox/client/dcim/dcim_console_server_ports_list_responses.go index 0a7ce2914392e6262f30e534b0e79d9f4273a5fa..4355346b72faf28ee1d7eec23c1ef51245cde582 100644 --- a/netbox/client/dcim/dcim_console_server_ports_list_responses.go +++ b/netbox/client/dcim/dcim_console_server_ports_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsoleServerPortsListReader is a Reader for the DcimConsoleServerPortsList structure. @@ -42,7 +43,6 @@ type DcimConsoleServerPortsListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsoleServerPortsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsoleServerPortsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimConsoleServerPortsListOK) Error() string { return fmt.Sprintf("[GET /dcim/console-server-ports/][%d] dcimConsoleServerPortsListOK %+v", 200, o.Payload) } +func (o *DcimConsoleServerPortsListOK) GetPayload() *DcimConsoleServerPortsListOKBody { + return o.Payload +} + func (o *DcimConsoleServerPortsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimConsoleServerPortsListOKBody) diff --git a/netbox/client/dcim/dcim_console_server_ports_partial_update_parameters.go b/netbox/client/dcim/dcim_console_server_ports_partial_update_parameters.go index ceb534b08edb0a0e9e400e036354a4665d9bd345..6c5587bb963a77f9f4c495085e5fa76f8ca74911 100644 --- a/netbox/client/dcim/dcim_console_server_ports_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_console_server_ports_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimConsoleServerPortsPartialUpdateParams creates a new DcimConsoleServerPortsPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_console_server_ports_partial_update_responses.go b/netbox/client/dcim/dcim_console_server_ports_partial_update_responses.go index eb44a4195d430931375edf4960c5f4c8f534df89..40197ee3e81d7d65eff0049d4381fac704338c27 100644 --- a/netbox/client/dcim/dcim_console_server_ports_partial_update_responses.go +++ b/netbox/client/dcim/dcim_console_server_ports_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsoleServerPortsPartialUpdateReader is a Reader for the DcimConsoleServerPortsPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimConsoleServerPortsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsoleServerPortsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsoleServerPortsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsoleServerPortsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/console-server-ports/{id}/][%d] dcimConsoleServerPortsPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimConsoleServerPortsPartialUpdateOK) GetPayload() *models.ConsoleServerPort { + return o.Payload +} + func (o *DcimConsoleServerPortsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsoleServerPort) diff --git a/netbox/client/dcim/dcim_console_server_ports_read_parameters.go b/netbox/client/dcim/dcim_console_server_ports_read_parameters.go index 0c54c78d966a9ec001b725aa7315dcce0952fd92..52e42942b571ce108c1e758a13a07fe60392ee22 100644 --- a/netbox/client/dcim/dcim_console_server_ports_read_parameters.go +++ b/netbox/client/dcim/dcim_console_server_ports_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_console_server_ports_read_responses.go b/netbox/client/dcim/dcim_console_server_ports_read_responses.go index c5f89488a1eda3677e5da85c216dfb1edfac2296..a0d13185499d69f39188c927e4fbd2659edce0de 100644 --- a/netbox/client/dcim/dcim_console_server_ports_read_responses.go +++ b/netbox/client/dcim/dcim_console_server_ports_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsoleServerPortsReadReader is a Reader for the DcimConsoleServerPortsRead structure. @@ -38,7 +39,6 @@ type DcimConsoleServerPortsReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsoleServerPortsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsoleServerPortsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsoleServerPortsReadOK) Error() string { return fmt.Sprintf("[GET /dcim/console-server-ports/{id}/][%d] dcimConsoleServerPortsReadOK %+v", 200, o.Payload) } +func (o *DcimConsoleServerPortsReadOK) GetPayload() *models.ConsoleServerPort { + return o.Payload +} + func (o *DcimConsoleServerPortsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsoleServerPort) diff --git a/netbox/client/dcim/dcim_console_server_ports_trace_parameters.go b/netbox/client/dcim/dcim_console_server_ports_trace_parameters.go index 6afafa6924a91a142ea36399281af675b9172da4..12fb1e59f288f99f7d3adfd377f29832a9a217ec 100644 --- a/netbox/client/dcim/dcim_console_server_ports_trace_parameters.go +++ b/netbox/client/dcim/dcim_console_server_ports_trace_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_console_server_ports_trace_responses.go b/netbox/client/dcim/dcim_console_server_ports_trace_responses.go index c231f25b96ecef02ffef4f7e0f168a973e7f0c9d..6496f3d515c05979a42c7a2360c5d2d699f0c058 100644 --- a/netbox/client/dcim/dcim_console_server_ports_trace_responses.go +++ b/netbox/client/dcim/dcim_console_server_ports_trace_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsoleServerPortsTraceReader is a Reader for the DcimConsoleServerPortsTrace structure. @@ -38,7 +39,6 @@ type DcimConsoleServerPortsTraceReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsoleServerPortsTraceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsoleServerPortsTraceOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsoleServerPortsTraceOK) Error() string { return fmt.Sprintf("[GET /dcim/console-server-ports/{id}/trace/][%d] dcimConsoleServerPortsTraceOK %+v", 200, o.Payload) } +func (o *DcimConsoleServerPortsTraceOK) GetPayload() *models.ConsoleServerPort { + return o.Payload +} + func (o *DcimConsoleServerPortsTraceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsoleServerPort) diff --git a/netbox/client/dcim/dcim_console_server_ports_update_parameters.go b/netbox/client/dcim/dcim_console_server_ports_update_parameters.go index a6dcae3becc61e7d925ad834f5391097997640f2..7b713bd70b8be172e4b31758baf9a33aed725292 100644 --- a/netbox/client/dcim/dcim_console_server_ports_update_parameters.go +++ b/netbox/client/dcim/dcim_console_server_ports_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimConsoleServerPortsUpdateParams creates a new DcimConsoleServerPortsUpdateParams object diff --git a/netbox/client/dcim/dcim_console_server_ports_update_responses.go b/netbox/client/dcim/dcim_console_server_ports_update_responses.go index 4be92e6d0ba0cd584a9bb84d481b7553fa0306ee..074d66dcccfe647d4af50ed04fb9e2c145e6375c 100644 --- a/netbox/client/dcim/dcim_console_server_ports_update_responses.go +++ b/netbox/client/dcim/dcim_console_server_ports_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimConsoleServerPortsUpdateReader is a Reader for the DcimConsoleServerPortsUpdate structure. @@ -38,7 +39,6 @@ type DcimConsoleServerPortsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimConsoleServerPortsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimConsoleServerPortsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimConsoleServerPortsUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/console-server-ports/{id}/][%d] dcimConsoleServerPortsUpdateOK %+v", 200, o.Payload) } +func (o *DcimConsoleServerPortsUpdateOK) GetPayload() *models.ConsoleServerPort { + return o.Payload +} + func (o *DcimConsoleServerPortsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConsoleServerPort) diff --git a/netbox/client/dcim/dcim_device_bay_templates_create_parameters.go b/netbox/client/dcim/dcim_device_bay_templates_create_parameters.go index b2f7b6e57ed3c43f502e7f9d193c0b3b9d8666f9..0cedebf05a615cf5eeecac9c34117e4087becead 100644 --- a/netbox/client/dcim/dcim_device_bay_templates_create_parameters.go +++ b/netbox/client/dcim/dcim_device_bay_templates_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDeviceBayTemplatesCreateParams creates a new DcimDeviceBayTemplatesCreateParams object diff --git a/netbox/client/dcim/dcim_device_bay_templates_create_responses.go b/netbox/client/dcim/dcim_device_bay_templates_create_responses.go index d269fcd826feb9abf39870cba4e003eb863cff56..5b0fccf330818e66052f848959e60dacc65681e0 100644 --- a/netbox/client/dcim/dcim_device_bay_templates_create_responses.go +++ b/netbox/client/dcim/dcim_device_bay_templates_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceBayTemplatesCreateReader is a Reader for the DcimDeviceBayTemplatesCreate structure. @@ -38,7 +39,6 @@ type DcimDeviceBayTemplatesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceBayTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimDeviceBayTemplatesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceBayTemplatesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/device-bay-templates/][%d] dcimDeviceBayTemplatesCreateCreated %+v", 201, o.Payload) } +func (o *DcimDeviceBayTemplatesCreateCreated) GetPayload() *models.DeviceBayTemplate { + return o.Payload +} + func (o *DcimDeviceBayTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceBayTemplate) diff --git a/netbox/client/dcim/dcim_device_bay_templates_delete_parameters.go b/netbox/client/dcim/dcim_device_bay_templates_delete_parameters.go index 497b07e8096e8bb6e6e7cdc5c002a6b7f2b7daa7..35d7cca5cea6a07d4b4d559941e73dc0948b87d2 100644 --- a/netbox/client/dcim/dcim_device_bay_templates_delete_parameters.go +++ b/netbox/client/dcim/dcim_device_bay_templates_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_device_bay_templates_delete_responses.go b/netbox/client/dcim/dcim_device_bay_templates_delete_responses.go index a3800d096ff9dca9d42a4dca4e9597ead70d3873..44b9ff397caa14bf6dd7f01fd162bf206ddd0825 100644 --- a/netbox/client/dcim/dcim_device_bay_templates_delete_responses.go +++ b/netbox/client/dcim/dcim_device_bay_templates_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimDeviceBayTemplatesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceBayTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimDeviceBayTemplatesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go b/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go index 9f1361c8786155a0d1b4d4b5ae34e8bd24e15759..9d29c0067391f0b63eef5874119d83b64cc57818 100644 --- a/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_device_bay_templates_list_responses.go b/netbox/client/dcim/dcim_device_bay_templates_list_responses.go index 0c2c1e5b6380bc7eea6b2c03db414ee017f20791..7bbb83cb92272e17bce2c25dad25fafb73e6d3bf 100644 --- a/netbox/client/dcim/dcim_device_bay_templates_list_responses.go +++ b/netbox/client/dcim/dcim_device_bay_templates_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceBayTemplatesListReader is a Reader for the DcimDeviceBayTemplatesList structure. @@ -42,7 +43,6 @@ type DcimDeviceBayTemplatesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceBayTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceBayTemplatesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimDeviceBayTemplatesListOK) Error() string { return fmt.Sprintf("[GET /dcim/device-bay-templates/][%d] dcimDeviceBayTemplatesListOK %+v", 200, o.Payload) } +func (o *DcimDeviceBayTemplatesListOK) GetPayload() *DcimDeviceBayTemplatesListOKBody { + return o.Payload +} + func (o *DcimDeviceBayTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimDeviceBayTemplatesListOKBody) diff --git a/netbox/client/dcim/dcim_device_bay_templates_partial_update_parameters.go b/netbox/client/dcim/dcim_device_bay_templates_partial_update_parameters.go index 6b5eb1b9f5b315e08fcfd6caf1908da62ef48c0b..ccdf37b85392b40c5deaf8a1b854c10a6b101ccb 100644 --- a/netbox/client/dcim/dcim_device_bay_templates_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_device_bay_templates_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDeviceBayTemplatesPartialUpdateParams creates a new DcimDeviceBayTemplatesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_device_bay_templates_partial_update_responses.go b/netbox/client/dcim/dcim_device_bay_templates_partial_update_responses.go index cb42dbe9d92e8577acdaa21dd33ab4de895b94d0..af356b32023817fbe572dd126697297d2231fc21 100644 --- a/netbox/client/dcim/dcim_device_bay_templates_partial_update_responses.go +++ b/netbox/client/dcim/dcim_device_bay_templates_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceBayTemplatesPartialUpdateReader is a Reader for the DcimDeviceBayTemplatesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimDeviceBayTemplatesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceBayTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceBayTemplatesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceBayTemplatesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/device-bay-templates/{id}/][%d] dcimDeviceBayTemplatesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimDeviceBayTemplatesPartialUpdateOK) GetPayload() *models.DeviceBayTemplate { + return o.Payload +} + func (o *DcimDeviceBayTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceBayTemplate) diff --git a/netbox/client/dcim/dcim_device_bay_templates_read_parameters.go b/netbox/client/dcim/dcim_device_bay_templates_read_parameters.go index 5054c4075c81f25c5779799b3e858eb8f865670b..96c7d15512dcc878c589024f7a3ebb9faa87f6c8 100644 --- a/netbox/client/dcim/dcim_device_bay_templates_read_parameters.go +++ b/netbox/client/dcim/dcim_device_bay_templates_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_device_bay_templates_read_responses.go b/netbox/client/dcim/dcim_device_bay_templates_read_responses.go index 9e6283ecf7d04c51a2b6ba7f24a74f22686ae3d9..5cb026df5c1c39b7f227e8dcc73d281d3b814edd 100644 --- a/netbox/client/dcim/dcim_device_bay_templates_read_responses.go +++ b/netbox/client/dcim/dcim_device_bay_templates_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceBayTemplatesReadReader is a Reader for the DcimDeviceBayTemplatesRead structure. @@ -38,7 +39,6 @@ type DcimDeviceBayTemplatesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceBayTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceBayTemplatesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceBayTemplatesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/device-bay-templates/{id}/][%d] dcimDeviceBayTemplatesReadOK %+v", 200, o.Payload) } +func (o *DcimDeviceBayTemplatesReadOK) GetPayload() *models.DeviceBayTemplate { + return o.Payload +} + func (o *DcimDeviceBayTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceBayTemplate) diff --git a/netbox/client/dcim/dcim_device_bay_templates_update_parameters.go b/netbox/client/dcim/dcim_device_bay_templates_update_parameters.go index 1f1acb99385ae656a40b111c21c84b3a11f999ff..1c35e4051705f75969e2b442c6063c6581fc86cd 100644 --- a/netbox/client/dcim/dcim_device_bay_templates_update_parameters.go +++ b/netbox/client/dcim/dcim_device_bay_templates_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDeviceBayTemplatesUpdateParams creates a new DcimDeviceBayTemplatesUpdateParams object diff --git a/netbox/client/dcim/dcim_device_bay_templates_update_responses.go b/netbox/client/dcim/dcim_device_bay_templates_update_responses.go index 2bbaf008b5b53b7d9ad329fa46beded2546697a6..70a0e855d3f6fe934763d17dbab98a530f02bcc2 100644 --- a/netbox/client/dcim/dcim_device_bay_templates_update_responses.go +++ b/netbox/client/dcim/dcim_device_bay_templates_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceBayTemplatesUpdateReader is a Reader for the DcimDeviceBayTemplatesUpdate structure. @@ -38,7 +39,6 @@ type DcimDeviceBayTemplatesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceBayTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceBayTemplatesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceBayTemplatesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/device-bay-templates/{id}/][%d] dcimDeviceBayTemplatesUpdateOK %+v", 200, o.Payload) } +func (o *DcimDeviceBayTemplatesUpdateOK) GetPayload() *models.DeviceBayTemplate { + return o.Payload +} + func (o *DcimDeviceBayTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceBayTemplate) diff --git a/netbox/client/dcim/dcim_device_bays_create_parameters.go b/netbox/client/dcim/dcim_device_bays_create_parameters.go index 71a23c7914a222150928f0e6eb4aac933987f629..bb897825e042c750d40db485308f71782acb2c5b 100644 --- a/netbox/client/dcim/dcim_device_bays_create_parameters.go +++ b/netbox/client/dcim/dcim_device_bays_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDeviceBaysCreateParams creates a new DcimDeviceBaysCreateParams object diff --git a/netbox/client/dcim/dcim_device_bays_create_responses.go b/netbox/client/dcim/dcim_device_bays_create_responses.go index ace5272bddce10a373653d3b9272521a045ef767..2b432eb2896688e49189646106467d72a4a1c79a 100644 --- a/netbox/client/dcim/dcim_device_bays_create_responses.go +++ b/netbox/client/dcim/dcim_device_bays_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceBaysCreateReader is a Reader for the DcimDeviceBaysCreate structure. @@ -38,7 +39,6 @@ type DcimDeviceBaysCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceBaysCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimDeviceBaysCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceBaysCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/device-bays/][%d] dcimDeviceBaysCreateCreated %+v", 201, o.Payload) } +func (o *DcimDeviceBaysCreateCreated) GetPayload() *models.DeviceBay { + return o.Payload +} + func (o *DcimDeviceBaysCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceBay) diff --git a/netbox/client/dcim/dcim_device_bays_delete_parameters.go b/netbox/client/dcim/dcim_device_bays_delete_parameters.go index 5fa90e4b9d8d63c3afb0318a6f2149b0ad3a936c..2a9fe480752f72cf078d02c0182fc316e3412d50 100644 --- a/netbox/client/dcim/dcim_device_bays_delete_parameters.go +++ b/netbox/client/dcim/dcim_device_bays_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_device_bays_delete_responses.go b/netbox/client/dcim/dcim_device_bays_delete_responses.go index cdfb3c7f5f2ce28194b2659d699df803eded3a45..56808c6607f005b36cc07b85f9fc1b49aff1976f 100644 --- a/netbox/client/dcim/dcim_device_bays_delete_responses.go +++ b/netbox/client/dcim/dcim_device_bays_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimDeviceBaysDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceBaysDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimDeviceBaysDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_device_bays_list_parameters.go b/netbox/client/dcim/dcim_device_bays_list_parameters.go index a310fe98ad0700a4d371f758cc28d47d868625b3..d3caf9408fe85da4610180699ab4a531e14ad618 100644 --- a/netbox/client/dcim/dcim_device_bays_list_parameters.go +++ b/netbox/client/dcim/dcim_device_bays_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -98,6 +99,14 @@ type DcimDeviceBaysListParams struct { Offset *int64 /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string + /*Site*/ + Site *string + /*SiteID*/ + SiteID *string /*Tag*/ Tag *string @@ -227,6 +236,50 @@ func (o *DcimDeviceBaysListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithRegion(region *string) *DcimDeviceBaysListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithRegionID(regionID *string) *DcimDeviceBaysListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + +// WithSite adds the site to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithSite(site *string) *DcimDeviceBaysListParams { + o.SetSite(site) + return o +} + +// SetSite adds the site to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetSite(site *string) { + o.Site = site +} + +// WithSiteID adds the siteID to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithSiteID(siteID *string) *DcimDeviceBaysListParams { + o.SetSiteID(siteID) + return o +} + +// SetSiteID adds the siteId to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetSiteID(siteID *string) { + o.SiteID = siteID +} + // WithTag adds the tag to the dcim device bays list params func (o *DcimDeviceBaysListParams) WithTag(tag *string) *DcimDeviceBaysListParams { o.SetTag(tag) @@ -374,6 +427,70 @@ func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + + if o.Site != nil { + + // query param site + var qrSite string + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + + } + if o.Tag != nil { // query param tag diff --git a/netbox/client/dcim/dcim_device_bays_list_responses.go b/netbox/client/dcim/dcim_device_bays_list_responses.go index 667442c2dae59ae9f421a99870069cc106ebaf1c..c2df6762d90dc21c04cc016f792d17f3ec6aa6e5 100644 --- a/netbox/client/dcim/dcim_device_bays_list_responses.go +++ b/netbox/client/dcim/dcim_device_bays_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceBaysListReader is a Reader for the DcimDeviceBaysList structure. @@ -42,7 +43,6 @@ type DcimDeviceBaysListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceBaysListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceBaysListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimDeviceBaysListOK) Error() string { return fmt.Sprintf("[GET /dcim/device-bays/][%d] dcimDeviceBaysListOK %+v", 200, o.Payload) } +func (o *DcimDeviceBaysListOK) GetPayload() *DcimDeviceBaysListOKBody { + return o.Payload +} + func (o *DcimDeviceBaysListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimDeviceBaysListOKBody) diff --git a/netbox/client/dcim/dcim_device_bays_partial_update_parameters.go b/netbox/client/dcim/dcim_device_bays_partial_update_parameters.go index 53103c0a0b88f3986f8f569e5aa89df862a06248..47d3690bd2ecf68e6aa4c08a4c28506332775a9b 100644 --- a/netbox/client/dcim/dcim_device_bays_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_device_bays_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDeviceBaysPartialUpdateParams creates a new DcimDeviceBaysPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_device_bays_partial_update_responses.go b/netbox/client/dcim/dcim_device_bays_partial_update_responses.go index f9bd76844f80ce39431574d31caf71930088d1d0..831f8404d140abef6d917e563a5bfed7c733c669 100644 --- a/netbox/client/dcim/dcim_device_bays_partial_update_responses.go +++ b/netbox/client/dcim/dcim_device_bays_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceBaysPartialUpdateReader is a Reader for the DcimDeviceBaysPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimDeviceBaysPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceBaysPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceBaysPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceBaysPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/device-bays/{id}/][%d] dcimDeviceBaysPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimDeviceBaysPartialUpdateOK) GetPayload() *models.DeviceBay { + return o.Payload +} + func (o *DcimDeviceBaysPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceBay) diff --git a/netbox/client/dcim/dcim_device_bays_read_parameters.go b/netbox/client/dcim/dcim_device_bays_read_parameters.go index 3bf79496cb491762c44d02317d3a2ae3474af800..477034f41a2e292d6ca89dbf0e04797a7b2d3b2c 100644 --- a/netbox/client/dcim/dcim_device_bays_read_parameters.go +++ b/netbox/client/dcim/dcim_device_bays_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_device_bays_read_responses.go b/netbox/client/dcim/dcim_device_bays_read_responses.go index 22c1e586a10e9fc4a492d79a40e9edba9acc23dc..5b7db8b26cbfc06dd27079d208d04bbaea3af2d3 100644 --- a/netbox/client/dcim/dcim_device_bays_read_responses.go +++ b/netbox/client/dcim/dcim_device_bays_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceBaysReadReader is a Reader for the DcimDeviceBaysRead structure. @@ -38,7 +39,6 @@ type DcimDeviceBaysReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceBaysReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceBaysReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceBaysReadOK) Error() string { return fmt.Sprintf("[GET /dcim/device-bays/{id}/][%d] dcimDeviceBaysReadOK %+v", 200, o.Payload) } +func (o *DcimDeviceBaysReadOK) GetPayload() *models.DeviceBay { + return o.Payload +} + func (o *DcimDeviceBaysReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceBay) diff --git a/netbox/client/dcim/dcim_device_bays_update_parameters.go b/netbox/client/dcim/dcim_device_bays_update_parameters.go index b370f691d4517b80cf1be4fb86f53cde627f96fe..8bb55405872b6581a24cd4c671e459eef7d942b3 100644 --- a/netbox/client/dcim/dcim_device_bays_update_parameters.go +++ b/netbox/client/dcim/dcim_device_bays_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDeviceBaysUpdateParams creates a new DcimDeviceBaysUpdateParams object diff --git a/netbox/client/dcim/dcim_device_bays_update_responses.go b/netbox/client/dcim/dcim_device_bays_update_responses.go index ce5c91d2082f7e124cbafff1da8390602196c5d9..ca01827190b3dbe508f3e66dd80e7efe9f9617b1 100644 --- a/netbox/client/dcim/dcim_device_bays_update_responses.go +++ b/netbox/client/dcim/dcim_device_bays_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceBaysUpdateReader is a Reader for the DcimDeviceBaysUpdate structure. @@ -38,7 +39,6 @@ type DcimDeviceBaysUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceBaysUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceBaysUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceBaysUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/device-bays/{id}/][%d] dcimDeviceBaysUpdateOK %+v", 200, o.Payload) } +func (o *DcimDeviceBaysUpdateOK) GetPayload() *models.DeviceBay { + return o.Payload +} + func (o *DcimDeviceBaysUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceBay) diff --git a/netbox/client/dcim/dcim_device_roles_create_parameters.go b/netbox/client/dcim/dcim_device_roles_create_parameters.go index 0fa4be14d90a280223a4d428ddff5f0a6c0b1bb7..4ae74e4d1da7a20f6e21097698fff73499e3405e 100644 --- a/netbox/client/dcim/dcim_device_roles_create_parameters.go +++ b/netbox/client/dcim/dcim_device_roles_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDeviceRolesCreateParams creates a new DcimDeviceRolesCreateParams object diff --git a/netbox/client/dcim/dcim_device_roles_create_responses.go b/netbox/client/dcim/dcim_device_roles_create_responses.go index f9fccdfbacc524886fa508826194267cf4c25eda..4f37e2392715d138fc8cbe1f349ab51b384ad483 100644 --- a/netbox/client/dcim/dcim_device_roles_create_responses.go +++ b/netbox/client/dcim/dcim_device_roles_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceRolesCreateReader is a Reader for the DcimDeviceRolesCreate structure. @@ -38,7 +39,6 @@ type DcimDeviceRolesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceRolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimDeviceRolesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceRolesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/device-roles/][%d] dcimDeviceRolesCreateCreated %+v", 201, o.Payload) } +func (o *DcimDeviceRolesCreateCreated) GetPayload() *models.DeviceRole { + return o.Payload +} + func (o *DcimDeviceRolesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceRole) diff --git a/netbox/client/dcim/dcim_device_roles_delete_parameters.go b/netbox/client/dcim/dcim_device_roles_delete_parameters.go index 1ad614fc9e4c094b16e5a15754a370095e26d2f6..3533c1545851c424989c1633f94c863db6e033e4 100644 --- a/netbox/client/dcim/dcim_device_roles_delete_parameters.go +++ b/netbox/client/dcim/dcim_device_roles_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_device_roles_delete_responses.go b/netbox/client/dcim/dcim_device_roles_delete_responses.go index 39a6838bc46f21ee1cba21360a1354b80669344f..8783877cd7f9dde5c7abe4f62aad04e83a286ddf 100644 --- a/netbox/client/dcim/dcim_device_roles_delete_responses.go +++ b/netbox/client/dcim/dcim_device_roles_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimDeviceRolesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceRolesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimDeviceRolesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_device_roles_list_parameters.go b/netbox/client/dcim/dcim_device_roles_list_parameters.go index 26e3253f7439af8aba0457847ebf9cb438739f5c..5bd130f41c22e8d7878064a12a36730d2c07907e 100644 --- a/netbox/client/dcim/dcim_device_roles_list_parameters.go +++ b/netbox/client/dcim/dcim_device_roles_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_device_roles_list_responses.go b/netbox/client/dcim/dcim_device_roles_list_responses.go index 5006a9600ae860ef1bed2785f8e08a00f7769d74..e028609b78fb52cf60cdf1f0a6a98dbd1c0d7955 100644 --- a/netbox/client/dcim/dcim_device_roles_list_responses.go +++ b/netbox/client/dcim/dcim_device_roles_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceRolesListReader is a Reader for the DcimDeviceRolesList structure. @@ -42,7 +43,6 @@ type DcimDeviceRolesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceRolesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceRolesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimDeviceRolesListOK) Error() string { return fmt.Sprintf("[GET /dcim/device-roles/][%d] dcimDeviceRolesListOK %+v", 200, o.Payload) } +func (o *DcimDeviceRolesListOK) GetPayload() *DcimDeviceRolesListOKBody { + return o.Payload +} + func (o *DcimDeviceRolesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimDeviceRolesListOKBody) diff --git a/netbox/client/dcim/dcim_device_roles_partial_update_parameters.go b/netbox/client/dcim/dcim_device_roles_partial_update_parameters.go index eca6e8f4de99f3e18750775739d3745fb4e6590d..c7c3fb87f571ca7e5da1fa47cf435b6ea101e8ea 100644 --- a/netbox/client/dcim/dcim_device_roles_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_device_roles_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDeviceRolesPartialUpdateParams creates a new DcimDeviceRolesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_device_roles_partial_update_responses.go b/netbox/client/dcim/dcim_device_roles_partial_update_responses.go index 27bc1f7ebf40e40b7cd6a260fe644ca67bce0ff8..7c1a8481ab2fd1a0bc3e58ccab877244ac4fdb6e 100644 --- a/netbox/client/dcim/dcim_device_roles_partial_update_responses.go +++ b/netbox/client/dcim/dcim_device_roles_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceRolesPartialUpdateReader is a Reader for the DcimDeviceRolesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimDeviceRolesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceRolesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceRolesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceRolesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/device-roles/{id}/][%d] dcimDeviceRolesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimDeviceRolesPartialUpdateOK) GetPayload() *models.DeviceRole { + return o.Payload +} + func (o *DcimDeviceRolesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceRole) diff --git a/netbox/client/dcim/dcim_device_roles_read_parameters.go b/netbox/client/dcim/dcim_device_roles_read_parameters.go index fa681ae685de9d2c3ca58e072be0507d0edcf891..4af1a4e31f25bde23b181f9198ec31de2361d2bd 100644 --- a/netbox/client/dcim/dcim_device_roles_read_parameters.go +++ b/netbox/client/dcim/dcim_device_roles_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_device_roles_read_responses.go b/netbox/client/dcim/dcim_device_roles_read_responses.go index 2f2574476ba7f396cd6dad0f019f18852e6a5a3e..06760a170034320281605b3fd4cd6a060dcecec3 100644 --- a/netbox/client/dcim/dcim_device_roles_read_responses.go +++ b/netbox/client/dcim/dcim_device_roles_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceRolesReadReader is a Reader for the DcimDeviceRolesRead structure. @@ -38,7 +39,6 @@ type DcimDeviceRolesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceRolesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceRolesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceRolesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/device-roles/{id}/][%d] dcimDeviceRolesReadOK %+v", 200, o.Payload) } +func (o *DcimDeviceRolesReadOK) GetPayload() *models.DeviceRole { + return o.Payload +} + func (o *DcimDeviceRolesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceRole) diff --git a/netbox/client/dcim/dcim_device_roles_update_parameters.go b/netbox/client/dcim/dcim_device_roles_update_parameters.go index a6a4a438ff4f78bb322beaab670c66ef91663c39..bd03ce4c073e3f69dd3862f2203c3e7cb1295595 100644 --- a/netbox/client/dcim/dcim_device_roles_update_parameters.go +++ b/netbox/client/dcim/dcim_device_roles_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDeviceRolesUpdateParams creates a new DcimDeviceRolesUpdateParams object diff --git a/netbox/client/dcim/dcim_device_roles_update_responses.go b/netbox/client/dcim/dcim_device_roles_update_responses.go index ab160ca4af3bb3518063a5845d55dc6859f5a996..4788677b058041138b45af9116ea81083bbf1b5c 100644 --- a/netbox/client/dcim/dcim_device_roles_update_responses.go +++ b/netbox/client/dcim/dcim_device_roles_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceRolesUpdateReader is a Reader for the DcimDeviceRolesUpdate structure. @@ -38,7 +39,6 @@ type DcimDeviceRolesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceRolesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceRolesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceRolesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/device-roles/{id}/][%d] dcimDeviceRolesUpdateOK %+v", 200, o.Payload) } +func (o *DcimDeviceRolesUpdateOK) GetPayload() *models.DeviceRole { + return o.Payload +} + func (o *DcimDeviceRolesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceRole) diff --git a/netbox/client/dcim/dcim_device_types_create_parameters.go b/netbox/client/dcim/dcim_device_types_create_parameters.go index d9d72f0834ffbbbc3e922fe2d5c4e250010b0915..44caace72da91c034e672329a5784d082cb86892 100644 --- a/netbox/client/dcim/dcim_device_types_create_parameters.go +++ b/netbox/client/dcim/dcim_device_types_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDeviceTypesCreateParams creates a new DcimDeviceTypesCreateParams object diff --git a/netbox/client/dcim/dcim_device_types_create_responses.go b/netbox/client/dcim/dcim_device_types_create_responses.go index b215b407fac46e35c7d481e43eb2c2c5dff53601..defbe9a934c4c9d98038961a2ad57358a20e2e88 100644 --- a/netbox/client/dcim/dcim_device_types_create_responses.go +++ b/netbox/client/dcim/dcim_device_types_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceTypesCreateReader is a Reader for the DcimDeviceTypesCreate structure. @@ -38,7 +39,6 @@ type DcimDeviceTypesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceTypesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimDeviceTypesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceTypesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/device-types/][%d] dcimDeviceTypesCreateCreated %+v", 201, o.Payload) } +func (o *DcimDeviceTypesCreateCreated) GetPayload() *models.DeviceType { + return o.Payload +} + func (o *DcimDeviceTypesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceType) diff --git a/netbox/client/dcim/dcim_device_types_delete_parameters.go b/netbox/client/dcim/dcim_device_types_delete_parameters.go index 289aa61c50efa9e855af1ac1d813c3d4a0df4207..69d6c02596f10ad4b63e68e4b24ad4294b3551fb 100644 --- a/netbox/client/dcim/dcim_device_types_delete_parameters.go +++ b/netbox/client/dcim/dcim_device_types_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_device_types_delete_responses.go b/netbox/client/dcim/dcim_device_types_delete_responses.go index f102108ef5a859c9dfd804fdea5b6b18532692b1..d134ac94e5d19d8ea7887abbffaa864797a94849 100644 --- a/netbox/client/dcim/dcim_device_types_delete_responses.go +++ b/netbox/client/dcim/dcim_device_types_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimDeviceTypesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceTypesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimDeviceTypesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_device_types_list_parameters.go b/netbox/client/dcim/dcim_device_types_list_parameters.go index 96a809aeac76f1bb15b41a665cdb800cf26e6ab4..6131f1343c2d5e4d023d29051242b1ee396fefbb 100644 --- a/netbox/client/dcim/dcim_device_types_list_parameters.go +++ b/netbox/client/dcim/dcim_device_types_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -80,6 +81,14 @@ type DcimDeviceTypesListParams struct { ConsolePorts *string /*ConsoleServerPorts*/ ConsoleServerPorts *string + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string + /*DeviceBays*/ + DeviceBays *string /*IDIn Multiple values may be separated by commas. @@ -89,6 +98,12 @@ type DcimDeviceTypesListParams struct { Interfaces *string /*IsFullDepth*/ IsFullDepth *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. @@ -184,6 +199,50 @@ func (o *DcimDeviceTypesListParams) SetConsoleServerPorts(consoleServerPorts *st o.ConsoleServerPorts = consoleServerPorts } +// WithCreated adds the created to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithCreated(created *string) *DcimDeviceTypesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithCreatedGte(createdGte *string) *DcimDeviceTypesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithCreatedLte(createdLte *string) *DcimDeviceTypesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithDeviceBays adds the deviceBays to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithDeviceBays(deviceBays *string) *DcimDeviceTypesListParams { + o.SetDeviceBays(deviceBays) + return o +} + +// SetDeviceBays adds the deviceBays to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetDeviceBays(deviceBays *string) { + o.DeviceBays = deviceBays +} + // WithIDIn adds the iDIn to the dcim device types list params func (o *DcimDeviceTypesListParams) WithIDIn(iDIn *string) *DcimDeviceTypesListParams { o.SetIDIn(iDIn) @@ -217,6 +276,39 @@ func (o *DcimDeviceTypesListParams) SetIsFullDepth(isFullDepth *string) { o.IsFullDepth = isFullDepth } +// WithLastUpdated adds the lastUpdated to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithLastUpdated(lastUpdated *string) *DcimDeviceTypesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimDeviceTypesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimDeviceTypesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the dcim device types list params func (o *DcimDeviceTypesListParams) WithLimit(limit *int64) *DcimDeviceTypesListParams { o.SetLimit(limit) @@ -411,6 +503,70 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } + 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.DeviceBays != nil { + + // query param device_bays + var qrDeviceBays string + if o.DeviceBays != nil { + qrDeviceBays = *o.DeviceBays + } + qDeviceBays := qrDeviceBays + if qDeviceBays != "" { + if err := r.SetQueryParam("device_bays", qDeviceBays); err != nil { + return err + } + } + + } + if o.IDIn != nil { // query param id__in @@ -459,6 +615,54 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } + 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 diff --git a/netbox/client/dcim/dcim_device_types_list_responses.go b/netbox/client/dcim/dcim_device_types_list_responses.go index 09caec6c72077132954137e36313499fc045267e..aecee71fbd2dee593e3beb49aa17cadb60921fbc 100644 --- a/netbox/client/dcim/dcim_device_types_list_responses.go +++ b/netbox/client/dcim/dcim_device_types_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceTypesListReader is a Reader for the DcimDeviceTypesList structure. @@ -42,7 +43,6 @@ type DcimDeviceTypesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceTypesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceTypesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimDeviceTypesListOK) Error() string { return fmt.Sprintf("[GET /dcim/device-types/][%d] dcimDeviceTypesListOK %+v", 200, o.Payload) } +func (o *DcimDeviceTypesListOK) GetPayload() *DcimDeviceTypesListOKBody { + return o.Payload +} + func (o *DcimDeviceTypesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimDeviceTypesListOKBody) diff --git a/netbox/client/dcim/dcim_device_types_partial_update_parameters.go b/netbox/client/dcim/dcim_device_types_partial_update_parameters.go index 4c41d09fa1ed423e2f985680a55bf2f09f6d2341..bbd68c2e74457c691cb1cdbd49c799d54a23b6b4 100644 --- a/netbox/client/dcim/dcim_device_types_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_device_types_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDeviceTypesPartialUpdateParams creates a new DcimDeviceTypesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_device_types_partial_update_responses.go b/netbox/client/dcim/dcim_device_types_partial_update_responses.go index b68385ffb18c330300b56b64cb36f0122880b490..942accebd8338decd835fa0acccb34cff8915048 100644 --- a/netbox/client/dcim/dcim_device_types_partial_update_responses.go +++ b/netbox/client/dcim/dcim_device_types_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceTypesPartialUpdateReader is a Reader for the DcimDeviceTypesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimDeviceTypesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceTypesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceTypesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceTypesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/device-types/{id}/][%d] dcimDeviceTypesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimDeviceTypesPartialUpdateOK) GetPayload() *models.DeviceType { + return o.Payload +} + func (o *DcimDeviceTypesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceType) diff --git a/netbox/client/dcim/dcim_device_types_read_parameters.go b/netbox/client/dcim/dcim_device_types_read_parameters.go index a4ca6abb10af6176fd27bc6f835418746a558db2..ed47d5e555d86e01e0ea06ca9f45b7c4b69ef70e 100644 --- a/netbox/client/dcim/dcim_device_types_read_parameters.go +++ b/netbox/client/dcim/dcim_device_types_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_device_types_read_responses.go b/netbox/client/dcim/dcim_device_types_read_responses.go index d62da11b3d8c56449e27e183201cec48db6f1006..cb4dc6dfcca449954a91e620479acadea1fdd598 100644 --- a/netbox/client/dcim/dcim_device_types_read_responses.go +++ b/netbox/client/dcim/dcim_device_types_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceTypesReadReader is a Reader for the DcimDeviceTypesRead structure. @@ -38,7 +39,6 @@ type DcimDeviceTypesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceTypesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceTypesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceTypesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/device-types/{id}/][%d] dcimDeviceTypesReadOK %+v", 200, o.Payload) } +func (o *DcimDeviceTypesReadOK) GetPayload() *models.DeviceType { + return o.Payload +} + func (o *DcimDeviceTypesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceType) diff --git a/netbox/client/dcim/dcim_device_types_update_parameters.go b/netbox/client/dcim/dcim_device_types_update_parameters.go index 8a5476404b3da3781bc8c8b7a7ba64b279c223ee..ac2f57c00ee9e77353b098f1c7b40f68fd5d3344 100644 --- a/netbox/client/dcim/dcim_device_types_update_parameters.go +++ b/netbox/client/dcim/dcim_device_types_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDeviceTypesUpdateParams creates a new DcimDeviceTypesUpdateParams object diff --git a/netbox/client/dcim/dcim_device_types_update_responses.go b/netbox/client/dcim/dcim_device_types_update_responses.go index bb2f4ba48cdc6d81ec18e3f04d5d687d5e2bf26e..77eb138ff67ef2b55753d11239d8c98b3dc7e26a 100644 --- a/netbox/client/dcim/dcim_device_types_update_responses.go +++ b/netbox/client/dcim/dcim_device_types_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDeviceTypesUpdateReader is a Reader for the DcimDeviceTypesUpdate structure. @@ -38,7 +39,6 @@ type DcimDeviceTypesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDeviceTypesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDeviceTypesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDeviceTypesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/device-types/{id}/][%d] dcimDeviceTypesUpdateOK %+v", 200, o.Payload) } +func (o *DcimDeviceTypesUpdateOK) GetPayload() *models.DeviceType { + return o.Payload +} + func (o *DcimDeviceTypesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceType) diff --git a/netbox/client/dcim/dcim_devices_create_parameters.go b/netbox/client/dcim/dcim_devices_create_parameters.go index 3127faf99848500d4fd3aef37c3ba1842aa65887..46a4107991c1b527753feba61311a27e440b379e 100644 --- a/netbox/client/dcim/dcim_devices_create_parameters.go +++ b/netbox/client/dcim/dcim_devices_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDevicesCreateParams creates a new DcimDevicesCreateParams object diff --git a/netbox/client/dcim/dcim_devices_create_responses.go b/netbox/client/dcim/dcim_devices_create_responses.go index b860dab4d2d13e416a008d17a142ba7414f800df..cd12a7117f8d25e08f99fa1d4656acfd4b74bfe3 100644 --- a/netbox/client/dcim/dcim_devices_create_responses.go +++ b/netbox/client/dcim/dcim_devices_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDevicesCreateReader is a Reader for the DcimDevicesCreate structure. @@ -38,7 +39,6 @@ type DcimDevicesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDevicesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimDevicesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDevicesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/devices/][%d] dcimDevicesCreateCreated %+v", 201, o.Payload) } +func (o *DcimDevicesCreateCreated) GetPayload() *models.DeviceWithConfigContext { + return o.Payload +} + func (o *DcimDevicesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceWithConfigContext) diff --git a/netbox/client/dcim/dcim_devices_delete_parameters.go b/netbox/client/dcim/dcim_devices_delete_parameters.go index 1ce94e1fbfb11f80077857d92e23dd1dd5d8df77..1a6be9761f09f115b519fc1c894924b139469c98 100644 --- a/netbox/client/dcim/dcim_devices_delete_parameters.go +++ b/netbox/client/dcim/dcim_devices_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_devices_delete_responses.go b/netbox/client/dcim/dcim_devices_delete_responses.go index 1f2727fd29f9c2d3ab9774c762ea1ec070a491c4..46b975665e4a718272f0dd2095a5b253f10918fd 100644 --- a/netbox/client/dcim/dcim_devices_delete_responses.go +++ b/netbox/client/dcim/dcim_devices_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimDevicesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDevicesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimDevicesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_devices_graphs_parameters.go b/netbox/client/dcim/dcim_devices_graphs_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..42a56d210678af79d9b5a875882b4d778ac5b764 --- /dev/null +++ b/netbox/client/dcim/dcim_devices_graphs_parameters.go @@ -0,0 +1,152 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2018 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewDcimDevicesGraphsParams creates a new DcimDevicesGraphsParams object +// with the default values initialized. +func NewDcimDevicesGraphsParams() *DcimDevicesGraphsParams { + var () + return &DcimDevicesGraphsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDcimDevicesGraphsParamsWithTimeout creates a new DcimDevicesGraphsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDcimDevicesGraphsParamsWithTimeout(timeout time.Duration) *DcimDevicesGraphsParams { + var () + return &DcimDevicesGraphsParams{ + + timeout: timeout, + } +} + +// NewDcimDevicesGraphsParamsWithContext creates a new DcimDevicesGraphsParams object +// with the default values initialized, and the ability to set a context for a request +func NewDcimDevicesGraphsParamsWithContext(ctx context.Context) *DcimDevicesGraphsParams { + var () + return &DcimDevicesGraphsParams{ + + Context: ctx, + } +} + +// NewDcimDevicesGraphsParamsWithHTTPClient creates a new DcimDevicesGraphsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDcimDevicesGraphsParamsWithHTTPClient(client *http.Client) *DcimDevicesGraphsParams { + var () + return &DcimDevicesGraphsParams{ + HTTPClient: client, + } +} + +/*DcimDevicesGraphsParams contains all the parameters to send to the API endpoint +for the dcim devices graphs operation typically these are written to a http.Request +*/ +type DcimDevicesGraphsParams struct { + + /*ID + A unique integer value identifying this device. + + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the dcim devices graphs params +func (o *DcimDevicesGraphsParams) WithTimeout(timeout time.Duration) *DcimDevicesGraphsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim devices graphs params +func (o *DcimDevicesGraphsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim devices graphs params +func (o *DcimDevicesGraphsParams) WithContext(ctx context.Context) *DcimDevicesGraphsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim devices graphs params +func (o *DcimDevicesGraphsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim devices graphs params +func (o *DcimDevicesGraphsParams) WithHTTPClient(client *http.Client) *DcimDevicesGraphsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim devices graphs params +func (o *DcimDevicesGraphsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim devices graphs params +func (o *DcimDevicesGraphsParams) WithID(id int64) *DcimDevicesGraphsParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim devices graphs params +func (o *DcimDevicesGraphsParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimDevicesGraphsParams) 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/extras/extras_topology_maps_read_responses.go b/netbox/client/dcim/dcim_devices_graphs_responses.go similarity index 54% rename from netbox/client/extras/extras_topology_maps_read_responses.go rename to netbox/client/dcim/dcim_devices_graphs_responses.go index e985327891baf4dc3ed05367743cf8c4454e2c1d..41e8f189b421df839a4ace0d512f7071a3e6f872 100644 --- a/netbox/client/extras/extras_topology_maps_read_responses.go +++ b/netbox/client/dcim/dcim_devices_graphs_responses.go @@ -13,8 +13,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// -package extras +package dcim // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// ExtrasTopologyMapsReadReader is a Reader for the ExtrasTopologyMapsRead structure. -type ExtrasTopologyMapsReadReader struct { +// DcimDevicesGraphsReader is a Reader for the DcimDevicesGraphs structure. +type DcimDevicesGraphsReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *ExtrasTopologyMapsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *DcimDevicesGraphsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewExtrasTopologyMapsReadOK() + result := NewDcimDevicesGraphsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,26 +51,30 @@ func (o *ExtrasTopologyMapsReadReader) ReadResponse(response runtime.ClientRespo } } -// NewExtrasTopologyMapsReadOK creates a ExtrasTopologyMapsReadOK with default headers values -func NewExtrasTopologyMapsReadOK() *ExtrasTopologyMapsReadOK { - return &ExtrasTopologyMapsReadOK{} +// NewDcimDevicesGraphsOK creates a DcimDevicesGraphsOK with default headers values +func NewDcimDevicesGraphsOK() *DcimDevicesGraphsOK { + return &DcimDevicesGraphsOK{} } -/*ExtrasTopologyMapsReadOK handles this case with default header values. +/*DcimDevicesGraphsOK handles this case with default header values. -ExtrasTopologyMapsReadOK extras topology maps read o k +DcimDevicesGraphsOK dcim devices graphs o k */ -type ExtrasTopologyMapsReadOK struct { - Payload *models.TopologyMap +type DcimDevicesGraphsOK struct { + Payload *models.DeviceWithConfigContext +} + +func (o *DcimDevicesGraphsOK) Error() string { + return fmt.Sprintf("[GET /dcim/devices/{id}/graphs/][%d] dcimDevicesGraphsOK %+v", 200, o.Payload) } -func (o *ExtrasTopologyMapsReadOK) Error() string { - return fmt.Sprintf("[GET /extras/topology-maps/{id}/][%d] extrasTopologyMapsReadOK %+v", 200, o.Payload) +func (o *DcimDevicesGraphsOK) GetPayload() *models.DeviceWithConfigContext { + return o.Payload } -func (o *ExtrasTopologyMapsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *DcimDevicesGraphsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.TopologyMap) + o.Payload = new(models.DeviceWithConfigContext) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/netbox/client/dcim/dcim_devices_list_parameters.go b/netbox/client/dcim/dcim_devices_list_parameters.go index 6583fd981d35e7ddadd6a9a6b1d19d40d5753a8f..31f545a13c9d11efe6c631123947246be5e0ff46 100644 --- a/netbox/client/dcim/dcim_devices_list_parameters.go +++ b/netbox/client/dcim/dcim_devices_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -84,6 +85,14 @@ type DcimDevicesListParams struct { ConsolePorts *string /*ConsoleServerPorts*/ ConsoleServerPorts *string + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string + /*DeviceBays*/ + DeviceBays *string /*DeviceTypeID*/ DeviceTypeID *string /*Face*/ @@ -101,11 +110,19 @@ type DcimDevicesListParams struct { Interfaces *string /*IsFullDepth*/ IsFullDepth *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. */ Limit *int64 + /*LocalContextData*/ + LocalContextData *string /*MacAddress*/ MacAddress *string /*Manufacturer*/ @@ -256,6 +273,50 @@ func (o *DcimDevicesListParams) SetConsoleServerPorts(consoleServerPorts *string o.ConsoleServerPorts = consoleServerPorts } +// WithCreated adds the created to the dcim devices list params +func (o *DcimDevicesListParams) WithCreated(created *string) *DcimDevicesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the dcim devices list params +func (o *DcimDevicesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the dcim devices list params +func (o *DcimDevicesListParams) WithCreatedGte(createdGte *string) *DcimDevicesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the dcim devices list params +func (o *DcimDevicesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the dcim devices list params +func (o *DcimDevicesListParams) WithCreatedLte(createdLte *string) *DcimDevicesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the dcim devices list params +func (o *DcimDevicesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithDeviceBays adds the deviceBays to the dcim devices list params +func (o *DcimDevicesListParams) WithDeviceBays(deviceBays *string) *DcimDevicesListParams { + o.SetDeviceBays(deviceBays) + return o +} + +// SetDeviceBays adds the deviceBays to the dcim devices list params +func (o *DcimDevicesListParams) SetDeviceBays(deviceBays *string) { + o.DeviceBays = deviceBays +} + // WithDeviceTypeID adds the deviceTypeID to the dcim devices list params func (o *DcimDevicesListParams) WithDeviceTypeID(deviceTypeID *string) *DcimDevicesListParams { o.SetDeviceTypeID(deviceTypeID) @@ -333,6 +394,39 @@ func (o *DcimDevicesListParams) SetIsFullDepth(isFullDepth *string) { o.IsFullDepth = isFullDepth } +// WithLastUpdated adds the lastUpdated to the dcim devices list params +func (o *DcimDevicesListParams) WithLastUpdated(lastUpdated *string) *DcimDevicesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the dcim devices list params +func (o *DcimDevicesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the dcim devices list params +func (o *DcimDevicesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimDevicesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the dcim devices list params +func (o *DcimDevicesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the dcim devices list params +func (o *DcimDevicesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimDevicesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the dcim devices list params +func (o *DcimDevicesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the dcim devices list params func (o *DcimDevicesListParams) WithLimit(limit *int64) *DcimDevicesListParams { o.SetLimit(limit) @@ -344,6 +438,17 @@ func (o *DcimDevicesListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithLocalContextData adds the localContextData to the dcim devices list params +func (o *DcimDevicesListParams) WithLocalContextData(localContextData *string) *DcimDevicesListParams { + o.SetLocalContextData(localContextData) + return o +} + +// SetLocalContextData adds the localContextData to the dcim devices list params +func (o *DcimDevicesListParams) SetLocalContextData(localContextData *string) { + o.LocalContextData = localContextData +} + // WithMacAddress adds the macAddress to the dcim devices list params func (o *DcimDevicesListParams) WithMacAddress(macAddress *string) *DcimDevicesListParams { o.SetMacAddress(macAddress) @@ -768,6 +873,70 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } + 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.DeviceBays != nil { + + // query param device_bays + var qrDeviceBays string + if o.DeviceBays != nil { + qrDeviceBays = *o.DeviceBays + } + qDeviceBays := qrDeviceBays + if qDeviceBays != "" { + if err := r.SetQueryParam("device_bays", qDeviceBays); err != nil { + return err + } + } + + } + if o.DeviceTypeID != nil { // query param device_type_id @@ -880,6 +1049,54 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } + 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 @@ -896,6 +1113,22 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } + if o.LocalContextData != nil { + + // query param local_context_data + var qrLocalContextData string + if o.LocalContextData != nil { + qrLocalContextData = *o.LocalContextData + } + qLocalContextData := qrLocalContextData + if qLocalContextData != "" { + if err := r.SetQueryParam("local_context_data", qLocalContextData); err != nil { + return err + } + } + + } + if o.MacAddress != nil { // query param mac_address diff --git a/netbox/client/dcim/dcim_devices_list_responses.go b/netbox/client/dcim/dcim_devices_list_responses.go index 5b70465d859683d3748d1321da86f96aac085206..43c7555e2bdd8120d2939527e8107c9f5068379e 100644 --- a/netbox/client/dcim/dcim_devices_list_responses.go +++ b/netbox/client/dcim/dcim_devices_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDevicesListReader is a Reader for the DcimDevicesList structure. @@ -42,7 +43,6 @@ type DcimDevicesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDevicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDevicesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimDevicesListOK) Error() string { return fmt.Sprintf("[GET /dcim/devices/][%d] dcimDevicesListOK %+v", 200, o.Payload) } +func (o *DcimDevicesListOK) GetPayload() *DcimDevicesListOKBody { + return o.Payload +} + func (o *DcimDevicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimDevicesListOKBody) diff --git a/netbox/client/dcim/dcim_devices_napalm_parameters.go b/netbox/client/dcim/dcim_devices_napalm_parameters.go index 54a0e4a4a0e1d9cfd58d07872ba55c1ce4aa43a3..07e9dfbc8eeae14f3138cf8a2040ef43f89882ac 100644 --- a/netbox/client/dcim/dcim_devices_napalm_parameters.go +++ b/netbox/client/dcim/dcim_devices_napalm_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -81,6 +82,8 @@ type DcimDevicesNapalmParams struct { */ ID int64 + /*Method*/ + Method string timeout time.Duration Context context.Context @@ -131,6 +134,17 @@ func (o *DcimDevicesNapalmParams) SetID(id int64) { o.ID = id } +// WithMethod adds the method to the dcim devices napalm params +func (o *DcimDevicesNapalmParams) WithMethod(method string) *DcimDevicesNapalmParams { + o.SetMethod(method) + return o +} + +// SetMethod adds the method to the dcim devices napalm params +func (o *DcimDevicesNapalmParams) SetMethod(method string) { + o.Method = method +} + // WriteToRequest writes these params to a swagger request func (o *DcimDevicesNapalmParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -144,6 +158,15 @@ func (o *DcimDevicesNapalmParams) WriteToRequest(r runtime.ClientRequest, reg st return err } + // query param method + qrMethod := o.Method + qMethod := qrMethod + if qMethod != "" { + if err := r.SetQueryParam("method", qMethod); err != nil { + return err + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_devices_napalm_responses.go b/netbox/client/dcim/dcim_devices_napalm_responses.go index 02a8a7b009c0f05ff2f3473cc3f10c89926e5d73..accdd4a2a5f577eec589114dfa710615fad26c5f 100644 --- a/netbox/client/dcim/dcim_devices_napalm_responses.go +++ b/netbox/client/dcim/dcim_devices_napalm_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDevicesNapalmReader is a Reader for the DcimDevicesNapalm structure. @@ -38,7 +39,6 @@ type DcimDevicesNapalmReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDevicesNapalmReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDevicesNapalmOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -61,16 +61,20 @@ func NewDcimDevicesNapalmOK() *DcimDevicesNapalmOK { DcimDevicesNapalmOK dcim devices napalm o k */ type DcimDevicesNapalmOK struct { - Payload *models.DeviceWithConfigContext + Payload *models.DeviceNAPALM } func (o *DcimDevicesNapalmOK) Error() string { return fmt.Sprintf("[GET /dcim/devices/{id}/napalm/][%d] dcimDevicesNapalmOK %+v", 200, o.Payload) } +func (o *DcimDevicesNapalmOK) GetPayload() *models.DeviceNAPALM { + return o.Payload +} + func (o *DcimDevicesNapalmOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.DeviceWithConfigContext) + o.Payload = new(models.DeviceNAPALM) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/netbox/client/dcim/dcim_devices_partial_update_parameters.go b/netbox/client/dcim/dcim_devices_partial_update_parameters.go index e3dc5c15b97dd39188bacddc3024692087d68a6a..318e400b7d11fa40bec851945fed79ce2b19cc77 100644 --- a/netbox/client/dcim/dcim_devices_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_devices_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDevicesPartialUpdateParams creates a new DcimDevicesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_devices_partial_update_responses.go b/netbox/client/dcim/dcim_devices_partial_update_responses.go index 2ae4d92c9fbe5d2082b73925ae89c67a0e34114d..9cce52716634c0af2933dfd579c4696172a75904 100644 --- a/netbox/client/dcim/dcim_devices_partial_update_responses.go +++ b/netbox/client/dcim/dcim_devices_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDevicesPartialUpdateReader is a Reader for the DcimDevicesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimDevicesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDevicesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDevicesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDevicesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/devices/{id}/][%d] dcimDevicesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimDevicesPartialUpdateOK) GetPayload() *models.DeviceWithConfigContext { + return o.Payload +} + func (o *DcimDevicesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceWithConfigContext) diff --git a/netbox/client/dcim/dcim_devices_read_parameters.go b/netbox/client/dcim/dcim_devices_read_parameters.go index 0bb86739d7c8dac1efaf49d83e052839d408590a..1be8be8a08dffd3be1d18ae18cab5c47ef0f8cd7 100644 --- a/netbox/client/dcim/dcim_devices_read_parameters.go +++ b/netbox/client/dcim/dcim_devices_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_devices_read_responses.go b/netbox/client/dcim/dcim_devices_read_responses.go index aff15172bb807906da43f6e83e99545ff153308b..84dc9dc777eb15106e2a114ade0a4dfe90242efb 100644 --- a/netbox/client/dcim/dcim_devices_read_responses.go +++ b/netbox/client/dcim/dcim_devices_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDevicesReadReader is a Reader for the DcimDevicesRead structure. @@ -38,7 +39,6 @@ type DcimDevicesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDevicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDevicesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDevicesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/devices/{id}/][%d] dcimDevicesReadOK %+v", 200, o.Payload) } +func (o *DcimDevicesReadOK) GetPayload() *models.DeviceWithConfigContext { + return o.Payload +} + func (o *DcimDevicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceWithConfigContext) diff --git a/netbox/client/dcim/dcim_devices_update_parameters.go b/netbox/client/dcim/dcim_devices_update_parameters.go index b336c8c4b6d2cdab010ec2b97c2f94c5b7a76c48..e396e865ac999a7d78054f1f56b5e012a501063a 100644 --- a/netbox/client/dcim/dcim_devices_update_parameters.go +++ b/netbox/client/dcim/dcim_devices_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimDevicesUpdateParams creates a new DcimDevicesUpdateParams object diff --git a/netbox/client/dcim/dcim_devices_update_responses.go b/netbox/client/dcim/dcim_devices_update_responses.go index 5f9bd006d3a7598db2f0d409056bc061758ed588..7e642e042e250457b2ed80b92822b7c98bc34764 100644 --- a/netbox/client/dcim/dcim_devices_update_responses.go +++ b/netbox/client/dcim/dcim_devices_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimDevicesUpdateReader is a Reader for the DcimDevicesUpdate structure. @@ -38,7 +39,6 @@ type DcimDevicesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimDevicesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimDevicesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimDevicesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/devices/{id}/][%d] dcimDevicesUpdateOK %+v", 200, o.Payload) } +func (o *DcimDevicesUpdateOK) GetPayload() *models.DeviceWithConfigContext { + return o.Payload +} + func (o *DcimDevicesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceWithConfigContext) diff --git a/netbox/client/dcim/dcim_front_port_templates_create_parameters.go b/netbox/client/dcim/dcim_front_port_templates_create_parameters.go index 3ca1c362763ef1d3345cbc46a8ecd121a48972bb..538f0dfda58cb0fa27d4366d0b828e713ffb2601 100644 --- a/netbox/client/dcim/dcim_front_port_templates_create_parameters.go +++ b/netbox/client/dcim/dcim_front_port_templates_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimFrontPortTemplatesCreateParams creates a new DcimFrontPortTemplatesCreateParams object diff --git a/netbox/client/dcim/dcim_front_port_templates_create_responses.go b/netbox/client/dcim/dcim_front_port_templates_create_responses.go index d29de9c1e7ba325f494f42600c3380a9052b36fa..31809f58edd7c11d7e779022f0e7356e8c439f1a 100644 --- a/netbox/client/dcim/dcim_front_port_templates_create_responses.go +++ b/netbox/client/dcim/dcim_front_port_templates_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimFrontPortTemplatesCreateReader is a Reader for the DcimFrontPortTemplatesCreate structure. @@ -38,7 +39,6 @@ type DcimFrontPortTemplatesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimFrontPortTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimFrontPortTemplatesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimFrontPortTemplatesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/front-port-templates/][%d] dcimFrontPortTemplatesCreateCreated %+v", 201, o.Payload) } +func (o *DcimFrontPortTemplatesCreateCreated) GetPayload() *models.FrontPortTemplate { + return o.Payload +} + func (o *DcimFrontPortTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.FrontPortTemplate) diff --git a/netbox/client/dcim/dcim_front_port_templates_delete_parameters.go b/netbox/client/dcim/dcim_front_port_templates_delete_parameters.go index ee0c929a8ddc12aa34ec2f6ce3992a1e0d1d6fb7..334d04dd6ff5523e8504a4ad8d2dfe16ca790f2e 100644 --- a/netbox/client/dcim/dcim_front_port_templates_delete_parameters.go +++ b/netbox/client/dcim/dcim_front_port_templates_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_front_port_templates_delete_responses.go b/netbox/client/dcim/dcim_front_port_templates_delete_responses.go index 306b3da4a2a2dec946f7b693e9401cdacc49a0e4..4144e52e510b1d7e14f53e503e00830772dc93d7 100644 --- a/netbox/client/dcim/dcim_front_port_templates_delete_responses.go +++ b/netbox/client/dcim/dcim_front_port_templates_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimFrontPortTemplatesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimFrontPortTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimFrontPortTemplatesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { 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 a8f775089eb22a0691e4363fb7f05e31e35ba60e..f216952f88f552c8d8f1210bd59ff7c892055f2a 100644 --- a/netbox/client/dcim/dcim_front_port_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_front_port_templates_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_front_port_templates_list_responses.go b/netbox/client/dcim/dcim_front_port_templates_list_responses.go index d9ac0a55f1b43abc136b4960433326d38face056..0a29cbff4949ace8a9d1f23e20035ead2260acb9 100644 --- a/netbox/client/dcim/dcim_front_port_templates_list_responses.go +++ b/netbox/client/dcim/dcim_front_port_templates_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimFrontPortTemplatesListReader is a Reader for the DcimFrontPortTemplatesList structure. @@ -42,7 +43,6 @@ type DcimFrontPortTemplatesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimFrontPortTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimFrontPortTemplatesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimFrontPortTemplatesListOK) Error() string { return fmt.Sprintf("[GET /dcim/front-port-templates/][%d] dcimFrontPortTemplatesListOK %+v", 200, o.Payload) } +func (o *DcimFrontPortTemplatesListOK) GetPayload() *DcimFrontPortTemplatesListOKBody { + return o.Payload +} + func (o *DcimFrontPortTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimFrontPortTemplatesListOKBody) diff --git a/netbox/client/dcim/dcim_front_port_templates_partial_update_parameters.go b/netbox/client/dcim/dcim_front_port_templates_partial_update_parameters.go index ef0057fc09c378e903acb8019eda19056e6eca6b..4643cfc6243e234e5740c70f9cd77a1116fde00e 100644 --- a/netbox/client/dcim/dcim_front_port_templates_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_front_port_templates_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimFrontPortTemplatesPartialUpdateParams creates a new DcimFrontPortTemplatesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_front_port_templates_partial_update_responses.go b/netbox/client/dcim/dcim_front_port_templates_partial_update_responses.go index 1d6101f6cd0412dab8e255e97b1bfa9493cba102..0f7fb67f7c92f444b97d0ed6b631c43670372df6 100644 --- a/netbox/client/dcim/dcim_front_port_templates_partial_update_responses.go +++ b/netbox/client/dcim/dcim_front_port_templates_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimFrontPortTemplatesPartialUpdateReader is a Reader for the DcimFrontPortTemplatesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimFrontPortTemplatesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimFrontPortTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimFrontPortTemplatesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimFrontPortTemplatesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/front-port-templates/{id}/][%d] dcimFrontPortTemplatesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimFrontPortTemplatesPartialUpdateOK) GetPayload() *models.FrontPortTemplate { + return o.Payload +} + func (o *DcimFrontPortTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.FrontPortTemplate) diff --git a/netbox/client/dcim/dcim_front_port_templates_read_parameters.go b/netbox/client/dcim/dcim_front_port_templates_read_parameters.go index eb0437a68a53ce4b563e9d804333048802689bd9..b325b6a3ac4fa9fe6e65b3fd22110bc369a12108 100644 --- a/netbox/client/dcim/dcim_front_port_templates_read_parameters.go +++ b/netbox/client/dcim/dcim_front_port_templates_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_front_port_templates_read_responses.go b/netbox/client/dcim/dcim_front_port_templates_read_responses.go index 149ae3547ad6b57c6c262b10ce2674baf8c01d60..1da65e273c6093b866bb57db26f8152934c7a50b 100644 --- a/netbox/client/dcim/dcim_front_port_templates_read_responses.go +++ b/netbox/client/dcim/dcim_front_port_templates_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimFrontPortTemplatesReadReader is a Reader for the DcimFrontPortTemplatesRead structure. @@ -38,7 +39,6 @@ type DcimFrontPortTemplatesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimFrontPortTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimFrontPortTemplatesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimFrontPortTemplatesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/front-port-templates/{id}/][%d] dcimFrontPortTemplatesReadOK %+v", 200, o.Payload) } +func (o *DcimFrontPortTemplatesReadOK) GetPayload() *models.FrontPortTemplate { + return o.Payload +} + func (o *DcimFrontPortTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.FrontPortTemplate) diff --git a/netbox/client/dcim/dcim_front_port_templates_update_parameters.go b/netbox/client/dcim/dcim_front_port_templates_update_parameters.go index e9bad9960b0547099e7f4d0432f3769d5bc791ae..6182c5951a76be543b1f3072d615781fd1373149 100644 --- a/netbox/client/dcim/dcim_front_port_templates_update_parameters.go +++ b/netbox/client/dcim/dcim_front_port_templates_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimFrontPortTemplatesUpdateParams creates a new DcimFrontPortTemplatesUpdateParams object diff --git a/netbox/client/dcim/dcim_front_port_templates_update_responses.go b/netbox/client/dcim/dcim_front_port_templates_update_responses.go index f500f09d76dfeff25d160d58a9b5e3f84431196e..571ed5f6bf981755559b6913b412f5cc2ae57526 100644 --- a/netbox/client/dcim/dcim_front_port_templates_update_responses.go +++ b/netbox/client/dcim/dcim_front_port_templates_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimFrontPortTemplatesUpdateReader is a Reader for the DcimFrontPortTemplatesUpdate structure. @@ -38,7 +39,6 @@ type DcimFrontPortTemplatesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimFrontPortTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimFrontPortTemplatesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimFrontPortTemplatesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/front-port-templates/{id}/][%d] dcimFrontPortTemplatesUpdateOK %+v", 200, o.Payload) } +func (o *DcimFrontPortTemplatesUpdateOK) GetPayload() *models.FrontPortTemplate { + return o.Payload +} + func (o *DcimFrontPortTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.FrontPortTemplate) diff --git a/netbox/client/dcim/dcim_front_ports_create_parameters.go b/netbox/client/dcim/dcim_front_ports_create_parameters.go index 9f2b6bf64b638130bf884b5bdbed03ca07a8d223..3af2a39a6b21e795aff6081dd756582729e33d5b 100644 --- a/netbox/client/dcim/dcim_front_ports_create_parameters.go +++ b/netbox/client/dcim/dcim_front_ports_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimFrontPortsCreateParams creates a new DcimFrontPortsCreateParams object diff --git a/netbox/client/dcim/dcim_front_ports_create_responses.go b/netbox/client/dcim/dcim_front_ports_create_responses.go index bd217ba6764d83433d262ad019e57b69bfc96ad4..8e215906b447a3a76a771f7f5b6022502bc2010f 100644 --- a/netbox/client/dcim/dcim_front_ports_create_responses.go +++ b/netbox/client/dcim/dcim_front_ports_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimFrontPortsCreateReader is a Reader for the DcimFrontPortsCreate structure. @@ -38,7 +39,6 @@ type DcimFrontPortsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimFrontPortsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimFrontPortsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimFrontPortsCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/front-ports/][%d] dcimFrontPortsCreateCreated %+v", 201, o.Payload) } +func (o *DcimFrontPortsCreateCreated) GetPayload() *models.FrontPort { + return o.Payload +} + func (o *DcimFrontPortsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.FrontPort) diff --git a/netbox/client/dcim/dcim_front_ports_delete_parameters.go b/netbox/client/dcim/dcim_front_ports_delete_parameters.go index 0ca03c01dec6fa8deb0a9c1f699953d2208a8e1d..a0bf8866404d25adb071ad6a779e70c0afc63210 100644 --- a/netbox/client/dcim/dcim_front_ports_delete_parameters.go +++ b/netbox/client/dcim/dcim_front_ports_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_front_ports_delete_responses.go b/netbox/client/dcim/dcim_front_ports_delete_responses.go index e4ead43d99901879b3bdb1247d98d0c8e6e0a5b9..bc5f4745954c52d6361bfb2a63a5ae1ceba1119a 100644 --- a/netbox/client/dcim/dcim_front_ports_delete_responses.go +++ b/netbox/client/dcim/dcim_front_ports_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimFrontPortsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimFrontPortsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimFrontPortsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_front_ports_list_parameters.go b/netbox/client/dcim/dcim_front_ports_list_parameters.go index 5920e1921248a781072a30e1cb303782d4fadcd0..d59d2b12306186135b933d0f7d3f660f95d05c0d 100644 --- a/netbox/client/dcim/dcim_front_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_front_ports_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -100,6 +101,14 @@ type DcimFrontPortsListParams struct { Offset *int64 /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string + /*Site*/ + Site *string + /*SiteID*/ + SiteID *string /*Tag*/ Tag *string /*Type*/ @@ -242,6 +251,50 @@ func (o *DcimFrontPortsListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithRegion(region *string) *DcimFrontPortsListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithRegionID(regionID *string) *DcimFrontPortsListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + +// WithSite adds the site to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithSite(site *string) *DcimFrontPortsListParams { + o.SetSite(site) + return o +} + +// SetSite adds the site to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetSite(site *string) { + o.Site = site +} + +// WithSiteID adds the siteID to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithSiteID(siteID *string) *DcimFrontPortsListParams { + o.SetSiteID(siteID) + return o +} + +// SetSiteID adds the siteId to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetSiteID(siteID *string) { + o.SiteID = siteID +} + // WithTag adds the tag to the dcim front ports list params func (o *DcimFrontPortsListParams) WithTag(tag *string) *DcimFrontPortsListParams { o.SetTag(tag) @@ -416,6 +469,70 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + + if o.Site != nil { + + // query param site + var qrSite string + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + + } + if o.Tag != nil { // query param tag diff --git a/netbox/client/dcim/dcim_front_ports_list_responses.go b/netbox/client/dcim/dcim_front_ports_list_responses.go index f43a6f7b11f8b439c1313a7285e1c3637a4e432e..0c37976a546982ef67e9330b0975c031edcbaed8 100644 --- a/netbox/client/dcim/dcim_front_ports_list_responses.go +++ b/netbox/client/dcim/dcim_front_ports_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimFrontPortsListReader is a Reader for the DcimFrontPortsList structure. @@ -42,7 +43,6 @@ type DcimFrontPortsListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimFrontPortsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimFrontPortsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimFrontPortsListOK) Error() string { return fmt.Sprintf("[GET /dcim/front-ports/][%d] dcimFrontPortsListOK %+v", 200, o.Payload) } +func (o *DcimFrontPortsListOK) GetPayload() *DcimFrontPortsListOKBody { + return o.Payload +} + func (o *DcimFrontPortsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimFrontPortsListOKBody) diff --git a/netbox/client/dcim/dcim_front_ports_partial_update_parameters.go b/netbox/client/dcim/dcim_front_ports_partial_update_parameters.go index 8326e959195e32b0827b5569b6cb4b5b160f7af1..1d3911bb32e2082922d6dcff148ffad50c911a79 100644 --- a/netbox/client/dcim/dcim_front_ports_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_front_ports_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimFrontPortsPartialUpdateParams creates a new DcimFrontPortsPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_front_ports_partial_update_responses.go b/netbox/client/dcim/dcim_front_ports_partial_update_responses.go index 90b9ce4e5768c835723d469d170be2d2f662a133..1150a3ee1adf3841740f51d1c779a25387788439 100644 --- a/netbox/client/dcim/dcim_front_ports_partial_update_responses.go +++ b/netbox/client/dcim/dcim_front_ports_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimFrontPortsPartialUpdateReader is a Reader for the DcimFrontPortsPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimFrontPortsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimFrontPortsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimFrontPortsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimFrontPortsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/front-ports/{id}/][%d] dcimFrontPortsPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimFrontPortsPartialUpdateOK) GetPayload() *models.FrontPort { + return o.Payload +} + func (o *DcimFrontPortsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.FrontPort) diff --git a/netbox/client/dcim/dcim_front_ports_read_parameters.go b/netbox/client/dcim/dcim_front_ports_read_parameters.go index b99f8e5556d66fc69de41f458fa37a8c6694b550..07120ebff5861dc5b045c6d6a930a831c3753e67 100644 --- a/netbox/client/dcim/dcim_front_ports_read_parameters.go +++ b/netbox/client/dcim/dcim_front_ports_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_front_ports_read_responses.go b/netbox/client/dcim/dcim_front_ports_read_responses.go index f5a7915abcf2ff9b3cb6481a161880323a32ca8d..806f5170b663fbe3d241bfc27364f08f3b237142 100644 --- a/netbox/client/dcim/dcim_front_ports_read_responses.go +++ b/netbox/client/dcim/dcim_front_ports_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimFrontPortsReadReader is a Reader for the DcimFrontPortsRead structure. @@ -38,7 +39,6 @@ type DcimFrontPortsReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimFrontPortsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimFrontPortsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimFrontPortsReadOK) Error() string { return fmt.Sprintf("[GET /dcim/front-ports/{id}/][%d] dcimFrontPortsReadOK %+v", 200, o.Payload) } +func (o *DcimFrontPortsReadOK) GetPayload() *models.FrontPort { + return o.Payload +} + func (o *DcimFrontPortsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.FrontPort) diff --git a/netbox/client/dcim/dcim_front_ports_update_parameters.go b/netbox/client/dcim/dcim_front_ports_update_parameters.go index f44c281adec246c635a0abb6db3d5331211f776a..915c8fdcaebfdbbf9ee4f82d2d774034d33513ed 100644 --- a/netbox/client/dcim/dcim_front_ports_update_parameters.go +++ b/netbox/client/dcim/dcim_front_ports_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimFrontPortsUpdateParams creates a new DcimFrontPortsUpdateParams object diff --git a/netbox/client/dcim/dcim_front_ports_update_responses.go b/netbox/client/dcim/dcim_front_ports_update_responses.go index 12d2bff487def8e0de68dbecc636433abfa89ad7..e6d2b507ff57ce1f406f797c6a455822f1c64b5d 100644 --- a/netbox/client/dcim/dcim_front_ports_update_responses.go +++ b/netbox/client/dcim/dcim_front_ports_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimFrontPortsUpdateReader is a Reader for the DcimFrontPortsUpdate structure. @@ -38,7 +39,6 @@ type DcimFrontPortsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimFrontPortsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimFrontPortsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimFrontPortsUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/front-ports/{id}/][%d] dcimFrontPortsUpdateOK %+v", 200, o.Payload) } +func (o *DcimFrontPortsUpdateOK) GetPayload() *models.FrontPort { + return o.Payload +} + func (o *DcimFrontPortsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.FrontPort) diff --git a/netbox/client/dcim/dcim_interface_connections_list_parameters.go b/netbox/client/dcim/dcim_interface_connections_list_parameters.go index 62452bc9bea8ea5c27d1398ab255cdce9f353a5d..178185ae792f2898251bc4f53bf16971e2323f02 100644 --- a/netbox/client/dcim/dcim_interface_connections_list_parameters.go +++ b/netbox/client/dcim/dcim_interface_connections_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -80,6 +81,8 @@ type DcimInterfaceConnectionsListParams struct { ConnectionStatus *string /*Device*/ Device *string + /*DeviceID*/ + DeviceID *string /*Limit Number of results to return per page. @@ -153,6 +156,17 @@ 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) @@ -226,6 +240,22 @@ func (o *DcimInterfaceConnectionsListParams) WriteToRequest(r runtime.ClientRequ } + 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 diff --git a/netbox/client/dcim/dcim_interface_connections_list_responses.go b/netbox/client/dcim/dcim_interface_connections_list_responses.go index 654e5546ef22186dbc559ba75e92c295a9ebff0c..3d7b093c6c63745353e804e8664250d5d6d76803 100644 --- a/netbox/client/dcim/dcim_interface_connections_list_responses.go +++ b/netbox/client/dcim/dcim_interface_connections_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInterfaceConnectionsListReader is a Reader for the DcimInterfaceConnectionsList structure. @@ -42,7 +43,6 @@ type DcimInterfaceConnectionsListReader struct { // 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 { @@ -72,6 +72,10 @@ 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) diff --git a/netbox/client/dcim/dcim_interface_templates_create_parameters.go b/netbox/client/dcim/dcim_interface_templates_create_parameters.go index 6f8a1c7964d5d9cd1422fb940107005b041206a7..3da4e115e86b6447f3cb39c0d467c7995ca131f6 100644 --- a/netbox/client/dcim/dcim_interface_templates_create_parameters.go +++ b/netbox/client/dcim/dcim_interface_templates_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimInterfaceTemplatesCreateParams creates a new DcimInterfaceTemplatesCreateParams object diff --git a/netbox/client/dcim/dcim_interface_templates_create_responses.go b/netbox/client/dcim/dcim_interface_templates_create_responses.go index eb2978ec21dbeaa4e2bbf98e3df35722ab663d39..6608c2389b3f6bf562ebd6cac5f3532aa40ef272 100644 --- a/netbox/client/dcim/dcim_interface_templates_create_responses.go +++ b/netbox/client/dcim/dcim_interface_templates_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInterfaceTemplatesCreateReader is a Reader for the DcimInterfaceTemplatesCreate structure. @@ -38,7 +39,6 @@ type DcimInterfaceTemplatesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInterfaceTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimInterfaceTemplatesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimInterfaceTemplatesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/interface-templates/][%d] dcimInterfaceTemplatesCreateCreated %+v", 201, o.Payload) } +func (o *DcimInterfaceTemplatesCreateCreated) GetPayload() *models.InterfaceTemplate { + return o.Payload +} + func (o *DcimInterfaceTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.InterfaceTemplate) diff --git a/netbox/client/dcim/dcim_interface_templates_delete_parameters.go b/netbox/client/dcim/dcim_interface_templates_delete_parameters.go index 953871ca3b983f5f2977233045e6706bd40e897e..48c145ec354c7570f0b207ca8bbf7a9f8a9e5683 100644 --- a/netbox/client/dcim/dcim_interface_templates_delete_parameters.go +++ b/netbox/client/dcim/dcim_interface_templates_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_interface_templates_delete_responses.go b/netbox/client/dcim/dcim_interface_templates_delete_responses.go index 28cb958253369d2959fa21f8224395107dd93376..7a70c6ce2f8db60719b5afb56644651fb12ae1fa 100644 --- a/netbox/client/dcim/dcim_interface_templates_delete_responses.go +++ b/netbox/client/dcim/dcim_interface_templates_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimInterfaceTemplatesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInterfaceTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimInterfaceTemplatesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_interface_templates_list_parameters.go b/netbox/client/dcim/dcim_interface_templates_list_parameters.go index 9c6deccdfbb053fef0d378c00ca330ea0ac8c448..1fb351d236ecb30df0511b301525a6fda7f9a00d 100644 --- a/netbox/client/dcim/dcim_interface_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_interface_templates_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_interface_templates_list_responses.go b/netbox/client/dcim/dcim_interface_templates_list_responses.go index 0e3696a15456bdae295eb0952bf23c8415819ec0..727fc143aada8096c807839ded220178e42ccaf5 100644 --- a/netbox/client/dcim/dcim_interface_templates_list_responses.go +++ b/netbox/client/dcim/dcim_interface_templates_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInterfaceTemplatesListReader is a Reader for the DcimInterfaceTemplatesList structure. @@ -42,7 +43,6 @@ type DcimInterfaceTemplatesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInterfaceTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimInterfaceTemplatesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimInterfaceTemplatesListOK) Error() string { return fmt.Sprintf("[GET /dcim/interface-templates/][%d] dcimInterfaceTemplatesListOK %+v", 200, o.Payload) } +func (o *DcimInterfaceTemplatesListOK) GetPayload() *DcimInterfaceTemplatesListOKBody { + return o.Payload +} + func (o *DcimInterfaceTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimInterfaceTemplatesListOKBody) diff --git a/netbox/client/dcim/dcim_interface_templates_partial_update_parameters.go b/netbox/client/dcim/dcim_interface_templates_partial_update_parameters.go index 36e7b41d71bc450aae70ac90d23cfa2e1ae6db9a..f10bc81cda332e5ae589c2dbf90ad9fde7a00425 100644 --- a/netbox/client/dcim/dcim_interface_templates_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_interface_templates_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimInterfaceTemplatesPartialUpdateParams creates a new DcimInterfaceTemplatesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_interface_templates_partial_update_responses.go b/netbox/client/dcim/dcim_interface_templates_partial_update_responses.go index 182298a61f06d01c9b9b37fa9be812f81763aa7b..08b8345549af39ed44756781dd1cd0c062963b99 100644 --- a/netbox/client/dcim/dcim_interface_templates_partial_update_responses.go +++ b/netbox/client/dcim/dcim_interface_templates_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInterfaceTemplatesPartialUpdateReader is a Reader for the DcimInterfaceTemplatesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimInterfaceTemplatesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInterfaceTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimInterfaceTemplatesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimInterfaceTemplatesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/interface-templates/{id}/][%d] dcimInterfaceTemplatesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimInterfaceTemplatesPartialUpdateOK) GetPayload() *models.InterfaceTemplate { + return o.Payload +} + func (o *DcimInterfaceTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.InterfaceTemplate) diff --git a/netbox/client/dcim/dcim_interface_templates_read_parameters.go b/netbox/client/dcim/dcim_interface_templates_read_parameters.go index d4d5ac7fd7dd38426646b257ce0251333fb45b41..6c05beceac9b9feb474b05333cc136114535e69a 100644 --- a/netbox/client/dcim/dcim_interface_templates_read_parameters.go +++ b/netbox/client/dcim/dcim_interface_templates_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_interface_templates_read_responses.go b/netbox/client/dcim/dcim_interface_templates_read_responses.go index 9e65ec734d3e65b36c5d7585bb469bcf1571c3c1..cff5a82d4ba4c2e555d5e218af9c1af9d5b8dfed 100644 --- a/netbox/client/dcim/dcim_interface_templates_read_responses.go +++ b/netbox/client/dcim/dcim_interface_templates_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInterfaceTemplatesReadReader is a Reader for the DcimInterfaceTemplatesRead structure. @@ -38,7 +39,6 @@ type DcimInterfaceTemplatesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInterfaceTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimInterfaceTemplatesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimInterfaceTemplatesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/interface-templates/{id}/][%d] dcimInterfaceTemplatesReadOK %+v", 200, o.Payload) } +func (o *DcimInterfaceTemplatesReadOK) GetPayload() *models.InterfaceTemplate { + return o.Payload +} + func (o *DcimInterfaceTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.InterfaceTemplate) diff --git a/netbox/client/dcim/dcim_interface_templates_update_parameters.go b/netbox/client/dcim/dcim_interface_templates_update_parameters.go index f25cc53864ac2d9dba485abdb2e13341f71857a4..b3db8147cb8cc90e0a557df65608d8b0b7e3fa39 100644 --- a/netbox/client/dcim/dcim_interface_templates_update_parameters.go +++ b/netbox/client/dcim/dcim_interface_templates_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimInterfaceTemplatesUpdateParams creates a new DcimInterfaceTemplatesUpdateParams object diff --git a/netbox/client/dcim/dcim_interface_templates_update_responses.go b/netbox/client/dcim/dcim_interface_templates_update_responses.go index 99ea71d12663b53f3f1ac234d704c400ee94c9a0..27b90cc58da24e94d9f5966561a403679ed2c8db 100644 --- a/netbox/client/dcim/dcim_interface_templates_update_responses.go +++ b/netbox/client/dcim/dcim_interface_templates_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInterfaceTemplatesUpdateReader is a Reader for the DcimInterfaceTemplatesUpdate structure. @@ -38,7 +39,6 @@ type DcimInterfaceTemplatesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInterfaceTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimInterfaceTemplatesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimInterfaceTemplatesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/interface-templates/{id}/][%d] dcimInterfaceTemplatesUpdateOK %+v", 200, o.Payload) } +func (o *DcimInterfaceTemplatesUpdateOK) GetPayload() *models.InterfaceTemplate { + return o.Payload +} + func (o *DcimInterfaceTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.InterfaceTemplate) diff --git a/netbox/client/dcim/dcim_interfaces_create_parameters.go b/netbox/client/dcim/dcim_interfaces_create_parameters.go index 1c110a0b38764bdb8e97cbb029f8e88f90c1e8f8..81228724fb52e595e9750663743317949dc452f3 100644 --- a/netbox/client/dcim/dcim_interfaces_create_parameters.go +++ b/netbox/client/dcim/dcim_interfaces_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimInterfacesCreateParams creates a new DcimInterfacesCreateParams object diff --git a/netbox/client/dcim/dcim_interfaces_create_responses.go b/netbox/client/dcim/dcim_interfaces_create_responses.go index 1a5ed213215c23c55bd4847ed0dc4b6eb1d64b8a..2d71a6402d3e9145f5653de21e2f508ab1a3a077 100644 --- a/netbox/client/dcim/dcim_interfaces_create_responses.go +++ b/netbox/client/dcim/dcim_interfaces_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInterfacesCreateReader is a Reader for the DcimInterfacesCreate structure. @@ -38,7 +39,6 @@ type DcimInterfacesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInterfacesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimInterfacesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimInterfacesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/interfaces/][%d] dcimInterfacesCreateCreated %+v", 201, o.Payload) } +func (o *DcimInterfacesCreateCreated) GetPayload() *models.DeviceInterface { + return o.Payload +} + func (o *DcimInterfacesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceInterface) diff --git a/netbox/client/dcim/dcim_interfaces_delete_parameters.go b/netbox/client/dcim/dcim_interfaces_delete_parameters.go index 430783f1db7e48a1c8f2df81ee905813cfb9ef60..3331bd6eb7686f7da1bbb403c623e8faaef7c5f6 100644 --- a/netbox/client/dcim/dcim_interfaces_delete_parameters.go +++ b/netbox/client/dcim/dcim_interfaces_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_interfaces_delete_responses.go b/netbox/client/dcim/dcim_interfaces_delete_responses.go index 63f526ab66a13b0339c87b2dbb699df046d44578..21ba561e7372e99b092993a05b9385f5e90e36ca 100644 --- a/netbox/client/dcim/dcim_interfaces_delete_responses.go +++ b/netbox/client/dcim/dcim_interfaces_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimInterfacesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInterfacesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimInterfacesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_interfaces_graphs_parameters.go b/netbox/client/dcim/dcim_interfaces_graphs_parameters.go index 2947fce80b57319358f2d3d7bf15a05e74d8b698..06f14f77cf2847863305949c16ebff11b8d24e46 100644 --- a/netbox/client/dcim/dcim_interfaces_graphs_parameters.go +++ b/netbox/client/dcim/dcim_interfaces_graphs_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_interfaces_graphs_responses.go b/netbox/client/dcim/dcim_interfaces_graphs_responses.go index 99db0ad401464dcb0f54bb0a25770f0c4c1b6ddb..3b1b4dec34ffb3f1c1f64cd1433b5aad24fcda31 100644 --- a/netbox/client/dcim/dcim_interfaces_graphs_responses.go +++ b/netbox/client/dcim/dcim_interfaces_graphs_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInterfacesGraphsReader is a Reader for the DcimInterfacesGraphs structure. @@ -38,7 +39,6 @@ type DcimInterfacesGraphsReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInterfacesGraphsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimInterfacesGraphsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimInterfacesGraphsOK) Error() string { return fmt.Sprintf("[GET /dcim/interfaces/{id}/graphs/][%d] dcimInterfacesGraphsOK %+v", 200, o.Payload) } +func (o *DcimInterfacesGraphsOK) GetPayload() *models.DeviceInterface { + return o.Payload +} + func (o *DcimInterfacesGraphsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceInterface) diff --git a/netbox/client/dcim/dcim_interfaces_list_parameters.go b/netbox/client/dcim/dcim_interfaces_list_parameters.go index 70de9ebacc0c6e2ba66848eeb55d32489364a3a0..5afd1fb3ed38a5da696c01217427dbe9e60c5325 100644 --- a/netbox/client/dcim/dcim_interfaces_list_parameters.go +++ b/netbox/client/dcim/dcim_interfaces_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -85,7 +86,7 @@ type DcimInterfacesListParams struct { /*Device*/ Device *string /*DeviceID*/ - DeviceID *float64 + DeviceID *string /*Enabled*/ Enabled *string /*ID*/ @@ -116,6 +117,14 @@ type DcimInterfacesListParams struct { Offset *int64 /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string + /*Site*/ + Site *string + /*SiteID*/ + SiteID *string /*Tag*/ Tag *string /*Type*/ @@ -208,13 +217,13 @@ func (o *DcimInterfacesListParams) SetDevice(device *string) { } // WithDeviceID adds the deviceID to the dcim interfaces list params -func (o *DcimInterfacesListParams) WithDeviceID(deviceID *float64) *DcimInterfacesListParams { +func (o *DcimInterfacesListParams) WithDeviceID(deviceID *string) *DcimInterfacesListParams { o.SetDeviceID(deviceID) return o } // SetDeviceID adds the deviceId to the dcim interfaces list params -func (o *DcimInterfacesListParams) SetDeviceID(deviceID *float64) { +func (o *DcimInterfacesListParams) SetDeviceID(deviceID *string) { o.DeviceID = deviceID } @@ -350,6 +359,50 @@ func (o *DcimInterfacesListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRegion(region *string) *DcimInterfacesListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRegionID(regionID *string) *DcimInterfacesListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + +// WithSite adds the site to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithSite(site *string) *DcimInterfacesListParams { + o.SetSite(site) + return o +} + +// SetSite adds the site to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetSite(site *string) { + o.Site = site +} + +// WithSiteID adds the siteID to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithSiteID(siteID *string) *DcimInterfacesListParams { + o.SetSiteID(siteID) + return o +} + +// SetSiteID adds the siteId to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetSiteID(siteID *string) { + o.SiteID = siteID +} + // WithTag adds the tag to the dcim interfaces list params func (o *DcimInterfacesListParams) WithTag(tag *string) *DcimInterfacesListParams { o.SetTag(tag) @@ -469,11 +522,11 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s if o.DeviceID != nil { // query param device_id - var qrDeviceID float64 + var qrDeviceID string if o.DeviceID != nil { qrDeviceID = *o.DeviceID } - qDeviceID := swag.FormatFloat64(qrDeviceID) + qDeviceID := qrDeviceID if qDeviceID != "" { if err := r.SetQueryParam("device_id", qDeviceID); err != nil { return err @@ -674,6 +727,70 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + + if o.Site != nil { + + // query param site + var qrSite string + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + + } + if o.Tag != nil { // query param tag diff --git a/netbox/client/dcim/dcim_interfaces_list_responses.go b/netbox/client/dcim/dcim_interfaces_list_responses.go index 86129597134a6e36087783310b90f3cf23546ddd..adbcab526f4c07fca0e85570368fd35b06139249 100644 --- a/netbox/client/dcim/dcim_interfaces_list_responses.go +++ b/netbox/client/dcim/dcim_interfaces_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInterfacesListReader is a Reader for the DcimInterfacesList structure. @@ -42,7 +43,6 @@ type DcimInterfacesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInterfacesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimInterfacesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimInterfacesListOK) Error() string { return fmt.Sprintf("[GET /dcim/interfaces/][%d] dcimInterfacesListOK %+v", 200, o.Payload) } +func (o *DcimInterfacesListOK) GetPayload() *DcimInterfacesListOKBody { + return o.Payload +} + func (o *DcimInterfacesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimInterfacesListOKBody) diff --git a/netbox/client/dcim/dcim_interfaces_partial_update_parameters.go b/netbox/client/dcim/dcim_interfaces_partial_update_parameters.go index 5221a24a030b0790f0368970486c1c31e85beb0d..72ecfcc01f0062d0b538579fa0d20967372ec2c6 100644 --- a/netbox/client/dcim/dcim_interfaces_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_interfaces_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimInterfacesPartialUpdateParams creates a new DcimInterfacesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_interfaces_partial_update_responses.go b/netbox/client/dcim/dcim_interfaces_partial_update_responses.go index 27483649a55b2e807fc381229d0148112d8c8d25..2933b1cfc718bda869e45e04cee3cae73762bb89 100644 --- a/netbox/client/dcim/dcim_interfaces_partial_update_responses.go +++ b/netbox/client/dcim/dcim_interfaces_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInterfacesPartialUpdateReader is a Reader for the DcimInterfacesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimInterfacesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInterfacesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimInterfacesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimInterfacesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/interfaces/{id}/][%d] dcimInterfacesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimInterfacesPartialUpdateOK) GetPayload() *models.DeviceInterface { + return o.Payload +} + func (o *DcimInterfacesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceInterface) diff --git a/netbox/client/dcim/dcim_interfaces_read_parameters.go b/netbox/client/dcim/dcim_interfaces_read_parameters.go index b02e1b84b92aee6a8f9f1157c743350d9f31ad78..63362dcf8c90a22e8a7a1258ddb66b3c8aff8165 100644 --- a/netbox/client/dcim/dcim_interfaces_read_parameters.go +++ b/netbox/client/dcim/dcim_interfaces_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_interfaces_read_responses.go b/netbox/client/dcim/dcim_interfaces_read_responses.go index 7b293c4934af938243248e629cc3026037f8f7e3..f16eeb5e9eab263c00e0263bc673730a4132ebde 100644 --- a/netbox/client/dcim/dcim_interfaces_read_responses.go +++ b/netbox/client/dcim/dcim_interfaces_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInterfacesReadReader is a Reader for the DcimInterfacesRead structure. @@ -38,7 +39,6 @@ type DcimInterfacesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInterfacesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimInterfacesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimInterfacesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/interfaces/{id}/][%d] dcimInterfacesReadOK %+v", 200, o.Payload) } +func (o *DcimInterfacesReadOK) GetPayload() *models.DeviceInterface { + return o.Payload +} + func (o *DcimInterfacesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceInterface) diff --git a/netbox/client/dcim/dcim_interfaces_trace_parameters.go b/netbox/client/dcim/dcim_interfaces_trace_parameters.go index 86ca468dd3612650267353553d02c42ddf2786cd..9f65a19714cafaae4bebfdb1ad140e7fdc497810 100644 --- a/netbox/client/dcim/dcim_interfaces_trace_parameters.go +++ b/netbox/client/dcim/dcim_interfaces_trace_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_interfaces_trace_responses.go b/netbox/client/dcim/dcim_interfaces_trace_responses.go index 1c4eb21cdce4148a736b0eb151475df29b9601c1..d8dfd54a67e83ab1017708e41ef7f082a5634955 100644 --- a/netbox/client/dcim/dcim_interfaces_trace_responses.go +++ b/netbox/client/dcim/dcim_interfaces_trace_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInterfacesTraceReader is a Reader for the DcimInterfacesTrace structure. @@ -38,7 +39,6 @@ type DcimInterfacesTraceReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInterfacesTraceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimInterfacesTraceOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimInterfacesTraceOK) Error() string { return fmt.Sprintf("[GET /dcim/interfaces/{id}/trace/][%d] dcimInterfacesTraceOK %+v", 200, o.Payload) } +func (o *DcimInterfacesTraceOK) GetPayload() *models.DeviceInterface { + return o.Payload +} + func (o *DcimInterfacesTraceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceInterface) diff --git a/netbox/client/dcim/dcim_interfaces_update_parameters.go b/netbox/client/dcim/dcim_interfaces_update_parameters.go index 1823687b301455c92758f1573be02b0bce894c82..211a7fe2392de7fd58ad48fb6a848749e2078831 100644 --- a/netbox/client/dcim/dcim_interfaces_update_parameters.go +++ b/netbox/client/dcim/dcim_interfaces_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimInterfacesUpdateParams creates a new DcimInterfacesUpdateParams object diff --git a/netbox/client/dcim/dcim_interfaces_update_responses.go b/netbox/client/dcim/dcim_interfaces_update_responses.go index 7b47b677c1b41145e0f451ba157206481bb96c0f..b83527545dd9ac3192f3a952ac320aab07a055e6 100644 --- a/netbox/client/dcim/dcim_interfaces_update_responses.go +++ b/netbox/client/dcim/dcim_interfaces_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInterfacesUpdateReader is a Reader for the DcimInterfacesUpdate structure. @@ -38,7 +39,6 @@ type DcimInterfacesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInterfacesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimInterfacesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimInterfacesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/interfaces/{id}/][%d] dcimInterfacesUpdateOK %+v", 200, o.Payload) } +func (o *DcimInterfacesUpdateOK) GetPayload() *models.DeviceInterface { + return o.Payload +} + func (o *DcimInterfacesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.DeviceInterface) diff --git a/netbox/client/dcim/dcim_inventory_items_create_parameters.go b/netbox/client/dcim/dcim_inventory_items_create_parameters.go index 48a95ff9e40e12786d0f16f6f206e4c2261819a1..7152b9a209450dd701378f71a858ac4f1be19f4d 100644 --- a/netbox/client/dcim/dcim_inventory_items_create_parameters.go +++ b/netbox/client/dcim/dcim_inventory_items_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimInventoryItemsCreateParams creates a new DcimInventoryItemsCreateParams object diff --git a/netbox/client/dcim/dcim_inventory_items_create_responses.go b/netbox/client/dcim/dcim_inventory_items_create_responses.go index d8f17b7bdcbb9d90442ffeb0fed7c5f249fdc457..e2f024de44717edd0cd6dbb303d4133a0f64ebf3 100644 --- a/netbox/client/dcim/dcim_inventory_items_create_responses.go +++ b/netbox/client/dcim/dcim_inventory_items_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInventoryItemsCreateReader is a Reader for the DcimInventoryItemsCreate structure. @@ -38,7 +39,6 @@ type DcimInventoryItemsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInventoryItemsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimInventoryItemsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimInventoryItemsCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/inventory-items/][%d] dcimInventoryItemsCreateCreated %+v", 201, o.Payload) } +func (o *DcimInventoryItemsCreateCreated) GetPayload() *models.InventoryItem { + return o.Payload +} + func (o *DcimInventoryItemsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.InventoryItem) diff --git a/netbox/client/dcim/dcim_inventory_items_delete_parameters.go b/netbox/client/dcim/dcim_inventory_items_delete_parameters.go index 56f5e92198a330bbb3a8da28287525afb17de5f9..f9d34776951d26f011677d4d48bcf4919d6c5d8e 100644 --- a/netbox/client/dcim/dcim_inventory_items_delete_parameters.go +++ b/netbox/client/dcim/dcim_inventory_items_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_inventory_items_delete_responses.go b/netbox/client/dcim/dcim_inventory_items_delete_responses.go index 79e6d5750effae453439ee5ffacf9e99c711b1ef..ba3eb758970f513caa70670bc69c7c4320ff7571 100644 --- a/netbox/client/dcim/dcim_inventory_items_delete_responses.go +++ b/netbox/client/dcim/dcim_inventory_items_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimInventoryItemsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInventoryItemsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimInventoryItemsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_inventory_items_list_parameters.go b/netbox/client/dcim/dcim_inventory_items_list_parameters.go index 38a2d22f903887ae9081325f2f27d30dee63cd43..3a87cb49a7e723ecf6130bed5e017f3239c82b7b 100644 --- a/netbox/client/dcim/dcim_inventory_items_list_parameters.go +++ b/netbox/client/dcim/dcim_inventory_items_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -108,8 +109,16 @@ type DcimInventoryItemsListParams struct { PartID *string /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string /*Serial*/ Serial *string + /*Site*/ + Site *string + /*SiteID*/ + SiteID *string /*Tag*/ Tag *string @@ -294,6 +303,28 @@ func (o *DcimInventoryItemsListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithRegion(region *string) *DcimInventoryItemsListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithRegionID(regionID *string) *DcimInventoryItemsListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + // WithSerial adds the serial to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithSerial(serial *string) *DcimInventoryItemsListParams { o.SetSerial(serial) @@ -305,6 +336,28 @@ func (o *DcimInventoryItemsListParams) SetSerial(serial *string) { o.Serial = serial } +// WithSite adds the site to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithSite(site *string) *DcimInventoryItemsListParams { + o.SetSite(site) + return o +} + +// SetSite adds the site to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetSite(site *string) { + o.Site = site +} + +// WithSiteID adds the siteID to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithSiteID(siteID *string) *DcimInventoryItemsListParams { + o.SetSiteID(siteID) + return o +} + +// SetSiteID adds the siteId to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetSiteID(siteID *string) { + o.SiteID = siteID +} + // WithTag adds the tag to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithTag(tag *string) *DcimInventoryItemsListParams { o.SetTag(tag) @@ -532,6 +585,38 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + if o.Serial != nil { // query param serial @@ -548,6 +633,38 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } + if o.Site != nil { + + // query param site + var qrSite string + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + + } + if o.Tag != nil { // query param tag diff --git a/netbox/client/dcim/dcim_inventory_items_list_responses.go b/netbox/client/dcim/dcim_inventory_items_list_responses.go index 575637e3ff46b44102e6c12448025e12a97741f5..ad8497d2258e77674e956e82eb0806776339c52e 100644 --- a/netbox/client/dcim/dcim_inventory_items_list_responses.go +++ b/netbox/client/dcim/dcim_inventory_items_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInventoryItemsListReader is a Reader for the DcimInventoryItemsList structure. @@ -42,7 +43,6 @@ type DcimInventoryItemsListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInventoryItemsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimInventoryItemsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimInventoryItemsListOK) Error() string { return fmt.Sprintf("[GET /dcim/inventory-items/][%d] dcimInventoryItemsListOK %+v", 200, o.Payload) } +func (o *DcimInventoryItemsListOK) GetPayload() *DcimInventoryItemsListOKBody { + return o.Payload +} + func (o *DcimInventoryItemsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimInventoryItemsListOKBody) diff --git a/netbox/client/dcim/dcim_inventory_items_partial_update_parameters.go b/netbox/client/dcim/dcim_inventory_items_partial_update_parameters.go index 76a0b9d04add4c429a2cc66e927e86bbc6e2d37a..f8d3ecc6894f0696010dea91a7ee1c45a29f64ad 100644 --- a/netbox/client/dcim/dcim_inventory_items_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_inventory_items_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimInventoryItemsPartialUpdateParams creates a new DcimInventoryItemsPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_inventory_items_partial_update_responses.go b/netbox/client/dcim/dcim_inventory_items_partial_update_responses.go index dfa6d9b2bf26407eaae5e2483b9b2d6515687e0f..0c5ebf10aabf6d3f00ad53b63a132f9b2eaa9869 100644 --- a/netbox/client/dcim/dcim_inventory_items_partial_update_responses.go +++ b/netbox/client/dcim/dcim_inventory_items_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInventoryItemsPartialUpdateReader is a Reader for the DcimInventoryItemsPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimInventoryItemsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInventoryItemsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimInventoryItemsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimInventoryItemsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/inventory-items/{id}/][%d] dcimInventoryItemsPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimInventoryItemsPartialUpdateOK) GetPayload() *models.InventoryItem { + return o.Payload +} + func (o *DcimInventoryItemsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.InventoryItem) diff --git a/netbox/client/dcim/dcim_inventory_items_read_parameters.go b/netbox/client/dcim/dcim_inventory_items_read_parameters.go index 35d41b990537c9e030cc0d100b4e32872af23e3a..2ce608071b9d66ca24f9d9b18052b5470cf91715 100644 --- a/netbox/client/dcim/dcim_inventory_items_read_parameters.go +++ b/netbox/client/dcim/dcim_inventory_items_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_inventory_items_read_responses.go b/netbox/client/dcim/dcim_inventory_items_read_responses.go index 5a304503de5f902f9f4781379f425ad8ceadfa39..ee98631d0e8b167f22fd7e4187bb7d6a0eb28b59 100644 --- a/netbox/client/dcim/dcim_inventory_items_read_responses.go +++ b/netbox/client/dcim/dcim_inventory_items_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInventoryItemsReadReader is a Reader for the DcimInventoryItemsRead structure. @@ -38,7 +39,6 @@ type DcimInventoryItemsReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInventoryItemsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimInventoryItemsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimInventoryItemsReadOK) Error() string { return fmt.Sprintf("[GET /dcim/inventory-items/{id}/][%d] dcimInventoryItemsReadOK %+v", 200, o.Payload) } +func (o *DcimInventoryItemsReadOK) GetPayload() *models.InventoryItem { + return o.Payload +} + func (o *DcimInventoryItemsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.InventoryItem) diff --git a/netbox/client/dcim/dcim_inventory_items_update_parameters.go b/netbox/client/dcim/dcim_inventory_items_update_parameters.go index 38cd99e199b1f472f9c82c7e2fb104760a6dae0a..ab830fd523af0439f5d87af6a54864ec57ba2935 100644 --- a/netbox/client/dcim/dcim_inventory_items_update_parameters.go +++ b/netbox/client/dcim/dcim_inventory_items_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimInventoryItemsUpdateParams creates a new DcimInventoryItemsUpdateParams object diff --git a/netbox/client/dcim/dcim_inventory_items_update_responses.go b/netbox/client/dcim/dcim_inventory_items_update_responses.go index c1dee4e4c8cb354a840754a33e6bb305206180eb..c915179acc67a6869b0154d702807a77f8b6b841 100644 --- a/netbox/client/dcim/dcim_inventory_items_update_responses.go +++ b/netbox/client/dcim/dcim_inventory_items_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimInventoryItemsUpdateReader is a Reader for the DcimInventoryItemsUpdate structure. @@ -38,7 +39,6 @@ type DcimInventoryItemsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimInventoryItemsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimInventoryItemsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimInventoryItemsUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/inventory-items/{id}/][%d] dcimInventoryItemsUpdateOK %+v", 200, o.Payload) } +func (o *DcimInventoryItemsUpdateOK) GetPayload() *models.InventoryItem { + return o.Payload +} + func (o *DcimInventoryItemsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.InventoryItem) diff --git a/netbox/client/dcim/dcim_manufacturers_create_parameters.go b/netbox/client/dcim/dcim_manufacturers_create_parameters.go index 3c7878e80d2632eae8f67846169e6f5ca654d10d..2a5c1cd5b3e8d2d3866646b4e81f9de9d834a04c 100644 --- a/netbox/client/dcim/dcim_manufacturers_create_parameters.go +++ b/netbox/client/dcim/dcim_manufacturers_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimManufacturersCreateParams creates a new DcimManufacturersCreateParams object diff --git a/netbox/client/dcim/dcim_manufacturers_create_responses.go b/netbox/client/dcim/dcim_manufacturers_create_responses.go index f454a3ce12e90a58cbdeb226ffd5cd5ca93c787c..d4716278ae9cd1b66bccd466df6f59696a820daa 100644 --- a/netbox/client/dcim/dcim_manufacturers_create_responses.go +++ b/netbox/client/dcim/dcim_manufacturers_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimManufacturersCreateReader is a Reader for the DcimManufacturersCreate structure. @@ -38,7 +39,6 @@ type DcimManufacturersCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimManufacturersCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimManufacturersCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimManufacturersCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/manufacturers/][%d] dcimManufacturersCreateCreated %+v", 201, o.Payload) } +func (o *DcimManufacturersCreateCreated) GetPayload() *models.Manufacturer { + return o.Payload +} + func (o *DcimManufacturersCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Manufacturer) diff --git a/netbox/client/dcim/dcim_manufacturers_delete_parameters.go b/netbox/client/dcim/dcim_manufacturers_delete_parameters.go index bcfda7f4f9f489d0f946ace38d2ebbbff71e517f..ccfc98c812e8482d50380917fca71e293d128d6b 100644 --- a/netbox/client/dcim/dcim_manufacturers_delete_parameters.go +++ b/netbox/client/dcim/dcim_manufacturers_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_manufacturers_delete_responses.go b/netbox/client/dcim/dcim_manufacturers_delete_responses.go index f5e67e6145bf96093d7c1271a0d72ba7d4c0a751..f365e12edb582cf2684efeee65cd75905196b540 100644 --- a/netbox/client/dcim/dcim_manufacturers_delete_responses.go +++ b/netbox/client/dcim/dcim_manufacturers_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimManufacturersDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimManufacturersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimManufacturersDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_manufacturers_list_parameters.go b/netbox/client/dcim/dcim_manufacturers_list_parameters.go index cdf24b2793bd4137bd3aed66f2a6e45836824d8f..6f9c5daaa586306ef159c34f27fb35f723e04d45 100644 --- a/netbox/client/dcim/dcim_manufacturers_list_parameters.go +++ b/netbox/client/dcim/dcim_manufacturers_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_manufacturers_list_responses.go b/netbox/client/dcim/dcim_manufacturers_list_responses.go index 417f10f9065259031388ffbdfb09c69a2198925d..29549cde36695feca9db904261a03039ca811be9 100644 --- a/netbox/client/dcim/dcim_manufacturers_list_responses.go +++ b/netbox/client/dcim/dcim_manufacturers_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimManufacturersListReader is a Reader for the DcimManufacturersList structure. @@ -42,7 +43,6 @@ type DcimManufacturersListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimManufacturersListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimManufacturersListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimManufacturersListOK) Error() string { return fmt.Sprintf("[GET /dcim/manufacturers/][%d] dcimManufacturersListOK %+v", 200, o.Payload) } +func (o *DcimManufacturersListOK) GetPayload() *DcimManufacturersListOKBody { + return o.Payload +} + func (o *DcimManufacturersListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimManufacturersListOKBody) diff --git a/netbox/client/dcim/dcim_manufacturers_partial_update_parameters.go b/netbox/client/dcim/dcim_manufacturers_partial_update_parameters.go index 9d1ab18dc980cb14f11cb8a303edf7c49b0c6b17..a9bc22a901520327e8b537518ed83e8425e318c8 100644 --- a/netbox/client/dcim/dcim_manufacturers_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_manufacturers_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimManufacturersPartialUpdateParams creates a new DcimManufacturersPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_manufacturers_partial_update_responses.go b/netbox/client/dcim/dcim_manufacturers_partial_update_responses.go index 82a4f71712aa0ea9dfdd1194f39b6993858b1a0a..60043ec049420ad940e5648bcdc310552360414a 100644 --- a/netbox/client/dcim/dcim_manufacturers_partial_update_responses.go +++ b/netbox/client/dcim/dcim_manufacturers_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimManufacturersPartialUpdateReader is a Reader for the DcimManufacturersPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimManufacturersPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimManufacturersPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimManufacturersPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimManufacturersPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/manufacturers/{id}/][%d] dcimManufacturersPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimManufacturersPartialUpdateOK) GetPayload() *models.Manufacturer { + return o.Payload +} + func (o *DcimManufacturersPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Manufacturer) diff --git a/netbox/client/dcim/dcim_manufacturers_read_parameters.go b/netbox/client/dcim/dcim_manufacturers_read_parameters.go index 89fb83306025ce149eec6e6ae599bd28cf2c6401..c8fdfcd4df608d0caa55830e5fc9d489aec9e5a4 100644 --- a/netbox/client/dcim/dcim_manufacturers_read_parameters.go +++ b/netbox/client/dcim/dcim_manufacturers_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_manufacturers_read_responses.go b/netbox/client/dcim/dcim_manufacturers_read_responses.go index da285b146fd692305d266ca781775e7176279ec8..a28fa22f1a4bc32d2f0598d392e16fa5307e1d2c 100644 --- a/netbox/client/dcim/dcim_manufacturers_read_responses.go +++ b/netbox/client/dcim/dcim_manufacturers_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimManufacturersReadReader is a Reader for the DcimManufacturersRead structure. @@ -38,7 +39,6 @@ type DcimManufacturersReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimManufacturersReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimManufacturersReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimManufacturersReadOK) Error() string { return fmt.Sprintf("[GET /dcim/manufacturers/{id}/][%d] dcimManufacturersReadOK %+v", 200, o.Payload) } +func (o *DcimManufacturersReadOK) GetPayload() *models.Manufacturer { + return o.Payload +} + func (o *DcimManufacturersReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Manufacturer) diff --git a/netbox/client/dcim/dcim_manufacturers_update_parameters.go b/netbox/client/dcim/dcim_manufacturers_update_parameters.go index 9aae10b0da41a06d3bf90cc76ea906ace6403624..6be6ace057fdd6f4304aeb04c0ab268148dcdbdd 100644 --- a/netbox/client/dcim/dcim_manufacturers_update_parameters.go +++ b/netbox/client/dcim/dcim_manufacturers_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimManufacturersUpdateParams creates a new DcimManufacturersUpdateParams object diff --git a/netbox/client/dcim/dcim_manufacturers_update_responses.go b/netbox/client/dcim/dcim_manufacturers_update_responses.go index 9518fb7b263edca0278211789927e436f9c2e477..f819ce0b568d73910ef5170728e26f9e30ceafac 100644 --- a/netbox/client/dcim/dcim_manufacturers_update_responses.go +++ b/netbox/client/dcim/dcim_manufacturers_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimManufacturersUpdateReader is a Reader for the DcimManufacturersUpdate structure. @@ -38,7 +39,6 @@ type DcimManufacturersUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimManufacturersUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimManufacturersUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimManufacturersUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/manufacturers/{id}/][%d] dcimManufacturersUpdateOK %+v", 200, o.Payload) } +func (o *DcimManufacturersUpdateOK) GetPayload() *models.Manufacturer { + return o.Payload +} + func (o *DcimManufacturersUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Manufacturer) diff --git a/netbox/client/dcim/dcim_platforms_create_parameters.go b/netbox/client/dcim/dcim_platforms_create_parameters.go index dd9c1573fa5f28e97c823654cb3ea3bd8a65c912..5c47f132ed8138dca091905c684dc8d35b75bae3 100644 --- a/netbox/client/dcim/dcim_platforms_create_parameters.go +++ b/netbox/client/dcim/dcim_platforms_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPlatformsCreateParams creates a new DcimPlatformsCreateParams object diff --git a/netbox/client/dcim/dcim_platforms_create_responses.go b/netbox/client/dcim/dcim_platforms_create_responses.go index d3d49dea3b84d36adf8c31732f69c69530a51841..3fa46a2066b2f2180ee7b5082825e7074ab73546 100644 --- a/netbox/client/dcim/dcim_platforms_create_responses.go +++ b/netbox/client/dcim/dcim_platforms_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPlatformsCreateReader is a Reader for the DcimPlatformsCreate structure. @@ -38,7 +39,6 @@ type DcimPlatformsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPlatformsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimPlatformsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPlatformsCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/platforms/][%d] dcimPlatformsCreateCreated %+v", 201, o.Payload) } +func (o *DcimPlatformsCreateCreated) GetPayload() *models.Platform { + return o.Payload +} + func (o *DcimPlatformsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Platform) diff --git a/netbox/client/dcim/dcim_platforms_delete_parameters.go b/netbox/client/dcim/dcim_platforms_delete_parameters.go index 9174d08f021ec01bdf602137aab5c5684c2ee276..d3b738b078e7bfb28576423c37abf95c574c69cb 100644 --- a/netbox/client/dcim/dcim_platforms_delete_parameters.go +++ b/netbox/client/dcim/dcim_platforms_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_platforms_delete_responses.go b/netbox/client/dcim/dcim_platforms_delete_responses.go index da9e3f9ed0caf640a162c650ac108447445f84b9..7e8373c1630e6e5502f873fa937f84305806741b 100644 --- a/netbox/client/dcim/dcim_platforms_delete_responses.go +++ b/netbox/client/dcim/dcim_platforms_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimPlatformsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPlatformsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimPlatformsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_platforms_list_parameters.go b/netbox/client/dcim/dcim_platforms_list_parameters.go index 317606160b6458fa696dc83d9da46299c2182719..3bb05535ccfebf17bbff846eb2a8e69905913131 100644 --- a/netbox/client/dcim/dcim_platforms_list_parameters.go +++ b/netbox/client/dcim/dcim_platforms_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_platforms_list_responses.go b/netbox/client/dcim/dcim_platforms_list_responses.go index dff5783c11ff26fd4f2967b11f54f0563820b1dc..fc4032754f6380309c1591422eed5f4075e367f2 100644 --- a/netbox/client/dcim/dcim_platforms_list_responses.go +++ b/netbox/client/dcim/dcim_platforms_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPlatformsListReader is a Reader for the DcimPlatformsList structure. @@ -42,7 +43,6 @@ type DcimPlatformsListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPlatformsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPlatformsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimPlatformsListOK) Error() string { return fmt.Sprintf("[GET /dcim/platforms/][%d] dcimPlatformsListOK %+v", 200, o.Payload) } +func (o *DcimPlatformsListOK) GetPayload() *DcimPlatformsListOKBody { + return o.Payload +} + func (o *DcimPlatformsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimPlatformsListOKBody) diff --git a/netbox/client/dcim/dcim_platforms_partial_update_parameters.go b/netbox/client/dcim/dcim_platforms_partial_update_parameters.go index ccd4f60442af776eb747127e5fb210993b102d9f..db8db41c385f7747018ae91c8da279f30123d837 100644 --- a/netbox/client/dcim/dcim_platforms_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_platforms_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPlatformsPartialUpdateParams creates a new DcimPlatformsPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_platforms_partial_update_responses.go b/netbox/client/dcim/dcim_platforms_partial_update_responses.go index 599237a1f3a24aa47a2abfbd2bab3111dbe5fb83..d8a0432990ce6655559ee07b0b975480cd329faf 100644 --- a/netbox/client/dcim/dcim_platforms_partial_update_responses.go +++ b/netbox/client/dcim/dcim_platforms_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPlatformsPartialUpdateReader is a Reader for the DcimPlatformsPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimPlatformsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPlatformsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPlatformsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPlatformsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/platforms/{id}/][%d] dcimPlatformsPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimPlatformsPartialUpdateOK) GetPayload() *models.Platform { + return o.Payload +} + func (o *DcimPlatformsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Platform) diff --git a/netbox/client/dcim/dcim_platforms_read_parameters.go b/netbox/client/dcim/dcim_platforms_read_parameters.go index 580c744aefe07aaff14b8aecc6f184fd4a725965..c2f1f83101705e5712741e425b824f7f281b8b80 100644 --- a/netbox/client/dcim/dcim_platforms_read_parameters.go +++ b/netbox/client/dcim/dcim_platforms_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_platforms_read_responses.go b/netbox/client/dcim/dcim_platforms_read_responses.go index 94ca12d7ffc91a62b33314140fd5c7501916623f..c0ed5cd753067e1794d6aefe176ad1999290f10e 100644 --- a/netbox/client/dcim/dcim_platforms_read_responses.go +++ b/netbox/client/dcim/dcim_platforms_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPlatformsReadReader is a Reader for the DcimPlatformsRead structure. @@ -38,7 +39,6 @@ type DcimPlatformsReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPlatformsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPlatformsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPlatformsReadOK) Error() string { return fmt.Sprintf("[GET /dcim/platforms/{id}/][%d] dcimPlatformsReadOK %+v", 200, o.Payload) } +func (o *DcimPlatformsReadOK) GetPayload() *models.Platform { + return o.Payload +} + func (o *DcimPlatformsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Platform) diff --git a/netbox/client/dcim/dcim_platforms_update_parameters.go b/netbox/client/dcim/dcim_platforms_update_parameters.go index 245f25ff2a807647d39f99811c21b1a9aca15490..319900a33650c1eabca332574839a34a71f7a562 100644 --- a/netbox/client/dcim/dcim_platforms_update_parameters.go +++ b/netbox/client/dcim/dcim_platforms_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPlatformsUpdateParams creates a new DcimPlatformsUpdateParams object diff --git a/netbox/client/dcim/dcim_platforms_update_responses.go b/netbox/client/dcim/dcim_platforms_update_responses.go index 0483dba464b80448a67bd3ee7eeb73795bcbb443..376fa1cf7e0aea4c1f6088056d0a9e6b3d5d3b48 100644 --- a/netbox/client/dcim/dcim_platforms_update_responses.go +++ b/netbox/client/dcim/dcim_platforms_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPlatformsUpdateReader is a Reader for the DcimPlatformsUpdate structure. @@ -38,7 +39,6 @@ type DcimPlatformsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPlatformsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPlatformsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPlatformsUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/platforms/{id}/][%d] dcimPlatformsUpdateOK %+v", 200, o.Payload) } +func (o *DcimPlatformsUpdateOK) GetPayload() *models.Platform { + return o.Payload +} + func (o *DcimPlatformsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Platform) diff --git a/netbox/client/dcim/dcim_power_connections_list_parameters.go b/netbox/client/dcim/dcim_power_connections_list_parameters.go index 951fe1bd903a4f1618af569dda3f563d918c23c4..0ca5e65b4934c502adbe54b0bcb12f194a9cd7ef 100644 --- a/netbox/client/dcim/dcim_power_connections_list_parameters.go +++ b/netbox/client/dcim/dcim_power_connections_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -80,6 +81,8 @@ type DcimPowerConnectionsListParams struct { ConnectionStatus *string /*Device*/ Device *string + /*DeviceID*/ + DeviceID *string /*Limit Number of results to return per page. @@ -155,6 +158,17 @@ 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) @@ -239,6 +253,22 @@ func (o *DcimPowerConnectionsListParams) WriteToRequest(r runtime.ClientRequest, } + 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 diff --git a/netbox/client/dcim/dcim_power_connections_list_responses.go b/netbox/client/dcim/dcim_power_connections_list_responses.go index 1e3492aea7f9a89ac771c6145babda9a04756b28..5864a44380871798b8e9ae5ce07e0480f11ba34b 100644 --- a/netbox/client/dcim/dcim_power_connections_list_responses.go +++ b/netbox/client/dcim/dcim_power_connections_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerConnectionsListReader is a Reader for the DcimPowerConnectionsList structure. @@ -42,7 +43,6 @@ type DcimPowerConnectionsListReader struct { // 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 { @@ -72,6 +72,10 @@ 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) diff --git a/netbox/client/dcim/dcim_power_feeds_create_parameters.go b/netbox/client/dcim/dcim_power_feeds_create_parameters.go index c1dae30d3e588a39cbd65ec5a102c113ce974fbe..6ea5ddcb1fe092b80f317cb6800d0f459131fa94 100644 --- a/netbox/client/dcim/dcim_power_feeds_create_parameters.go +++ b/netbox/client/dcim/dcim_power_feeds_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerFeedsCreateParams creates a new DcimPowerFeedsCreateParams object diff --git a/netbox/client/dcim/dcim_power_feeds_create_responses.go b/netbox/client/dcim/dcim_power_feeds_create_responses.go index da8de7f12f1caf432bddb9acf66959a5b8c6db05..ff7e1f3a44a2c4082b9bbdf2b0e3bcb5edc98c08 100644 --- a/netbox/client/dcim/dcim_power_feeds_create_responses.go +++ b/netbox/client/dcim/dcim_power_feeds_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerFeedsCreateReader is a Reader for the DcimPowerFeedsCreate structure. @@ -38,7 +39,6 @@ type DcimPowerFeedsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerFeedsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimPowerFeedsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerFeedsCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/power-feeds/][%d] dcimPowerFeedsCreateCreated %+v", 201, o.Payload) } +func (o *DcimPowerFeedsCreateCreated) GetPayload() *models.PowerFeed { + return o.Payload +} + func (o *DcimPowerFeedsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerFeed) diff --git a/netbox/client/dcim/dcim_power_feeds_delete_parameters.go b/netbox/client/dcim/dcim_power_feeds_delete_parameters.go index 03f22ce4c27dcd6262b70b950fe8e3fd92945bf6..9c616b45549f41c3a91018aa1091b01270883b08 100644 --- a/netbox/client/dcim/dcim_power_feeds_delete_parameters.go +++ b/netbox/client/dcim/dcim_power_feeds_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_power_feeds_delete_responses.go b/netbox/client/dcim/dcim_power_feeds_delete_responses.go index cb5e1cb8fa6f79fdbd158bff7b14b0c650b84037..8799dd08d58829f6062fe823c0bb8259c63cf294 100644 --- a/netbox/client/dcim/dcim_power_feeds_delete_responses.go +++ b/netbox/client/dcim/dcim_power_feeds_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimPowerFeedsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerFeedsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimPowerFeedsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_power_feeds_list_parameters.go b/netbox/client/dcim/dcim_power_feeds_list_parameters.go index 20099cb0364c5f328da73427a3261dc57c4b2637..d226471b61fe5051f5addd4a153f7fa614e57e73 100644 --- a/netbox/client/dcim/dcim_power_feeds_list_parameters.go +++ b/netbox/client/dcim/dcim_power_feeds_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -78,11 +79,23 @@ type DcimPowerFeedsListParams struct { /*Amperage*/ Amperage *string + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*IDIn Multiple values may be separated by commas. */ IDIn *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. @@ -105,6 +118,10 @@ type DcimPowerFeedsListParams struct { Q *string /*RackID*/ RackID *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string /*Site*/ Site *string /*SiteID*/ @@ -169,6 +186,39 @@ func (o *DcimPowerFeedsListParams) SetAmperage(amperage *string) { o.Amperage = amperage } +// WithCreated adds the created to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithCreated(created *string) *DcimPowerFeedsListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithCreatedGte(createdGte *string) *DcimPowerFeedsListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithCreatedLte(createdLte *string) *DcimPowerFeedsListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + // WithIDIn adds the iDIn to the dcim power feeds list params func (o *DcimPowerFeedsListParams) WithIDIn(iDIn *string) *DcimPowerFeedsListParams { o.SetIDIn(iDIn) @@ -180,6 +230,39 @@ func (o *DcimPowerFeedsListParams) SetIDIn(iDIn *string) { o.IDIn = iDIn } +// WithLastUpdated adds the lastUpdated to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithLastUpdated(lastUpdated *string) *DcimPowerFeedsListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimPowerFeedsListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimPowerFeedsListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the dcim power feeds list params func (o *DcimPowerFeedsListParams) WithLimit(limit *int64) *DcimPowerFeedsListParams { o.SetLimit(limit) @@ -268,6 +351,28 @@ func (o *DcimPowerFeedsListParams) SetRackID(rackID *string) { o.RackID = rackID } +// WithRegion adds the region to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithRegion(region *string) *DcimPowerFeedsListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithRegionID(regionID *string) *DcimPowerFeedsListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + // WithSite adds the site to the dcim power feeds list params func (o *DcimPowerFeedsListParams) WithSite(site *string) *DcimPowerFeedsListParams { o.SetSite(site) @@ -369,6 +474,54 @@ func (o *DcimPowerFeedsListParams) WriteToRequest(r runtime.ClientRequest, reg s } + 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.IDIn != nil { // query param id__in @@ -385,6 +538,54 @@ func (o *DcimPowerFeedsListParams) WriteToRequest(r runtime.ClientRequest, reg s } + 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 @@ -513,6 +714,38 @@ func (o *DcimPowerFeedsListParams) WriteToRequest(r runtime.ClientRequest, reg s } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + if o.Site != nil { // query param site diff --git a/netbox/client/dcim/dcim_power_feeds_list_responses.go b/netbox/client/dcim/dcim_power_feeds_list_responses.go index 5751779e950050515547d4e66489a73417bd69a4..adf13e94b300b1287bfb09190bcf8277827590a7 100644 --- a/netbox/client/dcim/dcim_power_feeds_list_responses.go +++ b/netbox/client/dcim/dcim_power_feeds_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerFeedsListReader is a Reader for the DcimPowerFeedsList structure. @@ -42,7 +43,6 @@ type DcimPowerFeedsListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerFeedsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerFeedsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimPowerFeedsListOK) Error() string { return fmt.Sprintf("[GET /dcim/power-feeds/][%d] dcimPowerFeedsListOK %+v", 200, o.Payload) } +func (o *DcimPowerFeedsListOK) GetPayload() *DcimPowerFeedsListOKBody { + return o.Payload +} + func (o *DcimPowerFeedsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimPowerFeedsListOKBody) diff --git a/netbox/client/dcim/dcim_power_feeds_partial_update_parameters.go b/netbox/client/dcim/dcim_power_feeds_partial_update_parameters.go index 23fd7557de94a26033aa685c77851b7e94a2cf0b..df59f3f3183ab2d2fbb542d0fc0ea04601e56da5 100644 --- a/netbox/client/dcim/dcim_power_feeds_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_power_feeds_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerFeedsPartialUpdateParams creates a new DcimPowerFeedsPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_power_feeds_partial_update_responses.go b/netbox/client/dcim/dcim_power_feeds_partial_update_responses.go index ddd704782951581cf9971e1b56708489bc4d8c6c..06f14daaf7bba14fa74c1791286e0b9baf7c8254 100644 --- a/netbox/client/dcim/dcim_power_feeds_partial_update_responses.go +++ b/netbox/client/dcim/dcim_power_feeds_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerFeedsPartialUpdateReader is a Reader for the DcimPowerFeedsPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimPowerFeedsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerFeedsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerFeedsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerFeedsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/power-feeds/{id}/][%d] dcimPowerFeedsPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimPowerFeedsPartialUpdateOK) GetPayload() *models.PowerFeed { + return o.Payload +} + func (o *DcimPowerFeedsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerFeed) diff --git a/netbox/client/dcim/dcim_power_feeds_read_parameters.go b/netbox/client/dcim/dcim_power_feeds_read_parameters.go index 2680a455c9c12838c5dbe6d18e3f93d83fcffd0e..e8872b3d5660f8a74042ae66754247d6f67bd38e 100644 --- a/netbox/client/dcim/dcim_power_feeds_read_parameters.go +++ b/netbox/client/dcim/dcim_power_feeds_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_power_feeds_read_responses.go b/netbox/client/dcim/dcim_power_feeds_read_responses.go index d04f67232eba427f959e6423634e7aabe1862d55..4ca8f661464fdb3ed963b07bfde1da967f2f9773 100644 --- a/netbox/client/dcim/dcim_power_feeds_read_responses.go +++ b/netbox/client/dcim/dcim_power_feeds_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerFeedsReadReader is a Reader for the DcimPowerFeedsRead structure. @@ -38,7 +39,6 @@ type DcimPowerFeedsReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerFeedsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerFeedsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerFeedsReadOK) Error() string { return fmt.Sprintf("[GET /dcim/power-feeds/{id}/][%d] dcimPowerFeedsReadOK %+v", 200, o.Payload) } +func (o *DcimPowerFeedsReadOK) GetPayload() *models.PowerFeed { + return o.Payload +} + func (o *DcimPowerFeedsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerFeed) diff --git a/netbox/client/dcim/dcim_power_feeds_update_parameters.go b/netbox/client/dcim/dcim_power_feeds_update_parameters.go index 61a44f3774163c79ae9396034b07abf535d6cb38..7278b3ee47131eded544d26a93180c70fde35e8e 100644 --- a/netbox/client/dcim/dcim_power_feeds_update_parameters.go +++ b/netbox/client/dcim/dcim_power_feeds_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerFeedsUpdateParams creates a new DcimPowerFeedsUpdateParams object diff --git a/netbox/client/dcim/dcim_power_feeds_update_responses.go b/netbox/client/dcim/dcim_power_feeds_update_responses.go index 1721fd7b912c886e2ebffc4c423801e9b723b17a..aab4c9e33bcb2b02123288525e0c7651ba6d8e5b 100644 --- a/netbox/client/dcim/dcim_power_feeds_update_responses.go +++ b/netbox/client/dcim/dcim_power_feeds_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerFeedsUpdateReader is a Reader for the DcimPowerFeedsUpdate structure. @@ -38,7 +39,6 @@ type DcimPowerFeedsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerFeedsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerFeedsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerFeedsUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/power-feeds/{id}/][%d] dcimPowerFeedsUpdateOK %+v", 200, o.Payload) } +func (o *DcimPowerFeedsUpdateOK) GetPayload() *models.PowerFeed { + return o.Payload +} + func (o *DcimPowerFeedsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerFeed) diff --git a/netbox/client/dcim/dcim_power_outlet_templates_create_parameters.go b/netbox/client/dcim/dcim_power_outlet_templates_create_parameters.go index b8127760771236cce659a28a23d091d7013b81b6..5a2eb1acf67dd401d9a85f019e958d3b09720456 100644 --- a/netbox/client/dcim/dcim_power_outlet_templates_create_parameters.go +++ b/netbox/client/dcim/dcim_power_outlet_templates_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerOutletTemplatesCreateParams creates a new DcimPowerOutletTemplatesCreateParams object diff --git a/netbox/client/dcim/dcim_power_outlet_templates_create_responses.go b/netbox/client/dcim/dcim_power_outlet_templates_create_responses.go index 08ea3e953ac69b26048acd8cdfedf480976f9e3c..66fefa9dfa5b2f0d6d3a7d5dd0294e53f1072346 100644 --- a/netbox/client/dcim/dcim_power_outlet_templates_create_responses.go +++ b/netbox/client/dcim/dcim_power_outlet_templates_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerOutletTemplatesCreateReader is a Reader for the DcimPowerOutletTemplatesCreate structure. @@ -38,7 +39,6 @@ type DcimPowerOutletTemplatesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerOutletTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimPowerOutletTemplatesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerOutletTemplatesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/power-outlet-templates/][%d] dcimPowerOutletTemplatesCreateCreated %+v", 201, o.Payload) } +func (o *DcimPowerOutletTemplatesCreateCreated) GetPayload() *models.PowerOutletTemplate { + return o.Payload +} + func (o *DcimPowerOutletTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerOutletTemplate) diff --git a/netbox/client/dcim/dcim_power_outlet_templates_delete_parameters.go b/netbox/client/dcim/dcim_power_outlet_templates_delete_parameters.go index 55e719e89c10ee5ede7818a303a8f319ce888927..efa013bc8dfc3119985326dda34692f2559c3cc3 100644 --- a/netbox/client/dcim/dcim_power_outlet_templates_delete_parameters.go +++ b/netbox/client/dcim/dcim_power_outlet_templates_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_power_outlet_templates_delete_responses.go b/netbox/client/dcim/dcim_power_outlet_templates_delete_responses.go index b6845f85a1a5fd60fe85e9ed70a0a78ccee3f1bb..0043518835f09f8275ecfe45761055ee3925377f 100644 --- a/netbox/client/dcim/dcim_power_outlet_templates_delete_responses.go +++ b/netbox/client/dcim/dcim_power_outlet_templates_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimPowerOutletTemplatesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerOutletTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimPowerOutletTemplatesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go b/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go index 18dc4df3bf30ab97fe74cc16472485e631831a44..3a5193cbeaed98d235c0bba28b5d68d229c8e611 100644 --- a/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -96,6 +97,8 @@ type DcimPowerOutletTemplatesListParams struct { Offset *int64 /*Q*/ Q *string + /*Type*/ + Type *string timeout time.Duration Context context.Context @@ -212,6 +215,17 @@ func (o *DcimPowerOutletTemplatesListParams) SetQ(q *string) { o.Q = q } +// WithType adds the typeVar to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) WithType(typeVar *string) *DcimPowerOutletTemplatesListParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) SetType(typeVar *string) { + o.Type = typeVar +} + // WriteToRequest writes these params to a swagger request func (o *DcimPowerOutletTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -332,6 +346,22 @@ func (o *DcimPowerOutletTemplatesListParams) WriteToRequest(r runtime.ClientRequ } + if o.Type != nil { + + // query param type + var qrType string + if o.Type != nil { + qrType = *o.Type + } + qType := qrType + if qType != "" { + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go b/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go index 0a77fd730891847703d312040087bbd662d0eb5d..b121d15f32eee488fe14c12099ca18f07c2daf45 100644 --- a/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go +++ b/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerOutletTemplatesListReader is a Reader for the DcimPowerOutletTemplatesList structure. @@ -42,7 +43,6 @@ type DcimPowerOutletTemplatesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerOutletTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerOutletTemplatesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimPowerOutletTemplatesListOK) Error() string { return fmt.Sprintf("[GET /dcim/power-outlet-templates/][%d] dcimPowerOutletTemplatesListOK %+v", 200, o.Payload) } +func (o *DcimPowerOutletTemplatesListOK) GetPayload() *DcimPowerOutletTemplatesListOKBody { + return o.Payload +} + func (o *DcimPowerOutletTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimPowerOutletTemplatesListOKBody) diff --git a/netbox/client/dcim/dcim_power_outlet_templates_partial_update_parameters.go b/netbox/client/dcim/dcim_power_outlet_templates_partial_update_parameters.go index d97d289e2063346d1b6b9dc6933a26ca02a39d4b..58e73ecd1bacb9e690a107ef78787af47f4182c1 100644 --- a/netbox/client/dcim/dcim_power_outlet_templates_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_power_outlet_templates_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerOutletTemplatesPartialUpdateParams creates a new DcimPowerOutletTemplatesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_power_outlet_templates_partial_update_responses.go b/netbox/client/dcim/dcim_power_outlet_templates_partial_update_responses.go index 6d454457c00af3fc0e914bc12b9c83fd04e4d933..a61f70f862d28af2f534e33f5a4eb9c989b1f340 100644 --- a/netbox/client/dcim/dcim_power_outlet_templates_partial_update_responses.go +++ b/netbox/client/dcim/dcim_power_outlet_templates_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerOutletTemplatesPartialUpdateReader is a Reader for the DcimPowerOutletTemplatesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimPowerOutletTemplatesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerOutletTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerOutletTemplatesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerOutletTemplatesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/power-outlet-templates/{id}/][%d] dcimPowerOutletTemplatesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimPowerOutletTemplatesPartialUpdateOK) GetPayload() *models.PowerOutletTemplate { + return o.Payload +} + func (o *DcimPowerOutletTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerOutletTemplate) diff --git a/netbox/client/dcim/dcim_power_outlet_templates_read_parameters.go b/netbox/client/dcim/dcim_power_outlet_templates_read_parameters.go index 5ea711430cd85e1699a68f5949fdf0c0ece8f7a0..afd04b34435fc9b86f09681f6b469b386fb870ff 100644 --- a/netbox/client/dcim/dcim_power_outlet_templates_read_parameters.go +++ b/netbox/client/dcim/dcim_power_outlet_templates_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_power_outlet_templates_read_responses.go b/netbox/client/dcim/dcim_power_outlet_templates_read_responses.go index c5a28e8aeab7ab4ab2ac4dcb1cd0c916d7decd9d..9e973825bd646286909909b28dce4ef53c87cdab 100644 --- a/netbox/client/dcim/dcim_power_outlet_templates_read_responses.go +++ b/netbox/client/dcim/dcim_power_outlet_templates_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerOutletTemplatesReadReader is a Reader for the DcimPowerOutletTemplatesRead structure. @@ -38,7 +39,6 @@ type DcimPowerOutletTemplatesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerOutletTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerOutletTemplatesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerOutletTemplatesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/power-outlet-templates/{id}/][%d] dcimPowerOutletTemplatesReadOK %+v", 200, o.Payload) } +func (o *DcimPowerOutletTemplatesReadOK) GetPayload() *models.PowerOutletTemplate { + return o.Payload +} + func (o *DcimPowerOutletTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerOutletTemplate) diff --git a/netbox/client/dcim/dcim_power_outlet_templates_update_parameters.go b/netbox/client/dcim/dcim_power_outlet_templates_update_parameters.go index 661327b77ba50a286e2aebf48e452a5fe35ff9e6..beba4ebe874c77f1749c18fd665ca408a1eaca90 100644 --- a/netbox/client/dcim/dcim_power_outlet_templates_update_parameters.go +++ b/netbox/client/dcim/dcim_power_outlet_templates_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerOutletTemplatesUpdateParams creates a new DcimPowerOutletTemplatesUpdateParams object diff --git a/netbox/client/dcim/dcim_power_outlet_templates_update_responses.go b/netbox/client/dcim/dcim_power_outlet_templates_update_responses.go index 6653a7002b65bac701ef26b565081576d09c7be9..28ec9ba35e7c05e2eca3cbc9186408030621b652 100644 --- a/netbox/client/dcim/dcim_power_outlet_templates_update_responses.go +++ b/netbox/client/dcim/dcim_power_outlet_templates_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerOutletTemplatesUpdateReader is a Reader for the DcimPowerOutletTemplatesUpdate structure. @@ -38,7 +39,6 @@ type DcimPowerOutletTemplatesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerOutletTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerOutletTemplatesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerOutletTemplatesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/power-outlet-templates/{id}/][%d] dcimPowerOutletTemplatesUpdateOK %+v", 200, o.Payload) } +func (o *DcimPowerOutletTemplatesUpdateOK) GetPayload() *models.PowerOutletTemplate { + return o.Payload +} + func (o *DcimPowerOutletTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerOutletTemplate) diff --git a/netbox/client/dcim/dcim_power_outlets_create_parameters.go b/netbox/client/dcim/dcim_power_outlets_create_parameters.go index f842ab8156e80a797e95ce05112ba3716e0a01f1..8dadae2aaf0b699c768ef1d8f892f165d3d67379 100644 --- a/netbox/client/dcim/dcim_power_outlets_create_parameters.go +++ b/netbox/client/dcim/dcim_power_outlets_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerOutletsCreateParams creates a new DcimPowerOutletsCreateParams object diff --git a/netbox/client/dcim/dcim_power_outlets_create_responses.go b/netbox/client/dcim/dcim_power_outlets_create_responses.go index 812f892c7ee270580ab398f0c30e0d9ac9a8e532..c26ff860ea4eda3832f8372dd31ccef61b546c6f 100644 --- a/netbox/client/dcim/dcim_power_outlets_create_responses.go +++ b/netbox/client/dcim/dcim_power_outlets_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerOutletsCreateReader is a Reader for the DcimPowerOutletsCreate structure. @@ -38,7 +39,6 @@ type DcimPowerOutletsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerOutletsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimPowerOutletsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerOutletsCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/power-outlets/][%d] dcimPowerOutletsCreateCreated %+v", 201, o.Payload) } +func (o *DcimPowerOutletsCreateCreated) GetPayload() *models.PowerOutlet { + return o.Payload +} + func (o *DcimPowerOutletsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerOutlet) diff --git a/netbox/client/dcim/dcim_power_outlets_delete_parameters.go b/netbox/client/dcim/dcim_power_outlets_delete_parameters.go index 1ba95c820ed8fa97c8c4a1988fad5b91b7b8f5c7..8f5a4f19026f12ac87ff0bd30ae2abc9647aed32 100644 --- a/netbox/client/dcim/dcim_power_outlets_delete_parameters.go +++ b/netbox/client/dcim/dcim_power_outlets_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_power_outlets_delete_responses.go b/netbox/client/dcim/dcim_power_outlets_delete_responses.go index 5a645b55d369b638d9dd6c0a0317f557c28b0d33..60333de7e53dedead963c0d53a99d58fc865f905 100644 --- a/netbox/client/dcim/dcim_power_outlets_delete_responses.go +++ b/netbox/client/dcim/dcim_power_outlets_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimPowerOutletsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerOutletsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimPowerOutletsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_power_outlets_list_parameters.go b/netbox/client/dcim/dcim_power_outlets_list_parameters.go index f9dc337307711929be9b9b278cb72bbeecc73274..25463ce24cbb57da89ac00006fc28cef1b98f640 100644 --- a/netbox/client/dcim/dcim_power_outlets_list_parameters.go +++ b/netbox/client/dcim/dcim_power_outlets_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -104,8 +105,18 @@ type DcimPowerOutletsListParams struct { Offset *int64 /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string + /*Site*/ + Site *string + /*SiteID*/ + SiteID *string /*Tag*/ Tag *string + /*Type*/ + Type *string timeout time.Duration Context context.Context @@ -266,6 +277,50 @@ func (o *DcimPowerOutletsListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithRegion(region *string) *DcimPowerOutletsListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithRegionID(regionID *string) *DcimPowerOutletsListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + +// WithSite adds the site to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithSite(site *string) *DcimPowerOutletsListParams { + o.SetSite(site) + return o +} + +// SetSite adds the site to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetSite(site *string) { + o.Site = site +} + +// WithSiteID adds the siteID to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithSiteID(siteID *string) *DcimPowerOutletsListParams { + o.SetSiteID(siteID) + return o +} + +// SetSiteID adds the siteId to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetSiteID(siteID *string) { + o.SiteID = siteID +} + // WithTag adds the tag to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithTag(tag *string) *DcimPowerOutletsListParams { o.SetTag(tag) @@ -277,6 +332,17 @@ func (o *DcimPowerOutletsListParams) SetTag(tag *string) { o.Tag = tag } +// WithType adds the typeVar to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithType(typeVar *string) *DcimPowerOutletsListParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetType(typeVar *string) { + o.Type = typeVar +} + // WriteToRequest writes these params to a swagger request func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -461,6 +527,70 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + + if o.Site != nil { + + // query param site + var qrSite string + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + + } + if o.Tag != nil { // query param tag @@ -477,6 +607,22 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } + if o.Type != nil { + + // query param type + var qrType string + if o.Type != nil { + qrType = *o.Type + } + qType := qrType + if qType != "" { + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_power_outlets_list_responses.go b/netbox/client/dcim/dcim_power_outlets_list_responses.go index 961dd3ed8fc7ff3e92cb41a72981749f05d6f7a3..4a43a98d8c310e8247784da044d479f266045f28 100644 --- a/netbox/client/dcim/dcim_power_outlets_list_responses.go +++ b/netbox/client/dcim/dcim_power_outlets_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerOutletsListReader is a Reader for the DcimPowerOutletsList structure. @@ -42,7 +43,6 @@ type DcimPowerOutletsListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerOutletsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerOutletsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimPowerOutletsListOK) Error() string { return fmt.Sprintf("[GET /dcim/power-outlets/][%d] dcimPowerOutletsListOK %+v", 200, o.Payload) } +func (o *DcimPowerOutletsListOK) GetPayload() *DcimPowerOutletsListOKBody { + return o.Payload +} + func (o *DcimPowerOutletsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimPowerOutletsListOKBody) diff --git a/netbox/client/dcim/dcim_power_outlets_partial_update_parameters.go b/netbox/client/dcim/dcim_power_outlets_partial_update_parameters.go index 62518f489d54e27ec4e16fec00608ffc7d54967b..4afc71fe1a3455371da4fe16778d409cb09d3f05 100644 --- a/netbox/client/dcim/dcim_power_outlets_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_power_outlets_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerOutletsPartialUpdateParams creates a new DcimPowerOutletsPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_power_outlets_partial_update_responses.go b/netbox/client/dcim/dcim_power_outlets_partial_update_responses.go index 36a5024816479edd6c85c2e76e72441bfbdea327..a1b6d9ffc0ae9374b5c541c0749620427770a91e 100644 --- a/netbox/client/dcim/dcim_power_outlets_partial_update_responses.go +++ b/netbox/client/dcim/dcim_power_outlets_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerOutletsPartialUpdateReader is a Reader for the DcimPowerOutletsPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimPowerOutletsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerOutletsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerOutletsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerOutletsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/power-outlets/{id}/][%d] dcimPowerOutletsPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimPowerOutletsPartialUpdateOK) GetPayload() *models.PowerOutlet { + return o.Payload +} + func (o *DcimPowerOutletsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerOutlet) diff --git a/netbox/client/dcim/dcim_power_outlets_read_parameters.go b/netbox/client/dcim/dcim_power_outlets_read_parameters.go index 6c35e05961c015bfb5391d4f7d22917ed7d4e71a..13f2518084e355a2c6c08174c5d5566a3c4952bc 100644 --- a/netbox/client/dcim/dcim_power_outlets_read_parameters.go +++ b/netbox/client/dcim/dcim_power_outlets_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_power_outlets_read_responses.go b/netbox/client/dcim/dcim_power_outlets_read_responses.go index 06b5023bdbeea866106cc5356a115f2743679851..5a27283f830ab36dab427a9f1b9d500799c94126 100644 --- a/netbox/client/dcim/dcim_power_outlets_read_responses.go +++ b/netbox/client/dcim/dcim_power_outlets_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerOutletsReadReader is a Reader for the DcimPowerOutletsRead structure. @@ -38,7 +39,6 @@ type DcimPowerOutletsReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerOutletsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerOutletsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerOutletsReadOK) Error() string { return fmt.Sprintf("[GET /dcim/power-outlets/{id}/][%d] dcimPowerOutletsReadOK %+v", 200, o.Payload) } +func (o *DcimPowerOutletsReadOK) GetPayload() *models.PowerOutlet { + return o.Payload +} + func (o *DcimPowerOutletsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerOutlet) diff --git a/netbox/client/dcim/dcim_power_outlets_trace_parameters.go b/netbox/client/dcim/dcim_power_outlets_trace_parameters.go index 90d8ca44cabaa11875a3d18fa801e02726162dad..b8329ca5880676d3c92ad56fea85ff55d0bd54db 100644 --- a/netbox/client/dcim/dcim_power_outlets_trace_parameters.go +++ b/netbox/client/dcim/dcim_power_outlets_trace_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_power_outlets_trace_responses.go b/netbox/client/dcim/dcim_power_outlets_trace_responses.go index c705488a291ff0ca28fc54de110e96dfec78ba3d..02f39cbb44c52298c46a661722e146cd782a193b 100644 --- a/netbox/client/dcim/dcim_power_outlets_trace_responses.go +++ b/netbox/client/dcim/dcim_power_outlets_trace_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerOutletsTraceReader is a Reader for the DcimPowerOutletsTrace structure. @@ -38,7 +39,6 @@ type DcimPowerOutletsTraceReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerOutletsTraceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerOutletsTraceOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerOutletsTraceOK) Error() string { return fmt.Sprintf("[GET /dcim/power-outlets/{id}/trace/][%d] dcimPowerOutletsTraceOK %+v", 200, o.Payload) } +func (o *DcimPowerOutletsTraceOK) GetPayload() *models.PowerOutlet { + return o.Payload +} + func (o *DcimPowerOutletsTraceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerOutlet) diff --git a/netbox/client/dcim/dcim_power_outlets_update_parameters.go b/netbox/client/dcim/dcim_power_outlets_update_parameters.go index 2ba6515f2178d4792d5e4d16a003a9e6ddf3e069..5d54c4ebfafa4abb3ba16bfce986a01e9e6a34df 100644 --- a/netbox/client/dcim/dcim_power_outlets_update_parameters.go +++ b/netbox/client/dcim/dcim_power_outlets_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerOutletsUpdateParams creates a new DcimPowerOutletsUpdateParams object diff --git a/netbox/client/dcim/dcim_power_outlets_update_responses.go b/netbox/client/dcim/dcim_power_outlets_update_responses.go index 80f5e3cb982e851d5126be2d3771c0cc7e989f94..ca266a0eb8dc5c87c30e7af3a36b82adee221630 100644 --- a/netbox/client/dcim/dcim_power_outlets_update_responses.go +++ b/netbox/client/dcim/dcim_power_outlets_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerOutletsUpdateReader is a Reader for the DcimPowerOutletsUpdate structure. @@ -38,7 +39,6 @@ type DcimPowerOutletsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerOutletsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerOutletsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerOutletsUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/power-outlets/{id}/][%d] dcimPowerOutletsUpdateOK %+v", 200, o.Payload) } +func (o *DcimPowerOutletsUpdateOK) GetPayload() *models.PowerOutlet { + return o.Payload +} + func (o *DcimPowerOutletsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerOutlet) diff --git a/netbox/client/dcim/dcim_power_panels_create_parameters.go b/netbox/client/dcim/dcim_power_panels_create_parameters.go index 4592c6641ae7be9dff5c4adc172a371343bb44ce..5db264b9adf65c3596568d01e0512f65dd6c9a28 100644 --- a/netbox/client/dcim/dcim_power_panels_create_parameters.go +++ b/netbox/client/dcim/dcim_power_panels_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerPanelsCreateParams creates a new DcimPowerPanelsCreateParams object diff --git a/netbox/client/dcim/dcim_power_panels_create_responses.go b/netbox/client/dcim/dcim_power_panels_create_responses.go index 4452c24fdeb88d9f736bffb8aca248fccec971e3..ee90f4fca47a2053c769467678996fd6efec0648 100644 --- a/netbox/client/dcim/dcim_power_panels_create_responses.go +++ b/netbox/client/dcim/dcim_power_panels_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPanelsCreateReader is a Reader for the DcimPowerPanelsCreate structure. @@ -38,7 +39,6 @@ type DcimPowerPanelsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPanelsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimPowerPanelsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerPanelsCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/power-panels/][%d] dcimPowerPanelsCreateCreated %+v", 201, o.Payload) } +func (o *DcimPowerPanelsCreateCreated) GetPayload() *models.PowerPanel { + return o.Payload +} + func (o *DcimPowerPanelsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerPanel) diff --git a/netbox/client/dcim/dcim_power_panels_delete_parameters.go b/netbox/client/dcim/dcim_power_panels_delete_parameters.go index b70a767730cf54ce8abe87b58c573c28353feb58..829aeaf4e254f605dc04466a8c7a5c91a76b99e6 100644 --- a/netbox/client/dcim/dcim_power_panels_delete_parameters.go +++ b/netbox/client/dcim/dcim_power_panels_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_power_panels_delete_responses.go b/netbox/client/dcim/dcim_power_panels_delete_responses.go index e7a415f3607827179fe3b9af0100ab73e57ba224..dada7a1bf5e0f2ef0cf42be8666cd9bf523f8222 100644 --- a/netbox/client/dcim/dcim_power_panels_delete_responses.go +++ b/netbox/client/dcim/dcim_power_panels_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimPowerPanelsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPanelsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimPowerPanelsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_power_panels_list_parameters.go b/netbox/client/dcim/dcim_power_panels_list_parameters.go index 8cff74377cea258db5f79d0fd32c5d7badf386f8..2fb1ba999c317b0a9dc6d9aea449cd5fd13a1dc6 100644 --- a/netbox/client/dcim/dcim_power_panels_list_parameters.go +++ b/netbox/client/dcim/dcim_power_panels_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -97,6 +98,10 @@ type DcimPowerPanelsListParams struct { Q *string /*RackGroupID*/ RackGroupID *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string /*Site*/ Site *string /*SiteID*/ @@ -206,6 +211,28 @@ func (o *DcimPowerPanelsListParams) SetRackGroupID(rackGroupID *string) { o.RackGroupID = rackGroupID } +// WithRegion adds the region to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithRegion(region *string) *DcimPowerPanelsListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithRegionID(regionID *string) *DcimPowerPanelsListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + // WithSite adds the site to the dcim power panels list params func (o *DcimPowerPanelsListParams) WithSite(site *string) *DcimPowerPanelsListParams { o.SetSite(site) @@ -332,6 +359,38 @@ func (o *DcimPowerPanelsListParams) WriteToRequest(r runtime.ClientRequest, reg } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + if o.Site != nil { // query param site diff --git a/netbox/client/dcim/dcim_power_panels_list_responses.go b/netbox/client/dcim/dcim_power_panels_list_responses.go index eb045cf810426a017a806ec02c991f28eb973389..ee22c056b8e86c4c9bbb07204b3a2efa019fb583 100644 --- a/netbox/client/dcim/dcim_power_panels_list_responses.go +++ b/netbox/client/dcim/dcim_power_panels_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPanelsListReader is a Reader for the DcimPowerPanelsList structure. @@ -42,7 +43,6 @@ type DcimPowerPanelsListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPanelsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerPanelsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimPowerPanelsListOK) Error() string { return fmt.Sprintf("[GET /dcim/power-panels/][%d] dcimPowerPanelsListOK %+v", 200, o.Payload) } +func (o *DcimPowerPanelsListOK) GetPayload() *DcimPowerPanelsListOKBody { + return o.Payload +} + func (o *DcimPowerPanelsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimPowerPanelsListOKBody) diff --git a/netbox/client/dcim/dcim_power_panels_partial_update_parameters.go b/netbox/client/dcim/dcim_power_panels_partial_update_parameters.go index cf0c31954615c47ee590af0875b644cabffd083e..b1174e126f3083c0871b985919b0a5c10ffb5f0c 100644 --- a/netbox/client/dcim/dcim_power_panels_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_power_panels_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerPanelsPartialUpdateParams creates a new DcimPowerPanelsPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_power_panels_partial_update_responses.go b/netbox/client/dcim/dcim_power_panels_partial_update_responses.go index b6017d4a1b0c735acfec46405acdd44c3c234efd..ac94664d2fa68bce4a3459a026b7de7359f597db 100644 --- a/netbox/client/dcim/dcim_power_panels_partial_update_responses.go +++ b/netbox/client/dcim/dcim_power_panels_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPanelsPartialUpdateReader is a Reader for the DcimPowerPanelsPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimPowerPanelsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPanelsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerPanelsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerPanelsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/power-panels/{id}/][%d] dcimPowerPanelsPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimPowerPanelsPartialUpdateOK) GetPayload() *models.PowerPanel { + return o.Payload +} + func (o *DcimPowerPanelsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerPanel) diff --git a/netbox/client/dcim/dcim_power_panels_read_parameters.go b/netbox/client/dcim/dcim_power_panels_read_parameters.go index ec95e830aeb15b7ee8177d474a79e23ae4382f04..d25dfc498fd396ae7c058b16d137a7b39751e538 100644 --- a/netbox/client/dcim/dcim_power_panels_read_parameters.go +++ b/netbox/client/dcim/dcim_power_panels_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_power_panels_read_responses.go b/netbox/client/dcim/dcim_power_panels_read_responses.go index 1b0e8333ac3f0611840eb5fcca6d03272fa48aae..7135a534251c2afc9b9385871b18df3b9ef703ed 100644 --- a/netbox/client/dcim/dcim_power_panels_read_responses.go +++ b/netbox/client/dcim/dcim_power_panels_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPanelsReadReader is a Reader for the DcimPowerPanelsRead structure. @@ -38,7 +39,6 @@ type DcimPowerPanelsReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPanelsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerPanelsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerPanelsReadOK) Error() string { return fmt.Sprintf("[GET /dcim/power-panels/{id}/][%d] dcimPowerPanelsReadOK %+v", 200, o.Payload) } +func (o *DcimPowerPanelsReadOK) GetPayload() *models.PowerPanel { + return o.Payload +} + func (o *DcimPowerPanelsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerPanel) diff --git a/netbox/client/dcim/dcim_power_panels_update_parameters.go b/netbox/client/dcim/dcim_power_panels_update_parameters.go index a86f029d1b3875617604172dfd6ad89aa107a125..fe4f048c333a4ba96aa26efed1559e8324d8ca8e 100644 --- a/netbox/client/dcim/dcim_power_panels_update_parameters.go +++ b/netbox/client/dcim/dcim_power_panels_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerPanelsUpdateParams creates a new DcimPowerPanelsUpdateParams object diff --git a/netbox/client/dcim/dcim_power_panels_update_responses.go b/netbox/client/dcim/dcim_power_panels_update_responses.go index f768599665c56b5a9757a65b55ba1b4c0c9acd19..d3a8e4296ebfadc1c750995f0ee8fc851e2f75c2 100644 --- a/netbox/client/dcim/dcim_power_panels_update_responses.go +++ b/netbox/client/dcim/dcim_power_panels_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPanelsUpdateReader is a Reader for the DcimPowerPanelsUpdate structure. @@ -38,7 +39,6 @@ type DcimPowerPanelsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPanelsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerPanelsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerPanelsUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/power-panels/{id}/][%d] dcimPowerPanelsUpdateOK %+v", 200, o.Payload) } +func (o *DcimPowerPanelsUpdateOK) GetPayload() *models.PowerPanel { + return o.Payload +} + func (o *DcimPowerPanelsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerPanel) diff --git a/netbox/client/dcim/dcim_power_port_templates_create_parameters.go b/netbox/client/dcim/dcim_power_port_templates_create_parameters.go index a4a1822b6893741ade97e1066e5444b785c03ba6..756188152968d091df1a50e2da20802eb6625a62 100644 --- a/netbox/client/dcim/dcim_power_port_templates_create_parameters.go +++ b/netbox/client/dcim/dcim_power_port_templates_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerPortTemplatesCreateParams creates a new DcimPowerPortTemplatesCreateParams object diff --git a/netbox/client/dcim/dcim_power_port_templates_create_responses.go b/netbox/client/dcim/dcim_power_port_templates_create_responses.go index 56944987765fda92ead8e9ea154571888f869017..015a44b99eeba013816022701dcb2269638bf1ad 100644 --- a/netbox/client/dcim/dcim_power_port_templates_create_responses.go +++ b/netbox/client/dcim/dcim_power_port_templates_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPortTemplatesCreateReader is a Reader for the DcimPowerPortTemplatesCreate structure. @@ -38,7 +39,6 @@ type DcimPowerPortTemplatesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPortTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimPowerPortTemplatesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerPortTemplatesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/power-port-templates/][%d] dcimPowerPortTemplatesCreateCreated %+v", 201, o.Payload) } +func (o *DcimPowerPortTemplatesCreateCreated) GetPayload() *models.PowerPortTemplate { + return o.Payload +} + func (o *DcimPowerPortTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerPortTemplate) diff --git a/netbox/client/dcim/dcim_power_port_templates_delete_parameters.go b/netbox/client/dcim/dcim_power_port_templates_delete_parameters.go index bb8758a6e98917857664ecfc45a808a556e0951f..24324ab46c961e73958dc4be375a83804792b00d 100644 --- a/netbox/client/dcim/dcim_power_port_templates_delete_parameters.go +++ b/netbox/client/dcim/dcim_power_port_templates_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_power_port_templates_delete_responses.go b/netbox/client/dcim/dcim_power_port_templates_delete_responses.go index cc3ffdc9f0d3ae347a6a1ef71cea5943033acc96..84811e44cc03938c48cf5a984d0e4c74251e9bc6 100644 --- a/netbox/client/dcim/dcim_power_port_templates_delete_responses.go +++ b/netbox/client/dcim/dcim_power_port_templates_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimPowerPortTemplatesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPortTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimPowerPortTemplatesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_power_port_templates_list_parameters.go b/netbox/client/dcim/dcim_power_port_templates_list_parameters.go index ae74d3679b26ceca2e402420fc62b176884eadcf..94993211fdff7a1f1c28d3f8130dd972bd1d45c3 100644 --- a/netbox/client/dcim/dcim_power_port_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_power_port_templates_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -98,6 +99,8 @@ type DcimPowerPortTemplatesListParams struct { Offset *int64 /*Q*/ Q *string + /*Type*/ + Type *string timeout time.Duration Context context.Context @@ -225,6 +228,17 @@ func (o *DcimPowerPortTemplatesListParams) SetQ(q *string) { o.Q = q } +// WithType adds the typeVar to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) WithType(typeVar *string) *DcimPowerPortTemplatesListParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) SetType(typeVar *string) { + o.Type = typeVar +} + // WriteToRequest writes these params to a swagger request func (o *DcimPowerPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -361,6 +375,22 @@ func (o *DcimPowerPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } + if o.Type != nil { + + // query param type + var qrType string + if o.Type != nil { + qrType = *o.Type + } + qType := qrType + if qType != "" { + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_power_port_templates_list_responses.go b/netbox/client/dcim/dcim_power_port_templates_list_responses.go index 11af23d1ac4cc3797a26dc3ce690cbc7b3e235f4..19934df5cbe1088b7374c90861bb89588693f152 100644 --- a/netbox/client/dcim/dcim_power_port_templates_list_responses.go +++ b/netbox/client/dcim/dcim_power_port_templates_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPortTemplatesListReader is a Reader for the DcimPowerPortTemplatesList structure. @@ -42,7 +43,6 @@ type DcimPowerPortTemplatesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPortTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerPortTemplatesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimPowerPortTemplatesListOK) Error() string { return fmt.Sprintf("[GET /dcim/power-port-templates/][%d] dcimPowerPortTemplatesListOK %+v", 200, o.Payload) } +func (o *DcimPowerPortTemplatesListOK) GetPayload() *DcimPowerPortTemplatesListOKBody { + return o.Payload +} + func (o *DcimPowerPortTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimPowerPortTemplatesListOKBody) diff --git a/netbox/client/dcim/dcim_power_port_templates_partial_update_parameters.go b/netbox/client/dcim/dcim_power_port_templates_partial_update_parameters.go index 0deefee87fadad8d80bba4eae35399716eea291c..38c7dd9adea47a144903f664b4b85a14da0a7b3c 100644 --- a/netbox/client/dcim/dcim_power_port_templates_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_power_port_templates_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerPortTemplatesPartialUpdateParams creates a new DcimPowerPortTemplatesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_power_port_templates_partial_update_responses.go b/netbox/client/dcim/dcim_power_port_templates_partial_update_responses.go index e5c880782bc79ee90af91824dc8aad29ff988ca5..2a6c3071effa8b41baea4155ee77f4d742971cb8 100644 --- a/netbox/client/dcim/dcim_power_port_templates_partial_update_responses.go +++ b/netbox/client/dcim/dcim_power_port_templates_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPortTemplatesPartialUpdateReader is a Reader for the DcimPowerPortTemplatesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimPowerPortTemplatesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPortTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerPortTemplatesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerPortTemplatesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/power-port-templates/{id}/][%d] dcimPowerPortTemplatesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimPowerPortTemplatesPartialUpdateOK) GetPayload() *models.PowerPortTemplate { + return o.Payload +} + func (o *DcimPowerPortTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerPortTemplate) diff --git a/netbox/client/dcim/dcim_power_port_templates_read_parameters.go b/netbox/client/dcim/dcim_power_port_templates_read_parameters.go index 3ffbc5c14902a115f35080f9d9a9105dd7d8a18f..1eaca0f9f7ac62b1d52b8b68f406a2f1f9cb70e6 100644 --- a/netbox/client/dcim/dcim_power_port_templates_read_parameters.go +++ b/netbox/client/dcim/dcim_power_port_templates_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_power_port_templates_read_responses.go b/netbox/client/dcim/dcim_power_port_templates_read_responses.go index 90cd3defaa865353bdb468ce8e59f3757e70bbed..0a16b9f996e339cd19dc91f504ce17e8d5cd3605 100644 --- a/netbox/client/dcim/dcim_power_port_templates_read_responses.go +++ b/netbox/client/dcim/dcim_power_port_templates_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPortTemplatesReadReader is a Reader for the DcimPowerPortTemplatesRead structure. @@ -38,7 +39,6 @@ type DcimPowerPortTemplatesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPortTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerPortTemplatesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerPortTemplatesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/power-port-templates/{id}/][%d] dcimPowerPortTemplatesReadOK %+v", 200, o.Payload) } +func (o *DcimPowerPortTemplatesReadOK) GetPayload() *models.PowerPortTemplate { + return o.Payload +} + func (o *DcimPowerPortTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerPortTemplate) diff --git a/netbox/client/dcim/dcim_power_port_templates_update_parameters.go b/netbox/client/dcim/dcim_power_port_templates_update_parameters.go index 07fcc986f7a62c71bc5c05a39fe62e2e1b75a340..f66feaf7a5c825e2ff6e843f6981cda2a8342d9d 100644 --- a/netbox/client/dcim/dcim_power_port_templates_update_parameters.go +++ b/netbox/client/dcim/dcim_power_port_templates_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerPortTemplatesUpdateParams creates a new DcimPowerPortTemplatesUpdateParams object diff --git a/netbox/client/dcim/dcim_power_port_templates_update_responses.go b/netbox/client/dcim/dcim_power_port_templates_update_responses.go index 4563bacda22fd1620d70eb162b09a10e204fd2cf..f7c606e899ae358d7456da4ee976f5241696a35d 100644 --- a/netbox/client/dcim/dcim_power_port_templates_update_responses.go +++ b/netbox/client/dcim/dcim_power_port_templates_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPortTemplatesUpdateReader is a Reader for the DcimPowerPortTemplatesUpdate structure. @@ -38,7 +39,6 @@ type DcimPowerPortTemplatesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPortTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerPortTemplatesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerPortTemplatesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/power-port-templates/{id}/][%d] dcimPowerPortTemplatesUpdateOK %+v", 200, o.Payload) } +func (o *DcimPowerPortTemplatesUpdateOK) GetPayload() *models.PowerPortTemplate { + return o.Payload +} + func (o *DcimPowerPortTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerPortTemplate) diff --git a/netbox/client/dcim/dcim_power_ports_create_parameters.go b/netbox/client/dcim/dcim_power_ports_create_parameters.go index bcc3f9b003d2ca6f70315a510c9f21b4eec05f73..5486670ec9181a442e1d048ac833bdfb8419edfd 100644 --- a/netbox/client/dcim/dcim_power_ports_create_parameters.go +++ b/netbox/client/dcim/dcim_power_ports_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerPortsCreateParams creates a new DcimPowerPortsCreateParams object diff --git a/netbox/client/dcim/dcim_power_ports_create_responses.go b/netbox/client/dcim/dcim_power_ports_create_responses.go index c4d8a31bb99b7f95e3770999c424eade55a58ad3..e82fa56e6acc3384dfbc4531a5c3b32b5025a711 100644 --- a/netbox/client/dcim/dcim_power_ports_create_responses.go +++ b/netbox/client/dcim/dcim_power_ports_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPortsCreateReader is a Reader for the DcimPowerPortsCreate structure. @@ -38,7 +39,6 @@ type DcimPowerPortsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPortsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimPowerPortsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerPortsCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/power-ports/][%d] dcimPowerPortsCreateCreated %+v", 201, o.Payload) } +func (o *DcimPowerPortsCreateCreated) GetPayload() *models.PowerPort { + return o.Payload +} + func (o *DcimPowerPortsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerPort) diff --git a/netbox/client/dcim/dcim_power_ports_delete_parameters.go b/netbox/client/dcim/dcim_power_ports_delete_parameters.go index ceae98e25beebaf3c5691d2646ebd1f280d907b2..e3d82dedfd164b2c9c3375ed2a89f6a653c49504 100644 --- a/netbox/client/dcim/dcim_power_ports_delete_parameters.go +++ b/netbox/client/dcim/dcim_power_ports_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_power_ports_delete_responses.go b/netbox/client/dcim/dcim_power_ports_delete_responses.go index 483f11a210bdef01c26e8ae1a08df043fdd50d9a..9efbafb20bd20a0adf52041599f4d89c482b8057 100644 --- a/netbox/client/dcim/dcim_power_ports_delete_responses.go +++ b/netbox/client/dcim/dcim_power_ports_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimPowerPortsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPortsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimPowerPortsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_power_ports_list_parameters.go b/netbox/client/dcim/dcim_power_ports_list_parameters.go index 9cfa519938a7abd214ba8582968f941d226b599d..331a7b06b713c2cfbad2c705a8379b8a548810a9 100644 --- a/netbox/client/dcim/dcim_power_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_power_ports_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -106,8 +107,18 @@ type DcimPowerPortsListParams struct { Offset *int64 /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string + /*Site*/ + Site *string + /*SiteID*/ + SiteID *string /*Tag*/ Tag *string + /*Type*/ + Type *string timeout time.Duration Context context.Context @@ -279,6 +290,50 @@ func (o *DcimPowerPortsListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithRegion(region *string) *DcimPowerPortsListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithRegionID(regionID *string) *DcimPowerPortsListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + +// WithSite adds the site to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithSite(site *string) *DcimPowerPortsListParams { + o.SetSite(site) + return o +} + +// SetSite adds the site to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetSite(site *string) { + o.Site = site +} + +// WithSiteID adds the siteID to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithSiteID(siteID *string) *DcimPowerPortsListParams { + o.SetSiteID(siteID) + return o +} + +// SetSiteID adds the siteId to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetSiteID(siteID *string) { + o.SiteID = siteID +} + // WithTag adds the tag to the dcim power ports list params func (o *DcimPowerPortsListParams) WithTag(tag *string) *DcimPowerPortsListParams { o.SetTag(tag) @@ -290,6 +345,17 @@ func (o *DcimPowerPortsListParams) SetTag(tag *string) { o.Tag = tag } +// WithType adds the typeVar to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithType(typeVar *string) *DcimPowerPortsListParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetType(typeVar *string) { + o.Type = typeVar +} + // WriteToRequest writes these params to a swagger request func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -490,6 +556,70 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + + if o.Site != nil { + + // query param site + var qrSite string + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + + } + if o.Tag != nil { // query param tag @@ -506,6 +636,22 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } + if o.Type != nil { + + // query param type + var qrType string + if o.Type != nil { + qrType = *o.Type + } + qType := qrType + if qType != "" { + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_power_ports_list_responses.go b/netbox/client/dcim/dcim_power_ports_list_responses.go index 2192792478dc22e528744d456cb7aadd5f0abfc6..9e74dbaac5502e53142a194ae47a2f564583972d 100644 --- a/netbox/client/dcim/dcim_power_ports_list_responses.go +++ b/netbox/client/dcim/dcim_power_ports_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPortsListReader is a Reader for the DcimPowerPortsList structure. @@ -42,7 +43,6 @@ type DcimPowerPortsListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPortsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerPortsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimPowerPortsListOK) Error() string { return fmt.Sprintf("[GET /dcim/power-ports/][%d] dcimPowerPortsListOK %+v", 200, o.Payload) } +func (o *DcimPowerPortsListOK) GetPayload() *DcimPowerPortsListOKBody { + return o.Payload +} + func (o *DcimPowerPortsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimPowerPortsListOKBody) diff --git a/netbox/client/dcim/dcim_power_ports_partial_update_parameters.go b/netbox/client/dcim/dcim_power_ports_partial_update_parameters.go index fdbba1358bbe115aa49bd6e454facf24ce6c218e..c292777cc985dfcdf5c5669a4695939a867d00cc 100644 --- a/netbox/client/dcim/dcim_power_ports_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_power_ports_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerPortsPartialUpdateParams creates a new DcimPowerPortsPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_power_ports_partial_update_responses.go b/netbox/client/dcim/dcim_power_ports_partial_update_responses.go index 3bfe1439474c2c95999f36e269653933ca1a7510..1a8313f2374fe62d0c64baab4fb319f6df5b2c92 100644 --- a/netbox/client/dcim/dcim_power_ports_partial_update_responses.go +++ b/netbox/client/dcim/dcim_power_ports_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPortsPartialUpdateReader is a Reader for the DcimPowerPortsPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimPowerPortsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPortsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerPortsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerPortsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/power-ports/{id}/][%d] dcimPowerPortsPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimPowerPortsPartialUpdateOK) GetPayload() *models.PowerPort { + return o.Payload +} + func (o *DcimPowerPortsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerPort) diff --git a/netbox/client/dcim/dcim_power_ports_read_parameters.go b/netbox/client/dcim/dcim_power_ports_read_parameters.go index 2f15594d06f41d500cd1e364b692fb33aa97b020..5883a6e9773563385f7c080dac1a614569c2a567 100644 --- a/netbox/client/dcim/dcim_power_ports_read_parameters.go +++ b/netbox/client/dcim/dcim_power_ports_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_power_ports_read_responses.go b/netbox/client/dcim/dcim_power_ports_read_responses.go index 024b780591ea99c5b46d6d40ce736dc1e844b406..a8e34b74b0fd90e8e45a11177f1772502a7cc8f6 100644 --- a/netbox/client/dcim/dcim_power_ports_read_responses.go +++ b/netbox/client/dcim/dcim_power_ports_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPortsReadReader is a Reader for the DcimPowerPortsRead structure. @@ -38,7 +39,6 @@ type DcimPowerPortsReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPortsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerPortsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerPortsReadOK) Error() string { return fmt.Sprintf("[GET /dcim/power-ports/{id}/][%d] dcimPowerPortsReadOK %+v", 200, o.Payload) } +func (o *DcimPowerPortsReadOK) GetPayload() *models.PowerPort { + return o.Payload +} + func (o *DcimPowerPortsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerPort) diff --git a/netbox/client/dcim/dcim_power_ports_trace_parameters.go b/netbox/client/dcim/dcim_power_ports_trace_parameters.go index 2af675a93361cd8bfdd1acc97c6ec1d695dcf543..939c711059bdd68dfc8be248083f528f54d71a7a 100644 --- a/netbox/client/dcim/dcim_power_ports_trace_parameters.go +++ b/netbox/client/dcim/dcim_power_ports_trace_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_power_ports_trace_responses.go b/netbox/client/dcim/dcim_power_ports_trace_responses.go index 30f5eb04917ad3eb34ca1fd29a8b6c12306cb008..3ce4926402944399d57686ef80726675452ffc86 100644 --- a/netbox/client/dcim/dcim_power_ports_trace_responses.go +++ b/netbox/client/dcim/dcim_power_ports_trace_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPortsTraceReader is a Reader for the DcimPowerPortsTrace structure. @@ -38,7 +39,6 @@ type DcimPowerPortsTraceReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPortsTraceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerPortsTraceOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerPortsTraceOK) Error() string { return fmt.Sprintf("[GET /dcim/power-ports/{id}/trace/][%d] dcimPowerPortsTraceOK %+v", 200, o.Payload) } +func (o *DcimPowerPortsTraceOK) GetPayload() *models.PowerPort { + return o.Payload +} + func (o *DcimPowerPortsTraceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerPort) diff --git a/netbox/client/dcim/dcim_power_ports_update_parameters.go b/netbox/client/dcim/dcim_power_ports_update_parameters.go index a040e6e0a730c633651217bbdb4bd15a6ce8462f..9d0c1a2fa043ed179d0f0cb342ca2d0ca965b3d8 100644 --- a/netbox/client/dcim/dcim_power_ports_update_parameters.go +++ b/netbox/client/dcim/dcim_power_ports_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimPowerPortsUpdateParams creates a new DcimPowerPortsUpdateParams object diff --git a/netbox/client/dcim/dcim_power_ports_update_responses.go b/netbox/client/dcim/dcim_power_ports_update_responses.go index e601a794cb3f210cfb9757ff5705e9a20fd1937e..cb561d3975aab4807879557c27c90280226b936d 100644 --- a/netbox/client/dcim/dcim_power_ports_update_responses.go +++ b/netbox/client/dcim/dcim_power_ports_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimPowerPortsUpdateReader is a Reader for the DcimPowerPortsUpdate structure. @@ -38,7 +39,6 @@ type DcimPowerPortsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimPowerPortsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimPowerPortsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimPowerPortsUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/power-ports/{id}/][%d] dcimPowerPortsUpdateOK %+v", 200, o.Payload) } +func (o *DcimPowerPortsUpdateOK) GetPayload() *models.PowerPort { + return o.Payload +} + func (o *DcimPowerPortsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.PowerPort) diff --git a/netbox/client/dcim/dcim_rack_groups_create_parameters.go b/netbox/client/dcim/dcim_rack_groups_create_parameters.go index 0447661a91b01066e772a49875d331aa1ca5f3b8..78a693bf62084c4edf62ebd20005532bca5341c4 100644 --- a/netbox/client/dcim/dcim_rack_groups_create_parameters.go +++ b/netbox/client/dcim/dcim_rack_groups_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRackGroupsCreateParams creates a new DcimRackGroupsCreateParams object diff --git a/netbox/client/dcim/dcim_rack_groups_create_responses.go b/netbox/client/dcim/dcim_rack_groups_create_responses.go index 99545102dc4300edf1dabd79682dd8038f736a2c..7a5f6dc8b650cd4f7c6cfa221bf812874b7af82f 100644 --- a/netbox/client/dcim/dcim_rack_groups_create_responses.go +++ b/netbox/client/dcim/dcim_rack_groups_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackGroupsCreateReader is a Reader for the DcimRackGroupsCreate structure. @@ -38,7 +39,6 @@ type DcimRackGroupsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackGroupsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimRackGroupsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRackGroupsCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/rack-groups/][%d] dcimRackGroupsCreateCreated %+v", 201, o.Payload) } +func (o *DcimRackGroupsCreateCreated) GetPayload() *models.RackGroup { + return o.Payload +} + func (o *DcimRackGroupsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RackGroup) diff --git a/netbox/client/dcim/dcim_rack_groups_delete_parameters.go b/netbox/client/dcim/dcim_rack_groups_delete_parameters.go index 126fe00701e0391d25096b7da35baec5df9b098b..8dac8dccb56ed0cd2896af3c8ec1ab832103f1bf 100644 --- a/netbox/client/dcim/dcim_rack_groups_delete_parameters.go +++ b/netbox/client/dcim/dcim_rack_groups_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_rack_groups_delete_responses.go b/netbox/client/dcim/dcim_rack_groups_delete_responses.go index fb59a5fe30c963cedbb2fdcf0779f81c4773b11a..e777dcf50a829330513f014bd9b1b4547682c2a2 100644 --- a/netbox/client/dcim/dcim_rack_groups_delete_responses.go +++ b/netbox/client/dcim/dcim_rack_groups_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimRackGroupsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackGroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimRackGroupsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_rack_groups_list_parameters.go b/netbox/client/dcim/dcim_rack_groups_list_parameters.go index dbea3aa6da1e67d19039eca1880e890230680629..46346a30653fc9ff57fb10770d0ad95c990d7f6b 100644 --- a/netbox/client/dcim/dcim_rack_groups_list_parameters.go +++ b/netbox/client/dcim/dcim_rack_groups_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -92,6 +93,10 @@ type DcimRackGroupsListParams struct { Offset *int64 /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string /*Site*/ Site *string /*SiteID*/ @@ -192,6 +197,28 @@ func (o *DcimRackGroupsListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the dcim rack groups list params +func (o *DcimRackGroupsListParams) WithRegion(region *string) *DcimRackGroupsListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim rack groups list params +func (o *DcimRackGroupsListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the dcim rack groups list params +func (o *DcimRackGroupsListParams) WithRegionID(regionID *string) *DcimRackGroupsListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim rack groups list params +func (o *DcimRackGroupsListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + // WithSite adds the site to the dcim rack groups list params func (o *DcimRackGroupsListParams) WithSite(site *string) *DcimRackGroupsListParams { o.SetSite(site) @@ -313,6 +340,38 @@ func (o *DcimRackGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + if o.Site != nil { // query param site diff --git a/netbox/client/dcim/dcim_rack_groups_list_responses.go b/netbox/client/dcim/dcim_rack_groups_list_responses.go index 461d791168c2a7dfbf66ff2e312828ec0d1a9781..61c347ecd31e46f36dcb70b0ee5600d47ab55b83 100644 --- a/netbox/client/dcim/dcim_rack_groups_list_responses.go +++ b/netbox/client/dcim/dcim_rack_groups_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackGroupsListReader is a Reader for the DcimRackGroupsList structure. @@ -42,7 +43,6 @@ type DcimRackGroupsListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackGroupsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRackGroupsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimRackGroupsListOK) Error() string { return fmt.Sprintf("[GET /dcim/rack-groups/][%d] dcimRackGroupsListOK %+v", 200, o.Payload) } +func (o *DcimRackGroupsListOK) GetPayload() *DcimRackGroupsListOKBody { + return o.Payload +} + func (o *DcimRackGroupsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimRackGroupsListOKBody) diff --git a/netbox/client/dcim/dcim_rack_groups_partial_update_parameters.go b/netbox/client/dcim/dcim_rack_groups_partial_update_parameters.go index 851261acfc5eb435b89fce66d3221c893b012eec..0f4c4b11099ffcafb2671156490decf7b5d61caf 100644 --- a/netbox/client/dcim/dcim_rack_groups_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_rack_groups_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRackGroupsPartialUpdateParams creates a new DcimRackGroupsPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_rack_groups_partial_update_responses.go b/netbox/client/dcim/dcim_rack_groups_partial_update_responses.go index 7f120d8d2c30fb52fa4c5be11c0ac208e2574b3c..63381ebfc74ffaeb8f0751768c3a1d49b4885675 100644 --- a/netbox/client/dcim/dcim_rack_groups_partial_update_responses.go +++ b/netbox/client/dcim/dcim_rack_groups_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackGroupsPartialUpdateReader is a Reader for the DcimRackGroupsPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimRackGroupsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackGroupsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRackGroupsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRackGroupsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/rack-groups/{id}/][%d] dcimRackGroupsPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimRackGroupsPartialUpdateOK) GetPayload() *models.RackGroup { + return o.Payload +} + func (o *DcimRackGroupsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RackGroup) diff --git a/netbox/client/dcim/dcim_rack_groups_read_parameters.go b/netbox/client/dcim/dcim_rack_groups_read_parameters.go index 8fdab63e5056888915cf57c89dde0f81c1fa28c7..a9b6bdf6c55a81a2c64f62f0c89a5985f2b5fcad 100644 --- a/netbox/client/dcim/dcim_rack_groups_read_parameters.go +++ b/netbox/client/dcim/dcim_rack_groups_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_rack_groups_read_responses.go b/netbox/client/dcim/dcim_rack_groups_read_responses.go index d9469693d4491bff18e6805b2606124fc823a976..8b83b776d52fe80a54c9d2aa747f3c166535b285 100644 --- a/netbox/client/dcim/dcim_rack_groups_read_responses.go +++ b/netbox/client/dcim/dcim_rack_groups_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackGroupsReadReader is a Reader for the DcimRackGroupsRead structure. @@ -38,7 +39,6 @@ type DcimRackGroupsReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackGroupsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRackGroupsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRackGroupsReadOK) Error() string { return fmt.Sprintf("[GET /dcim/rack-groups/{id}/][%d] dcimRackGroupsReadOK %+v", 200, o.Payload) } +func (o *DcimRackGroupsReadOK) GetPayload() *models.RackGroup { + return o.Payload +} + func (o *DcimRackGroupsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RackGroup) diff --git a/netbox/client/dcim/dcim_rack_groups_update_parameters.go b/netbox/client/dcim/dcim_rack_groups_update_parameters.go index c6b05eb9a6160f672175f145bd82286c1f9523ba..35837d44751b3f361b31c9efacf82a6764369ee0 100644 --- a/netbox/client/dcim/dcim_rack_groups_update_parameters.go +++ b/netbox/client/dcim/dcim_rack_groups_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRackGroupsUpdateParams creates a new DcimRackGroupsUpdateParams object diff --git a/netbox/client/dcim/dcim_rack_groups_update_responses.go b/netbox/client/dcim/dcim_rack_groups_update_responses.go index a449b918e8dc4cea6b2a26c9ceaeefbcf4c64562..05aa9201a595a712cabd4b8a9dbb7b92f859683a 100644 --- a/netbox/client/dcim/dcim_rack_groups_update_responses.go +++ b/netbox/client/dcim/dcim_rack_groups_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackGroupsUpdateReader is a Reader for the DcimRackGroupsUpdate structure. @@ -38,7 +39,6 @@ type DcimRackGroupsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackGroupsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRackGroupsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRackGroupsUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/rack-groups/{id}/][%d] dcimRackGroupsUpdateOK %+v", 200, o.Payload) } +func (o *DcimRackGroupsUpdateOK) GetPayload() *models.RackGroup { + return o.Payload +} + func (o *DcimRackGroupsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RackGroup) diff --git a/netbox/client/dcim/dcim_rack_reservations_create_parameters.go b/netbox/client/dcim/dcim_rack_reservations_create_parameters.go index 3c53d811900fac2ba0f954e193d02d6856cff6f8..4995e02e38438d7c8b5ee8ca44f8b18f27718be8 100644 --- a/netbox/client/dcim/dcim_rack_reservations_create_parameters.go +++ b/netbox/client/dcim/dcim_rack_reservations_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRackReservationsCreateParams creates a new DcimRackReservationsCreateParams object diff --git a/netbox/client/dcim/dcim_rack_reservations_create_responses.go b/netbox/client/dcim/dcim_rack_reservations_create_responses.go index f0cbac196ff4574b17861fc0a87c67e05c12aaca..7fd5c59510b4fc1c03c3e28752a97f0d124c80d7 100644 --- a/netbox/client/dcim/dcim_rack_reservations_create_responses.go +++ b/netbox/client/dcim/dcim_rack_reservations_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackReservationsCreateReader is a Reader for the DcimRackReservationsCreate structure. @@ -38,7 +39,6 @@ type DcimRackReservationsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackReservationsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimRackReservationsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRackReservationsCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/rack-reservations/][%d] dcimRackReservationsCreateCreated %+v", 201, o.Payload) } +func (o *DcimRackReservationsCreateCreated) GetPayload() *models.RackReservation { + return o.Payload +} + func (o *DcimRackReservationsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RackReservation) diff --git a/netbox/client/dcim/dcim_rack_reservations_delete_parameters.go b/netbox/client/dcim/dcim_rack_reservations_delete_parameters.go index e02c9b54c2b6e8541be94cf88d785f0d979d9e69..f26630290b8103c3acebff306d7deb74eda6c161 100644 --- a/netbox/client/dcim/dcim_rack_reservations_delete_parameters.go +++ b/netbox/client/dcim/dcim_rack_reservations_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_rack_reservations_delete_responses.go b/netbox/client/dcim/dcim_rack_reservations_delete_responses.go index a6a5eca998f866d438f32349e772b57bd28093b6..2acf2efd62f0bba0600c28471e27e4be2d4780de 100644 --- a/netbox/client/dcim/dcim_rack_reservations_delete_responses.go +++ b/netbox/client/dcim/dcim_rack_reservations_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimRackReservationsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackReservationsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimRackReservationsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_rack_reservations_list_parameters.go b/netbox/client/dcim/dcim_rack_reservations_list_parameters.go index 273f5bf9cde34de27bdcb0eb1b186048071ad532..737374c67e98c3700bce16ed430dd5e4f29a13e7 100644 --- a/netbox/client/dcim/dcim_rack_reservations_list_parameters.go +++ b/netbox/client/dcim/dcim_rack_reservations_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_rack_reservations_list_responses.go b/netbox/client/dcim/dcim_rack_reservations_list_responses.go index 7176c78dbdfec742c343b503cea21aad3348e87d..067fbace6d2d12a420cbceb07382d92334e485a9 100644 --- a/netbox/client/dcim/dcim_rack_reservations_list_responses.go +++ b/netbox/client/dcim/dcim_rack_reservations_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackReservationsListReader is a Reader for the DcimRackReservationsList structure. @@ -42,7 +43,6 @@ type DcimRackReservationsListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackReservationsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRackReservationsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimRackReservationsListOK) Error() string { return fmt.Sprintf("[GET /dcim/rack-reservations/][%d] dcimRackReservationsListOK %+v", 200, o.Payload) } +func (o *DcimRackReservationsListOK) GetPayload() *DcimRackReservationsListOKBody { + return o.Payload +} + func (o *DcimRackReservationsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimRackReservationsListOKBody) diff --git a/netbox/client/dcim/dcim_rack_reservations_partial_update_parameters.go b/netbox/client/dcim/dcim_rack_reservations_partial_update_parameters.go index 97fb0902160c271a16f3be83454defa47576e606..4a9d3f79316f5bd5d8a31c27e8f6d50cad194263 100644 --- a/netbox/client/dcim/dcim_rack_reservations_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_rack_reservations_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRackReservationsPartialUpdateParams creates a new DcimRackReservationsPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_rack_reservations_partial_update_responses.go b/netbox/client/dcim/dcim_rack_reservations_partial_update_responses.go index 7789777fe84c07edcf345dd31da4a5bd949b4605..191d947da9f00400d97742d288af428fb57ee19e 100644 --- a/netbox/client/dcim/dcim_rack_reservations_partial_update_responses.go +++ b/netbox/client/dcim/dcim_rack_reservations_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackReservationsPartialUpdateReader is a Reader for the DcimRackReservationsPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimRackReservationsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackReservationsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRackReservationsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRackReservationsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/rack-reservations/{id}/][%d] dcimRackReservationsPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimRackReservationsPartialUpdateOK) GetPayload() *models.RackReservation { + return o.Payload +} + func (o *DcimRackReservationsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RackReservation) diff --git a/netbox/client/dcim/dcim_rack_reservations_read_parameters.go b/netbox/client/dcim/dcim_rack_reservations_read_parameters.go index 4c6260a7c81a026969ead56142a04dffd1b2b35f..fe484b3fdacba60458106f999d3dd877a2e85d97 100644 --- a/netbox/client/dcim/dcim_rack_reservations_read_parameters.go +++ b/netbox/client/dcim/dcim_rack_reservations_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_rack_reservations_read_responses.go b/netbox/client/dcim/dcim_rack_reservations_read_responses.go index 2fb6d9da537f6a1193107100aba5c32a49cdbb02..dadf095e854f4bddb8194d75530226c39c05c815 100644 --- a/netbox/client/dcim/dcim_rack_reservations_read_responses.go +++ b/netbox/client/dcim/dcim_rack_reservations_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackReservationsReadReader is a Reader for the DcimRackReservationsRead structure. @@ -38,7 +39,6 @@ type DcimRackReservationsReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackReservationsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRackReservationsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRackReservationsReadOK) Error() string { return fmt.Sprintf("[GET /dcim/rack-reservations/{id}/][%d] dcimRackReservationsReadOK %+v", 200, o.Payload) } +func (o *DcimRackReservationsReadOK) GetPayload() *models.RackReservation { + return o.Payload +} + func (o *DcimRackReservationsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RackReservation) diff --git a/netbox/client/dcim/dcim_rack_reservations_update_parameters.go b/netbox/client/dcim/dcim_rack_reservations_update_parameters.go index ea012b1def386e85d83165ca19986dab8c63361f..180b7c17e8f9084798fc905fba4f8868ca4af00f 100644 --- a/netbox/client/dcim/dcim_rack_reservations_update_parameters.go +++ b/netbox/client/dcim/dcim_rack_reservations_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRackReservationsUpdateParams creates a new DcimRackReservationsUpdateParams object diff --git a/netbox/client/dcim/dcim_rack_reservations_update_responses.go b/netbox/client/dcim/dcim_rack_reservations_update_responses.go index 41bacde23f36e56cc396ec047c43e5901afdd4f0..0fa7067a4510b44df9632d7b843ea59ef4fbf5bd 100644 --- a/netbox/client/dcim/dcim_rack_reservations_update_responses.go +++ b/netbox/client/dcim/dcim_rack_reservations_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackReservationsUpdateReader is a Reader for the DcimRackReservationsUpdate structure. @@ -38,7 +39,6 @@ type DcimRackReservationsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackReservationsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRackReservationsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRackReservationsUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/rack-reservations/{id}/][%d] dcimRackReservationsUpdateOK %+v", 200, o.Payload) } +func (o *DcimRackReservationsUpdateOK) GetPayload() *models.RackReservation { + return o.Payload +} + func (o *DcimRackReservationsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RackReservation) diff --git a/netbox/client/dcim/dcim_rack_roles_create_parameters.go b/netbox/client/dcim/dcim_rack_roles_create_parameters.go index 930dff1a6011b43e5923949d491c62bac60cd10b..2feb1b23ea2cb121a519359c175dfe7cb6180c48 100644 --- a/netbox/client/dcim/dcim_rack_roles_create_parameters.go +++ b/netbox/client/dcim/dcim_rack_roles_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRackRolesCreateParams creates a new DcimRackRolesCreateParams object diff --git a/netbox/client/dcim/dcim_rack_roles_create_responses.go b/netbox/client/dcim/dcim_rack_roles_create_responses.go index 3d9dd51c0e2408157130cf8dce96770903257b24..bd921043b8227b305fa9ad21c8f5aea7b1863bbd 100644 --- a/netbox/client/dcim/dcim_rack_roles_create_responses.go +++ b/netbox/client/dcim/dcim_rack_roles_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackRolesCreateReader is a Reader for the DcimRackRolesCreate structure. @@ -38,7 +39,6 @@ type DcimRackRolesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackRolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimRackRolesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRackRolesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/rack-roles/][%d] dcimRackRolesCreateCreated %+v", 201, o.Payload) } +func (o *DcimRackRolesCreateCreated) GetPayload() *models.RackRole { + return o.Payload +} + func (o *DcimRackRolesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RackRole) diff --git a/netbox/client/dcim/dcim_rack_roles_delete_parameters.go b/netbox/client/dcim/dcim_rack_roles_delete_parameters.go index e6e75db538d14a34590971ac0d6aab4ccfe86484..15ca34ae9275200688e547f675f735a16d0511a1 100644 --- a/netbox/client/dcim/dcim_rack_roles_delete_parameters.go +++ b/netbox/client/dcim/dcim_rack_roles_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_rack_roles_delete_responses.go b/netbox/client/dcim/dcim_rack_roles_delete_responses.go index aa0e6c1e29f0cbf32da2ca94ae3701afb7047148..ddae602e2f8cdb8109809cf9638017678e25529a 100644 --- a/netbox/client/dcim/dcim_rack_roles_delete_responses.go +++ b/netbox/client/dcim/dcim_rack_roles_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimRackRolesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackRolesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimRackRolesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_rack_roles_list_parameters.go b/netbox/client/dcim/dcim_rack_roles_list_parameters.go index 43560e0e4ca6515c1d14067fd9a4a09d93e47266..948b44c186ea7b776b8263f8dd8629d3f36c1a02 100644 --- a/netbox/client/dcim/dcim_rack_roles_list_parameters.go +++ b/netbox/client/dcim/dcim_rack_roles_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_rack_roles_list_responses.go b/netbox/client/dcim/dcim_rack_roles_list_responses.go index 4260d139e1eb3e0736c99bdb64d193eb795eb47f..10c82e85f69d1fc0f930aa8cc1ec9dccf0634afe 100644 --- a/netbox/client/dcim/dcim_rack_roles_list_responses.go +++ b/netbox/client/dcim/dcim_rack_roles_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackRolesListReader is a Reader for the DcimRackRolesList structure. @@ -42,7 +43,6 @@ type DcimRackRolesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackRolesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRackRolesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimRackRolesListOK) Error() string { return fmt.Sprintf("[GET /dcim/rack-roles/][%d] dcimRackRolesListOK %+v", 200, o.Payload) } +func (o *DcimRackRolesListOK) GetPayload() *DcimRackRolesListOKBody { + return o.Payload +} + func (o *DcimRackRolesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimRackRolesListOKBody) diff --git a/netbox/client/dcim/dcim_rack_roles_partial_update_parameters.go b/netbox/client/dcim/dcim_rack_roles_partial_update_parameters.go index f4320c7841dbc97b3b149cd3b1ce7f5b2f6d7ea3..15350b194cadc0626eff145fddc74b3a41e09891 100644 --- a/netbox/client/dcim/dcim_rack_roles_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_rack_roles_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRackRolesPartialUpdateParams creates a new DcimRackRolesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_rack_roles_partial_update_responses.go b/netbox/client/dcim/dcim_rack_roles_partial_update_responses.go index 26a2de14624ab118f11f2fa0d0ffa40ad756d143..75353f7e17c1445dd029026930459cb1dbe0fca3 100644 --- a/netbox/client/dcim/dcim_rack_roles_partial_update_responses.go +++ b/netbox/client/dcim/dcim_rack_roles_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackRolesPartialUpdateReader is a Reader for the DcimRackRolesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimRackRolesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackRolesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRackRolesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRackRolesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/rack-roles/{id}/][%d] dcimRackRolesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimRackRolesPartialUpdateOK) GetPayload() *models.RackRole { + return o.Payload +} + func (o *DcimRackRolesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RackRole) diff --git a/netbox/client/dcim/dcim_rack_roles_read_parameters.go b/netbox/client/dcim/dcim_rack_roles_read_parameters.go index 2bf17892e873d35c939767685d951fc20aa03941..f06e11adb7e3c9b2ea49850b2e5990ae6a88e968 100644 --- a/netbox/client/dcim/dcim_rack_roles_read_parameters.go +++ b/netbox/client/dcim/dcim_rack_roles_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_rack_roles_read_responses.go b/netbox/client/dcim/dcim_rack_roles_read_responses.go index d8de985ccf1964845264df0e41f19f4bf8bbc4cc..2b034f97790f22f24e3a2d81e73c008c49acb700 100644 --- a/netbox/client/dcim/dcim_rack_roles_read_responses.go +++ b/netbox/client/dcim/dcim_rack_roles_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackRolesReadReader is a Reader for the DcimRackRolesRead structure. @@ -38,7 +39,6 @@ type DcimRackRolesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackRolesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRackRolesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRackRolesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/rack-roles/{id}/][%d] dcimRackRolesReadOK %+v", 200, o.Payload) } +func (o *DcimRackRolesReadOK) GetPayload() *models.RackRole { + return o.Payload +} + func (o *DcimRackRolesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RackRole) diff --git a/netbox/client/dcim/dcim_rack_roles_update_parameters.go b/netbox/client/dcim/dcim_rack_roles_update_parameters.go index f4ec52b14834faf418f557fd0d74a1ffc4d72a99..9fc3415d7c730c8cb68208a628693a39cc3780b5 100644 --- a/netbox/client/dcim/dcim_rack_roles_update_parameters.go +++ b/netbox/client/dcim/dcim_rack_roles_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRackRolesUpdateParams creates a new DcimRackRolesUpdateParams object diff --git a/netbox/client/dcim/dcim_rack_roles_update_responses.go b/netbox/client/dcim/dcim_rack_roles_update_responses.go index c63037d2d0211b788d0a0831e8c655487674137d..09ca78686de453bc2d1e6261dd523b0a7c11a288 100644 --- a/netbox/client/dcim/dcim_rack_roles_update_responses.go +++ b/netbox/client/dcim/dcim_rack_roles_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRackRolesUpdateReader is a Reader for the DcimRackRolesUpdate structure. @@ -38,7 +39,6 @@ type DcimRackRolesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRackRolesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRackRolesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRackRolesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/rack-roles/{id}/][%d] dcimRackRolesUpdateOK %+v", 200, o.Payload) } +func (o *DcimRackRolesUpdateOK) GetPayload() *models.RackRole { + return o.Payload +} + func (o *DcimRackRolesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RackRole) diff --git a/netbox/client/dcim/dcim_racks_create_parameters.go b/netbox/client/dcim/dcim_racks_create_parameters.go index fb377b71f587d9acd2b27ee2ea9107bb372c1e20..1c20b098370f0413207f13fa9be99446befcac95 100644 --- a/netbox/client/dcim/dcim_racks_create_parameters.go +++ b/netbox/client/dcim/dcim_racks_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRacksCreateParams creates a new DcimRacksCreateParams object diff --git a/netbox/client/dcim/dcim_racks_create_responses.go b/netbox/client/dcim/dcim_racks_create_responses.go index 256d3e9452510b9c06ca974fc5be3ff0df8e7836..bfd027a644cd3e502ea1bc58fdaed0e0034bea95 100644 --- a/netbox/client/dcim/dcim_racks_create_responses.go +++ b/netbox/client/dcim/dcim_racks_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRacksCreateReader is a Reader for the DcimRacksCreate structure. @@ -38,7 +39,6 @@ type DcimRacksCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRacksCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimRacksCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRacksCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/racks/][%d] dcimRacksCreateCreated %+v", 201, o.Payload) } +func (o *DcimRacksCreateCreated) GetPayload() *models.Rack { + return o.Payload +} + func (o *DcimRacksCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Rack) diff --git a/netbox/client/dcim/dcim_racks_delete_parameters.go b/netbox/client/dcim/dcim_racks_delete_parameters.go index c6bf25a1a16e93ea9bbd285b42291f611cb2eef1..01b7df2c5268efebda6605fba04a1bc4318f801e 100644 --- a/netbox/client/dcim/dcim_racks_delete_parameters.go +++ b/netbox/client/dcim/dcim_racks_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_racks_delete_responses.go b/netbox/client/dcim/dcim_racks_delete_responses.go index 29e1d80e6911030468a6a4c3daada650bd33e45e..15e942f270cd79a5b29c0908fdf8c18c508ff82a 100644 --- a/netbox/client/dcim/dcim_racks_delete_responses.go +++ b/netbox/client/dcim/dcim_racks_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimRacksDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRacksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimRacksDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_racks_elevation_parameters.go b/netbox/client/dcim/dcim_racks_elevation_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..4d4393c83db593a9963d91da02503e0506d9b999 --- /dev/null +++ b/netbox/client/dcim/dcim_racks_elevation_parameters.go @@ -0,0 +1,370 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2018 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewDcimRacksElevationParams creates a new DcimRacksElevationParams object +// with the default values initialized. +func NewDcimRacksElevationParams() *DcimRacksElevationParams { + var ( + expandDevicesDefault = bool(true) + faceDefault = string("front") + renderDefault = string("json") + unitHeightDefault = int64(20) + unitWidthDefault = int64(230) + ) + return &DcimRacksElevationParams{ + ExpandDevices: &expandDevicesDefault, + Face: &faceDefault, + Render: &renderDefault, + UnitHeight: &unitHeightDefault, + UnitWidth: &unitWidthDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewDcimRacksElevationParamsWithTimeout creates a new DcimRacksElevationParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDcimRacksElevationParamsWithTimeout(timeout time.Duration) *DcimRacksElevationParams { + var ( + expandDevicesDefault = bool(true) + faceDefault = string("front") + renderDefault = string("json") + unitHeightDefault = int64(20) + unitWidthDefault = int64(230) + ) + return &DcimRacksElevationParams{ + ExpandDevices: &expandDevicesDefault, + Face: &faceDefault, + Render: &renderDefault, + UnitHeight: &unitHeightDefault, + UnitWidth: &unitWidthDefault, + + timeout: timeout, + } +} + +// NewDcimRacksElevationParamsWithContext creates a new DcimRacksElevationParams object +// with the default values initialized, and the ability to set a context for a request +func NewDcimRacksElevationParamsWithContext(ctx context.Context) *DcimRacksElevationParams { + var ( + expandDevicesDefault = bool(true) + faceDefault = string("front") + renderDefault = string("json") + unitHeightDefault = int64(20) + unitWidthDefault = int64(230) + ) + return &DcimRacksElevationParams{ + ExpandDevices: &expandDevicesDefault, + Face: &faceDefault, + Render: &renderDefault, + UnitHeight: &unitHeightDefault, + UnitWidth: &unitWidthDefault, + + Context: ctx, + } +} + +// NewDcimRacksElevationParamsWithHTTPClient creates a new DcimRacksElevationParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDcimRacksElevationParamsWithHTTPClient(client *http.Client) *DcimRacksElevationParams { + var ( + expandDevicesDefault = bool(true) + faceDefault = string("front") + renderDefault = string("json") + unitHeightDefault = int64(20) + unitWidthDefault = int64(230) + ) + return &DcimRacksElevationParams{ + ExpandDevices: &expandDevicesDefault, + Face: &faceDefault, + Render: &renderDefault, + UnitHeight: &unitHeightDefault, + UnitWidth: &unitWidthDefault, + HTTPClient: client, + } +} + +/*DcimRacksElevationParams contains all the parameters to send to the API endpoint +for the dcim racks elevation operation typically these are written to a http.Request +*/ +type DcimRacksElevationParams struct { + + /*Exclude*/ + Exclude *int64 + /*ExpandDevices*/ + ExpandDevices *bool + /*Face*/ + Face *string + /*ID + A unique integer value identifying this rack. + + */ + ID int64 + /*Render*/ + Render *string + /*UnitHeight*/ + UnitHeight *int64 + /*UnitWidth*/ + UnitWidth *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the dcim racks elevation params +func (o *DcimRacksElevationParams) WithTimeout(timeout time.Duration) *DcimRacksElevationParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim racks elevation params +func (o *DcimRacksElevationParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim racks elevation params +func (o *DcimRacksElevationParams) WithContext(ctx context.Context) *DcimRacksElevationParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim racks elevation params +func (o *DcimRacksElevationParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim racks elevation params +func (o *DcimRacksElevationParams) WithHTTPClient(client *http.Client) *DcimRacksElevationParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim racks elevation params +func (o *DcimRacksElevationParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithExclude adds the exclude to the dcim racks elevation params +func (o *DcimRacksElevationParams) WithExclude(exclude *int64) *DcimRacksElevationParams { + o.SetExclude(exclude) + return o +} + +// SetExclude adds the exclude to the dcim racks elevation params +func (o *DcimRacksElevationParams) SetExclude(exclude *int64) { + o.Exclude = exclude +} + +// WithExpandDevices adds the expandDevices to the dcim racks elevation params +func (o *DcimRacksElevationParams) WithExpandDevices(expandDevices *bool) *DcimRacksElevationParams { + o.SetExpandDevices(expandDevices) + return o +} + +// SetExpandDevices adds the expandDevices to the dcim racks elevation params +func (o *DcimRacksElevationParams) SetExpandDevices(expandDevices *bool) { + o.ExpandDevices = expandDevices +} + +// WithFace adds the face to the dcim racks elevation params +func (o *DcimRacksElevationParams) WithFace(face *string) *DcimRacksElevationParams { + o.SetFace(face) + return o +} + +// SetFace adds the face to the dcim racks elevation params +func (o *DcimRacksElevationParams) SetFace(face *string) { + o.Face = face +} + +// WithID adds the id to the dcim racks elevation params +func (o *DcimRacksElevationParams) WithID(id int64) *DcimRacksElevationParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim racks elevation params +func (o *DcimRacksElevationParams) SetID(id int64) { + o.ID = id +} + +// WithRender adds the render to the dcim racks elevation params +func (o *DcimRacksElevationParams) WithRender(render *string) *DcimRacksElevationParams { + o.SetRender(render) + return o +} + +// SetRender adds the render to the dcim racks elevation params +func (o *DcimRacksElevationParams) SetRender(render *string) { + o.Render = render +} + +// WithUnitHeight adds the unitHeight to the dcim racks elevation params +func (o *DcimRacksElevationParams) WithUnitHeight(unitHeight *int64) *DcimRacksElevationParams { + o.SetUnitHeight(unitHeight) + return o +} + +// SetUnitHeight adds the unitHeight to the dcim racks elevation params +func (o *DcimRacksElevationParams) SetUnitHeight(unitHeight *int64) { + o.UnitHeight = unitHeight +} + +// WithUnitWidth adds the unitWidth to the dcim racks elevation params +func (o *DcimRacksElevationParams) WithUnitWidth(unitWidth *int64) *DcimRacksElevationParams { + o.SetUnitWidth(unitWidth) + return o +} + +// SetUnitWidth adds the unitWidth to the dcim racks elevation params +func (o *DcimRacksElevationParams) SetUnitWidth(unitWidth *int64) { + o.UnitWidth = unitWidth +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimRacksElevationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Exclude != nil { + + // query param exclude + var qrExclude int64 + if o.Exclude != nil { + qrExclude = *o.Exclude + } + qExclude := swag.FormatInt64(qrExclude) + if qExclude != "" { + if err := r.SetQueryParam("exclude", qExclude); err != nil { + return err + } + } + + } + + if o.ExpandDevices != nil { + + // query param expand_devices + var qrExpandDevices bool + if o.ExpandDevices != nil { + qrExpandDevices = *o.ExpandDevices + } + qExpandDevices := swag.FormatBool(qrExpandDevices) + if qExpandDevices != "" { + if err := r.SetQueryParam("expand_devices", qExpandDevices); err != nil { + return err + } + } + + } + + if o.Face != nil { + + // query param face + var qrFace string + if o.Face != nil { + qrFace = *o.Face + } + qFace := qrFace + if qFace != "" { + if err := r.SetQueryParam("face", qFace); err != nil { + return err + } + } + + } + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if o.Render != nil { + + // query param render + var qrRender string + if o.Render != nil { + qrRender = *o.Render + } + qRender := qrRender + if qRender != "" { + if err := r.SetQueryParam("render", qRender); err != nil { + return err + } + } + + } + + if o.UnitHeight != nil { + + // query param unit_height + var qrUnitHeight int64 + if o.UnitHeight != nil { + qrUnitHeight = *o.UnitHeight + } + qUnitHeight := swag.FormatInt64(qrUnitHeight) + if qUnitHeight != "" { + if err := r.SetQueryParam("unit_height", qUnitHeight); err != nil { + return err + } + } + + } + + if o.UnitWidth != nil { + + // query param unit_width + var qrUnitWidth int64 + if o.UnitWidth != nil { + qrUnitWidth = *o.UnitWidth + } + qUnitWidth := swag.FormatInt64(qrUnitWidth) + if qUnitWidth != "" { + if err := r.SetQueryParam("unit_width", qUnitWidth); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_racks_elevation_responses.go b/netbox/client/dcim/dcim_racks_elevation_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..f77461a77e9547285187590e9bef7966d55f3612 --- /dev/null +++ b/netbox/client/dcim/dcim_racks_elevation_responses.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2018 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimRacksElevationReader is a Reader for the DcimRacksElevation structure. +type DcimRacksElevationReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimRacksElevationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimRacksElevationOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDcimRacksElevationOK creates a DcimRacksElevationOK with default headers values +func NewDcimRacksElevationOK() *DcimRacksElevationOK { + return &DcimRacksElevationOK{} +} + +/*DcimRacksElevationOK handles this case with default header values. + +DcimRacksElevationOK dcim racks elevation o k +*/ +type DcimRacksElevationOK struct { + Payload []*models.RackUnit +} + +func (o *DcimRacksElevationOK) Error() string { + return fmt.Sprintf("[GET /dcim/racks/{id}/elevation/][%d] dcimRacksElevationOK %+v", 200, o.Payload) +} + +func (o *DcimRacksElevationOK) GetPayload() []*models.RackUnit { + return o.Payload +} + +func (o *DcimRacksElevationOK) 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 { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_racks_list_parameters.go b/netbox/client/dcim/dcim_racks_list_parameters.go index 106be965c943cb9b128363611dc833474e35a50d..3776b62b20a553cdb85a1101c161158c2624c2ce 100644 --- a/netbox/client/dcim/dcim_racks_list_parameters.go +++ b/netbox/client/dcim/dcim_racks_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -78,6 +79,12 @@ type DcimRacksListParams struct { /*AssetTag*/ AssetTag *string + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*DescUnits*/ DescUnits *string /*FacilityID*/ @@ -93,6 +100,12 @@ type DcimRacksListParams struct { */ IDIn *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. @@ -113,6 +126,10 @@ type DcimRacksListParams struct { OuterWidth *string /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string /*Role*/ Role *string /*RoleID*/ @@ -191,6 +208,39 @@ func (o *DcimRacksListParams) SetAssetTag(assetTag *string) { o.AssetTag = assetTag } +// WithCreated adds the created to the dcim racks list params +func (o *DcimRacksListParams) WithCreated(created *string) *DcimRacksListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the dcim racks list params +func (o *DcimRacksListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the dcim racks list params +func (o *DcimRacksListParams) WithCreatedGte(createdGte *string) *DcimRacksListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the dcim racks list params +func (o *DcimRacksListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the dcim racks list params +func (o *DcimRacksListParams) WithCreatedLte(createdLte *string) *DcimRacksListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the dcim racks list params +func (o *DcimRacksListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + // WithDescUnits adds the descUnits to the dcim racks list params func (o *DcimRacksListParams) WithDescUnits(descUnits *string) *DcimRacksListParams { o.SetDescUnits(descUnits) @@ -257,6 +307,39 @@ func (o *DcimRacksListParams) SetIDIn(iDIn *string) { o.IDIn = iDIn } +// WithLastUpdated adds the lastUpdated to the dcim racks list params +func (o *DcimRacksListParams) WithLastUpdated(lastUpdated *string) *DcimRacksListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the dcim racks list params +func (o *DcimRacksListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the dcim racks list params +func (o *DcimRacksListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimRacksListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the dcim racks list params +func (o *DcimRacksListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the dcim racks list params +func (o *DcimRacksListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimRacksListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the dcim racks list params +func (o *DcimRacksListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the dcim racks list params func (o *DcimRacksListParams) WithLimit(limit *int64) *DcimRacksListParams { o.SetLimit(limit) @@ -334,6 +417,28 @@ func (o *DcimRacksListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the dcim racks list params +func (o *DcimRacksListParams) WithRegion(region *string) *DcimRacksListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim racks list params +func (o *DcimRacksListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the dcim racks list params +func (o *DcimRacksListParams) WithRegionID(regionID *string) *DcimRacksListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim racks list params +func (o *DcimRacksListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + // WithRole adds the role to the dcim racks list params func (o *DcimRacksListParams) WithRole(role *string) *DcimRacksListParams { o.SetRole(role) @@ -512,6 +617,54 @@ func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } + 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.DescUnits != nil { // query param desc_units @@ -608,6 +761,54 @@ func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } + 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 @@ -720,6 +921,38 @@ func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + if o.Role != nil { // query param role diff --git a/netbox/client/dcim/dcim_racks_list_responses.go b/netbox/client/dcim/dcim_racks_list_responses.go index 9d43509cad4a99fb1dbcf4d8cf41afa7e8372390..f1228c05bb94228cb5e806bf8bca5ec8694c8a18 100644 --- a/netbox/client/dcim/dcim_racks_list_responses.go +++ b/netbox/client/dcim/dcim_racks_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRacksListReader is a Reader for the DcimRacksList structure. @@ -42,7 +43,6 @@ type DcimRacksListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRacksListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRacksListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimRacksListOK) Error() string { return fmt.Sprintf("[GET /dcim/racks/][%d] dcimRacksListOK %+v", 200, o.Payload) } +func (o *DcimRacksListOK) GetPayload() *DcimRacksListOKBody { + return o.Payload +} + func (o *DcimRacksListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimRacksListOKBody) diff --git a/netbox/client/dcim/dcim_racks_partial_update_parameters.go b/netbox/client/dcim/dcim_racks_partial_update_parameters.go index d92a00ed5b1d2e5ba31389a0d616987d7cf681d1..f7de760aa38f88bbd3549efbbccd5ab9530cd17f 100644 --- a/netbox/client/dcim/dcim_racks_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_racks_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRacksPartialUpdateParams creates a new DcimRacksPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_racks_partial_update_responses.go b/netbox/client/dcim/dcim_racks_partial_update_responses.go index a9a946d985a622a9f9604a1bd67f21951cf43f38..dd8f11b188ad15aed0007a1b43bf51768dfa2ee3 100644 --- a/netbox/client/dcim/dcim_racks_partial_update_responses.go +++ b/netbox/client/dcim/dcim_racks_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRacksPartialUpdateReader is a Reader for the DcimRacksPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimRacksPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRacksPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRacksPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRacksPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/racks/{id}/][%d] dcimRacksPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimRacksPartialUpdateOK) GetPayload() *models.Rack { + return o.Payload +} + func (o *DcimRacksPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Rack) diff --git a/netbox/client/dcim/dcim_racks_read_parameters.go b/netbox/client/dcim/dcim_racks_read_parameters.go index 097532537aa36cd4ba8c0cfed5f02dc1f77c5fee..2b642d151a0a70737ce6df35987d52aa75ee3bf9 100644 --- a/netbox/client/dcim/dcim_racks_read_parameters.go +++ b/netbox/client/dcim/dcim_racks_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_racks_read_responses.go b/netbox/client/dcim/dcim_racks_read_responses.go index b264a30d81bcd33e0f84ea621674fae6390c9eb2..3c037f4f4b7170e3608c4f98bd80b8f33222b905 100644 --- a/netbox/client/dcim/dcim_racks_read_responses.go +++ b/netbox/client/dcim/dcim_racks_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRacksReadReader is a Reader for the DcimRacksRead structure. @@ -38,7 +39,6 @@ type DcimRacksReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRacksReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRacksReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRacksReadOK) Error() string { return fmt.Sprintf("[GET /dcim/racks/{id}/][%d] dcimRacksReadOK %+v", 200, o.Payload) } +func (o *DcimRacksReadOK) GetPayload() *models.Rack { + return o.Payload +} + func (o *DcimRacksReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Rack) diff --git a/netbox/client/dcim/dcim_racks_units_parameters.go b/netbox/client/dcim/dcim_racks_units_parameters.go index 0daa12d0e53a2c6fe0e9fe6e29c44dcd5bd9f9d5..b61fc79dd9544a8fcc715027d5e5f219fb7815e2 100644 --- a/netbox/client/dcim/dcim_racks_units_parameters.go +++ b/netbox/client/dcim/dcim_racks_units_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_racks_units_responses.go b/netbox/client/dcim/dcim_racks_units_responses.go index 393a6a83545fc7fe9f201d5232f58df6ce0102e4..82f5cf3113e3a0a985b7a32326cc074b755f66d6 100644 --- a/netbox/client/dcim/dcim_racks_units_responses.go +++ b/netbox/client/dcim/dcim_racks_units_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRacksUnitsReader is a Reader for the DcimRacksUnits structure. @@ -38,7 +39,6 @@ type DcimRacksUnitsReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRacksUnitsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRacksUnitsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRacksUnitsOK) Error() string { return fmt.Sprintf("[GET /dcim/racks/{id}/units/][%d] dcimRacksUnitsOK %+v", 200, o.Payload) } +func (o *DcimRacksUnitsOK) GetPayload() *models.Rack { + return o.Payload +} + func (o *DcimRacksUnitsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Rack) diff --git a/netbox/client/dcim/dcim_racks_update_parameters.go b/netbox/client/dcim/dcim_racks_update_parameters.go index c710468bb2a819a933a9d45ab37352b1cdd56c92..c4b4d52440beb2d9e1582cb35bbaf8c573d003b2 100644 --- a/netbox/client/dcim/dcim_racks_update_parameters.go +++ b/netbox/client/dcim/dcim_racks_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRacksUpdateParams creates a new DcimRacksUpdateParams object diff --git a/netbox/client/dcim/dcim_racks_update_responses.go b/netbox/client/dcim/dcim_racks_update_responses.go index b8b7ea68a7fe8d9eb22b42562ffa80abe113bc5d..da56ecb0e0c8d6cb6903ead74c3d240cfbd4b82f 100644 --- a/netbox/client/dcim/dcim_racks_update_responses.go +++ b/netbox/client/dcim/dcim_racks_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRacksUpdateReader is a Reader for the DcimRacksUpdate structure. @@ -38,7 +39,6 @@ type DcimRacksUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRacksUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRacksUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRacksUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/racks/{id}/][%d] dcimRacksUpdateOK %+v", 200, o.Payload) } +func (o *DcimRacksUpdateOK) GetPayload() *models.Rack { + return o.Payload +} + func (o *DcimRacksUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Rack) diff --git a/netbox/client/dcim/dcim_rear_port_templates_create_parameters.go b/netbox/client/dcim/dcim_rear_port_templates_create_parameters.go index e0c68b517c35696bc794d2ea7d0a304e26dc141e..4f39dff2794cf4e20598ec1ec260b77bd312f776 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_create_parameters.go +++ b/netbox/client/dcim/dcim_rear_port_templates_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRearPortTemplatesCreateParams creates a new DcimRearPortTemplatesCreateParams object diff --git a/netbox/client/dcim/dcim_rear_port_templates_create_responses.go b/netbox/client/dcim/dcim_rear_port_templates_create_responses.go index 3f663d84c0cab6f547948130c30e7d1b884a47b9..d759cbb44088a1117a1142a9314367d849375831 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_create_responses.go +++ b/netbox/client/dcim/dcim_rear_port_templates_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRearPortTemplatesCreateReader is a Reader for the DcimRearPortTemplatesCreate structure. @@ -38,7 +39,6 @@ type DcimRearPortTemplatesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRearPortTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimRearPortTemplatesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRearPortTemplatesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/rear-port-templates/][%d] dcimRearPortTemplatesCreateCreated %+v", 201, o.Payload) } +func (o *DcimRearPortTemplatesCreateCreated) GetPayload() *models.RearPortTemplate { + return o.Payload +} + func (o *DcimRearPortTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RearPortTemplate) diff --git a/netbox/client/dcim/dcim_rear_port_templates_delete_parameters.go b/netbox/client/dcim/dcim_rear_port_templates_delete_parameters.go index 31932fa488fe7c3b55422f8e2076cf71e8cef954..c0f6fa7437fac5c8e8686418f3993b6ed48fdcfa 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_delete_parameters.go +++ b/netbox/client/dcim/dcim_rear_port_templates_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_rear_port_templates_delete_responses.go b/netbox/client/dcim/dcim_rear_port_templates_delete_responses.go index 77f9cad8c488749a3cf76b8d3d915363692ba086..690f61ffee7b04d997725a9b37d7a4e55964b955 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_delete_responses.go +++ b/netbox/client/dcim/dcim_rear_port_templates_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimRearPortTemplatesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRearPortTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimRearPortTemplatesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { 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 de6d0c81b4f34e0167e5395159a63fe51ce8ffca..e884661662e194f90c0f0ffbfbdc8fa8a0fa1e0b 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_rear_port_templates_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_rear_port_templates_list_responses.go b/netbox/client/dcim/dcim_rear_port_templates_list_responses.go index 06717c0f4ed74776cf47b0d03c6c051f3ba86345..ba2b2b52c6a0b595b2667aa98f29eb6ca559217b 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_list_responses.go +++ b/netbox/client/dcim/dcim_rear_port_templates_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRearPortTemplatesListReader is a Reader for the DcimRearPortTemplatesList structure. @@ -42,7 +43,6 @@ type DcimRearPortTemplatesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRearPortTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRearPortTemplatesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimRearPortTemplatesListOK) Error() string { return fmt.Sprintf("[GET /dcim/rear-port-templates/][%d] dcimRearPortTemplatesListOK %+v", 200, o.Payload) } +func (o *DcimRearPortTemplatesListOK) GetPayload() *DcimRearPortTemplatesListOKBody { + return o.Payload +} + func (o *DcimRearPortTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimRearPortTemplatesListOKBody) diff --git a/netbox/client/dcim/dcim_rear_port_templates_partial_update_parameters.go b/netbox/client/dcim/dcim_rear_port_templates_partial_update_parameters.go index ce68a97f3de49379b7377164f0c9aa961f4a1772..f269f18e37bc35ea1b0b612ff6893fcd84d5f584 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_rear_port_templates_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRearPortTemplatesPartialUpdateParams creates a new DcimRearPortTemplatesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_rear_port_templates_partial_update_responses.go b/netbox/client/dcim/dcim_rear_port_templates_partial_update_responses.go index ff0e0157ef461754cc542886ea2eb0c958b71cdf..6f0d2a71e260c6de72192d06ada488a6bc6162ed 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_partial_update_responses.go +++ b/netbox/client/dcim/dcim_rear_port_templates_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRearPortTemplatesPartialUpdateReader is a Reader for the DcimRearPortTemplatesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimRearPortTemplatesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRearPortTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRearPortTemplatesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRearPortTemplatesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/rear-port-templates/{id}/][%d] dcimRearPortTemplatesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimRearPortTemplatesPartialUpdateOK) GetPayload() *models.RearPortTemplate { + return o.Payload +} + func (o *DcimRearPortTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RearPortTemplate) diff --git a/netbox/client/dcim/dcim_rear_port_templates_read_parameters.go b/netbox/client/dcim/dcim_rear_port_templates_read_parameters.go index d3af0d05944ddef4a99811c912b00bbd4a5f1451..0ce9ccc165fcfd01871a9d4c930989bb11a7fbd2 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_read_parameters.go +++ b/netbox/client/dcim/dcim_rear_port_templates_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_rear_port_templates_read_responses.go b/netbox/client/dcim/dcim_rear_port_templates_read_responses.go index 89ba7f2c15391d9dca5c90c21336f89210bede0f..f61752c2e86481968bb8fe6b624a4bce120924e4 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_read_responses.go +++ b/netbox/client/dcim/dcim_rear_port_templates_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRearPortTemplatesReadReader is a Reader for the DcimRearPortTemplatesRead structure. @@ -38,7 +39,6 @@ type DcimRearPortTemplatesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRearPortTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRearPortTemplatesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRearPortTemplatesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/rear-port-templates/{id}/][%d] dcimRearPortTemplatesReadOK %+v", 200, o.Payload) } +func (o *DcimRearPortTemplatesReadOK) GetPayload() *models.RearPortTemplate { + return o.Payload +} + func (o *DcimRearPortTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RearPortTemplate) diff --git a/netbox/client/dcim/dcim_rear_port_templates_update_parameters.go b/netbox/client/dcim/dcim_rear_port_templates_update_parameters.go index 75e70928cfe49b77eb993ad7c024d320d20255f3..f39732b73ed5c06e77ad0c7ba51790a763fff1c8 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_update_parameters.go +++ b/netbox/client/dcim/dcim_rear_port_templates_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRearPortTemplatesUpdateParams creates a new DcimRearPortTemplatesUpdateParams object diff --git a/netbox/client/dcim/dcim_rear_port_templates_update_responses.go b/netbox/client/dcim/dcim_rear_port_templates_update_responses.go index 8934faa8a9cc8495bcb785c4f38c3f4cfda9bd23..31ec5dc8b9d9e80d1f33a0ba0db423881642f387 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_update_responses.go +++ b/netbox/client/dcim/dcim_rear_port_templates_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRearPortTemplatesUpdateReader is a Reader for the DcimRearPortTemplatesUpdate structure. @@ -38,7 +39,6 @@ type DcimRearPortTemplatesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRearPortTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRearPortTemplatesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRearPortTemplatesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/rear-port-templates/{id}/][%d] dcimRearPortTemplatesUpdateOK %+v", 200, o.Payload) } +func (o *DcimRearPortTemplatesUpdateOK) GetPayload() *models.RearPortTemplate { + return o.Payload +} + func (o *DcimRearPortTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RearPortTemplate) diff --git a/netbox/client/dcim/dcim_rear_ports_create_parameters.go b/netbox/client/dcim/dcim_rear_ports_create_parameters.go index e6e930e69c90b198269793931a87dde80fbabc88..b3e10afc935761bcccc895e5d015d4a34de02212 100644 --- a/netbox/client/dcim/dcim_rear_ports_create_parameters.go +++ b/netbox/client/dcim/dcim_rear_ports_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRearPortsCreateParams creates a new DcimRearPortsCreateParams object diff --git a/netbox/client/dcim/dcim_rear_ports_create_responses.go b/netbox/client/dcim/dcim_rear_ports_create_responses.go index 24bf113d5f971e21462825c7d8645f193d9a07d8..87a0b0741c48f866d39a9ecc88c4cae9db96d90f 100644 --- a/netbox/client/dcim/dcim_rear_ports_create_responses.go +++ b/netbox/client/dcim/dcim_rear_ports_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRearPortsCreateReader is a Reader for the DcimRearPortsCreate structure. @@ -38,7 +39,6 @@ type DcimRearPortsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRearPortsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimRearPortsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRearPortsCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/rear-ports/][%d] dcimRearPortsCreateCreated %+v", 201, o.Payload) } +func (o *DcimRearPortsCreateCreated) GetPayload() *models.RearPort { + return o.Payload +} + func (o *DcimRearPortsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RearPort) diff --git a/netbox/client/dcim/dcim_rear_ports_delete_parameters.go b/netbox/client/dcim/dcim_rear_ports_delete_parameters.go index 51414fe6858c4ad2f8c467784678603acb6b10e6..f8bfe37ddd3a10be1193a65135a4dee76e16a5a4 100644 --- a/netbox/client/dcim/dcim_rear_ports_delete_parameters.go +++ b/netbox/client/dcim/dcim_rear_ports_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_rear_ports_delete_responses.go b/netbox/client/dcim/dcim_rear_ports_delete_responses.go index 7c5c398e7ebb668abf4f8439216f05aae821000a..146c2b9dd68eed99ee4e2687e0c25f5f70df1a40 100644 --- a/netbox/client/dcim/dcim_rear_ports_delete_responses.go +++ b/netbox/client/dcim/dcim_rear_ports_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimRearPortsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRearPortsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimRearPortsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_rear_ports_list_parameters.go b/netbox/client/dcim/dcim_rear_ports_list_parameters.go index 67502dbcf1b2922afc7703a6d34fb28f0b7408a7..cf08ee5d7d6d13587538e62afba890b196138ae9 100644 --- a/netbox/client/dcim/dcim_rear_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_rear_ports_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -102,6 +103,14 @@ type DcimRearPortsListParams struct { Positions *string /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string + /*Site*/ + Site *string + /*SiteID*/ + SiteID *string /*Tag*/ Tag *string /*Type*/ @@ -255,6 +264,50 @@ func (o *DcimRearPortsListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithRegion(region *string) *DcimRearPortsListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithRegionID(regionID *string) *DcimRearPortsListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + +// WithSite adds the site to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithSite(site *string) *DcimRearPortsListParams { + o.SetSite(site) + return o +} + +// SetSite adds the site to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetSite(site *string) { + o.Site = site +} + +// WithSiteID adds the siteID to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithSiteID(siteID *string) *DcimRearPortsListParams { + o.SetSiteID(siteID) + return o +} + +// SetSiteID adds the siteId to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetSiteID(siteID *string) { + o.SiteID = siteID +} + // WithTag adds the tag to the dcim rear ports list params func (o *DcimRearPortsListParams) WithTag(tag *string) *DcimRearPortsListParams { o.SetTag(tag) @@ -445,6 +498,70 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + + if o.Site != nil { + + // query param site + var qrSite string + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + + } + if o.Tag != nil { // query param tag diff --git a/netbox/client/dcim/dcim_rear_ports_list_responses.go b/netbox/client/dcim/dcim_rear_ports_list_responses.go index 1369b4bca8522aca21cf00dad8646a6fb915ea70..9fc475da956f554a80ec3e0af2c5ba85f15dd11e 100644 --- a/netbox/client/dcim/dcim_rear_ports_list_responses.go +++ b/netbox/client/dcim/dcim_rear_ports_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRearPortsListReader is a Reader for the DcimRearPortsList structure. @@ -42,7 +43,6 @@ type DcimRearPortsListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRearPortsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRearPortsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimRearPortsListOK) Error() string { return fmt.Sprintf("[GET /dcim/rear-ports/][%d] dcimRearPortsListOK %+v", 200, o.Payload) } +func (o *DcimRearPortsListOK) GetPayload() *DcimRearPortsListOKBody { + return o.Payload +} + func (o *DcimRearPortsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimRearPortsListOKBody) diff --git a/netbox/client/dcim/dcim_rear_ports_partial_update_parameters.go b/netbox/client/dcim/dcim_rear_ports_partial_update_parameters.go index 6469afb8d810d0542101a41f5e392325a1c77700..0dcf79a12bda689e15f5eb16bc460328973d42fb 100644 --- a/netbox/client/dcim/dcim_rear_ports_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_rear_ports_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRearPortsPartialUpdateParams creates a new DcimRearPortsPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_rear_ports_partial_update_responses.go b/netbox/client/dcim/dcim_rear_ports_partial_update_responses.go index 8ab89801cee98699394430bd7efbe8b90009e236..848e113418346f0fd9f06b171b755668069d4774 100644 --- a/netbox/client/dcim/dcim_rear_ports_partial_update_responses.go +++ b/netbox/client/dcim/dcim_rear_ports_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRearPortsPartialUpdateReader is a Reader for the DcimRearPortsPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimRearPortsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRearPortsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRearPortsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRearPortsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/rear-ports/{id}/][%d] dcimRearPortsPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimRearPortsPartialUpdateOK) GetPayload() *models.RearPort { + return o.Payload +} + func (o *DcimRearPortsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RearPort) diff --git a/netbox/client/dcim/dcim_rear_ports_read_parameters.go b/netbox/client/dcim/dcim_rear_ports_read_parameters.go index 6a72333f0953b242527135b286c468883dab4b0a..9a8c4bc2f2c76104707646aab1e5255499263695 100644 --- a/netbox/client/dcim/dcim_rear_ports_read_parameters.go +++ b/netbox/client/dcim/dcim_rear_ports_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_rear_ports_read_responses.go b/netbox/client/dcim/dcim_rear_ports_read_responses.go index ba024df26ba07b97c80e32db94c9b3ae8b63c685..08eae21d057e5f8b08eeb9375250ee54c69d5a48 100644 --- a/netbox/client/dcim/dcim_rear_ports_read_responses.go +++ b/netbox/client/dcim/dcim_rear_ports_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRearPortsReadReader is a Reader for the DcimRearPortsRead structure. @@ -38,7 +39,6 @@ type DcimRearPortsReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRearPortsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRearPortsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRearPortsReadOK) Error() string { return fmt.Sprintf("[GET /dcim/rear-ports/{id}/][%d] dcimRearPortsReadOK %+v", 200, o.Payload) } +func (o *DcimRearPortsReadOK) GetPayload() *models.RearPort { + return o.Payload +} + func (o *DcimRearPortsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RearPort) diff --git a/netbox/client/dcim/dcim_rear_ports_update_parameters.go b/netbox/client/dcim/dcim_rear_ports_update_parameters.go index 42a9a6ff11535e5680e028d2cdf5d05bc7f2b3c7..55c4cb354296ee2050cae43af086dd2ab187f43b 100644 --- a/netbox/client/dcim/dcim_rear_ports_update_parameters.go +++ b/netbox/client/dcim/dcim_rear_ports_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRearPortsUpdateParams creates a new DcimRearPortsUpdateParams object diff --git a/netbox/client/dcim/dcim_rear_ports_update_responses.go b/netbox/client/dcim/dcim_rear_ports_update_responses.go index 74c9f55dea2721e4ff9009a5a8625f794a719f4d..7e54f4a2e3027b2eb1c31e1b959a858057487de0 100644 --- a/netbox/client/dcim/dcim_rear_ports_update_responses.go +++ b/netbox/client/dcim/dcim_rear_ports_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRearPortsUpdateReader is a Reader for the DcimRearPortsUpdate structure. @@ -38,7 +39,6 @@ type DcimRearPortsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRearPortsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRearPortsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRearPortsUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/rear-ports/{id}/][%d] dcimRearPortsUpdateOK %+v", 200, o.Payload) } +func (o *DcimRearPortsUpdateOK) GetPayload() *models.RearPort { + return o.Payload +} + func (o *DcimRearPortsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RearPort) diff --git a/netbox/client/dcim/dcim_regions_create_parameters.go b/netbox/client/dcim/dcim_regions_create_parameters.go index 6814b4d619c51ee7051c9d90fdb3820c9767df5e..47560f84352b0590a9e32a49d409b9fbf6a0edc0 100644 --- a/netbox/client/dcim/dcim_regions_create_parameters.go +++ b/netbox/client/dcim/dcim_regions_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRegionsCreateParams creates a new DcimRegionsCreateParams object diff --git a/netbox/client/dcim/dcim_regions_create_responses.go b/netbox/client/dcim/dcim_regions_create_responses.go index 82fbc66d619ae8148674539a436d9d352d8d8aad..5aebe03296685b1d40c4cc9813f168ac5b153dbb 100644 --- a/netbox/client/dcim/dcim_regions_create_responses.go +++ b/netbox/client/dcim/dcim_regions_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRegionsCreateReader is a Reader for the DcimRegionsCreate structure. @@ -38,7 +39,6 @@ type DcimRegionsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRegionsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimRegionsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRegionsCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/regions/][%d] dcimRegionsCreateCreated %+v", 201, o.Payload) } +func (o *DcimRegionsCreateCreated) GetPayload() *models.Region { + return o.Payload +} + func (o *DcimRegionsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Region) diff --git a/netbox/client/dcim/dcim_regions_delete_parameters.go b/netbox/client/dcim/dcim_regions_delete_parameters.go index c3a04bed54ae600b4d548fe7ee0172ca20bc3730..eeb8cb4861a6a54b8ec216a78af5709c8cd62a57 100644 --- a/netbox/client/dcim/dcim_regions_delete_parameters.go +++ b/netbox/client/dcim/dcim_regions_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_regions_delete_responses.go b/netbox/client/dcim/dcim_regions_delete_responses.go index e69b70648b2f5ecf6de2f83a6e6a9c47f33fc9bd..8def7e50aff7bc67b8129fdfb0c219af24083b99 100644 --- a/netbox/client/dcim/dcim_regions_delete_responses.go +++ b/netbox/client/dcim/dcim_regions_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimRegionsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRegionsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimRegionsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_regions_list_parameters.go b/netbox/client/dcim/dcim_regions_list_parameters.go index 3ee2b9dcc31815d45e4cd1dc092d75838d8bc4d2..b3b3313fb35d41e8f7cb7046558687c35df41402 100644 --- a/netbox/client/dcim/dcim_regions_list_parameters.go +++ b/netbox/client/dcim/dcim_regions_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_regions_list_responses.go b/netbox/client/dcim/dcim_regions_list_responses.go index 7be55720a92da2817475a4d3b90abfc9d0046773..4c38736bb4d384f1d42f09cde160ddecf06a498a 100644 --- a/netbox/client/dcim/dcim_regions_list_responses.go +++ b/netbox/client/dcim/dcim_regions_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRegionsListReader is a Reader for the DcimRegionsList structure. @@ -42,7 +43,6 @@ type DcimRegionsListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRegionsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRegionsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimRegionsListOK) Error() string { return fmt.Sprintf("[GET /dcim/regions/][%d] dcimRegionsListOK %+v", 200, o.Payload) } +func (o *DcimRegionsListOK) GetPayload() *DcimRegionsListOKBody { + return o.Payload +} + func (o *DcimRegionsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimRegionsListOKBody) diff --git a/netbox/client/dcim/dcim_regions_partial_update_parameters.go b/netbox/client/dcim/dcim_regions_partial_update_parameters.go index 05ea31cfc11fc79e72b46ff53a9d5ffb0446515b..062a3e5a030a1c508d17d037baf71d6063e44a6a 100644 --- a/netbox/client/dcim/dcim_regions_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_regions_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRegionsPartialUpdateParams creates a new DcimRegionsPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_regions_partial_update_responses.go b/netbox/client/dcim/dcim_regions_partial_update_responses.go index 40562347750e0c0f89f17710b27e485a47c38759..1be150c406e231083ef445e883ba7f5b2ca9c115 100644 --- a/netbox/client/dcim/dcim_regions_partial_update_responses.go +++ b/netbox/client/dcim/dcim_regions_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRegionsPartialUpdateReader is a Reader for the DcimRegionsPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimRegionsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRegionsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRegionsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRegionsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/regions/{id}/][%d] dcimRegionsPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimRegionsPartialUpdateOK) GetPayload() *models.Region { + return o.Payload +} + func (o *DcimRegionsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Region) diff --git a/netbox/client/dcim/dcim_regions_read_parameters.go b/netbox/client/dcim/dcim_regions_read_parameters.go index bc27b1fcb632199263cc54b3d3d04cd5feb9993d..3afb3893a50f9eaeef4b70a6a86952c5601cad91 100644 --- a/netbox/client/dcim/dcim_regions_read_parameters.go +++ b/netbox/client/dcim/dcim_regions_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_regions_read_responses.go b/netbox/client/dcim/dcim_regions_read_responses.go index 188565fc569c54a7331e43ef42e30a4c35bfd55f..1cde069e77d0945e99a54e57391e642f73a809e7 100644 --- a/netbox/client/dcim/dcim_regions_read_responses.go +++ b/netbox/client/dcim/dcim_regions_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRegionsReadReader is a Reader for the DcimRegionsRead structure. @@ -38,7 +39,6 @@ type DcimRegionsReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRegionsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRegionsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRegionsReadOK) Error() string { return fmt.Sprintf("[GET /dcim/regions/{id}/][%d] dcimRegionsReadOK %+v", 200, o.Payload) } +func (o *DcimRegionsReadOK) GetPayload() *models.Region { + return o.Payload +} + func (o *DcimRegionsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Region) diff --git a/netbox/client/dcim/dcim_regions_update_parameters.go b/netbox/client/dcim/dcim_regions_update_parameters.go index 14c34227ec7ae3c52d1a835026250107491ba2fb..2c4e120203e91b04ed69270c4fdf0a1cf60b8acb 100644 --- a/netbox/client/dcim/dcim_regions_update_parameters.go +++ b/netbox/client/dcim/dcim_regions_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimRegionsUpdateParams creates a new DcimRegionsUpdateParams object diff --git a/netbox/client/dcim/dcim_regions_update_responses.go b/netbox/client/dcim/dcim_regions_update_responses.go index 8b004a521beeda852a860e3fa8f8dec408e27e7d..5f7d8377cf02c5153cde06fed2ecb04015fe0877 100644 --- a/netbox/client/dcim/dcim_regions_update_responses.go +++ b/netbox/client/dcim/dcim_regions_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimRegionsUpdateReader is a Reader for the DcimRegionsUpdate structure. @@ -38,7 +39,6 @@ type DcimRegionsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimRegionsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimRegionsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimRegionsUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/regions/{id}/][%d] dcimRegionsUpdateOK %+v", 200, o.Payload) } +func (o *DcimRegionsUpdateOK) GetPayload() *models.Region { + return o.Payload +} + func (o *DcimRegionsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Region) diff --git a/netbox/client/dcim/dcim_sites_create_parameters.go b/netbox/client/dcim/dcim_sites_create_parameters.go index 5c14d1fcfacc77e651b0c147364bd48851345639..6b566746ac26110a06850b33348c362c20e56c41 100644 --- a/netbox/client/dcim/dcim_sites_create_parameters.go +++ b/netbox/client/dcim/dcim_sites_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimSitesCreateParams creates a new DcimSitesCreateParams object diff --git a/netbox/client/dcim/dcim_sites_create_responses.go b/netbox/client/dcim/dcim_sites_create_responses.go index 3368931afcef4b41dcdb4f1c48b23084d7e059bb..f8b2e441a4c2bb401f5fa26ea75cf081152ff638 100644 --- a/netbox/client/dcim/dcim_sites_create_responses.go +++ b/netbox/client/dcim/dcim_sites_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimSitesCreateReader is a Reader for the DcimSitesCreate structure. @@ -38,7 +39,6 @@ type DcimSitesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimSitesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimSitesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimSitesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/sites/][%d] dcimSitesCreateCreated %+v", 201, o.Payload) } +func (o *DcimSitesCreateCreated) GetPayload() *models.Site { + return o.Payload +} + func (o *DcimSitesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Site) diff --git a/netbox/client/dcim/dcim_sites_delete_parameters.go b/netbox/client/dcim/dcim_sites_delete_parameters.go index 2b62654c541b402d5ff0120c617fe01ea839925d..7a2ccc3d9e11b2a817500b74ed6c1fd65c7fc74f 100644 --- a/netbox/client/dcim/dcim_sites_delete_parameters.go +++ b/netbox/client/dcim/dcim_sites_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_sites_delete_responses.go b/netbox/client/dcim/dcim_sites_delete_responses.go index 93c0bf9e844392bbce77563325e7349c9ddbeb72..0e87b9105dec8851327cec263ab4dca2764689bf 100644 --- a/netbox/client/dcim/dcim_sites_delete_responses.go +++ b/netbox/client/dcim/dcim_sites_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimSitesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimSitesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimSitesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_sites_graphs_parameters.go b/netbox/client/dcim/dcim_sites_graphs_parameters.go index 793637857e728170516b69b207f4026088d75b39..37a2c703be0d01b69fe428f3693b573b89112e21 100644 --- a/netbox/client/dcim/dcim_sites_graphs_parameters.go +++ b/netbox/client/dcim/dcim_sites_graphs_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_sites_graphs_responses.go b/netbox/client/dcim/dcim_sites_graphs_responses.go index 68a132fbec9da3242ce445b0bfbbe171818cf8c3..42445c02c79f2eae222ee342c3ce3e2b4e5e8530 100644 --- a/netbox/client/dcim/dcim_sites_graphs_responses.go +++ b/netbox/client/dcim/dcim_sites_graphs_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimSitesGraphsReader is a Reader for the DcimSitesGraphs structure. @@ -38,7 +39,6 @@ type DcimSitesGraphsReader struct { // ReadResponse reads a server response into the received o. func (o *DcimSitesGraphsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimSitesGraphsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimSitesGraphsOK) Error() string { return fmt.Sprintf("[GET /dcim/sites/{id}/graphs/][%d] dcimSitesGraphsOK %+v", 200, o.Payload) } +func (o *DcimSitesGraphsOK) GetPayload() *models.Site { + return o.Payload +} + func (o *DcimSitesGraphsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Site) diff --git a/netbox/client/dcim/dcim_sites_list_parameters.go b/netbox/client/dcim/dcim_sites_list_parameters.go index dc2276f5a854f9b2818970e377d99f00b3f49c8f..db2e3e025f5c71fb5142435cdc42348497dd58f2 100644 --- a/netbox/client/dcim/dcim_sites_list_parameters.go +++ b/netbox/client/dcim/dcim_sites_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -84,6 +85,12 @@ type DcimSitesListParams struct { ContactName *string /*ContactPhone*/ ContactPhone *string + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*Facility*/ Facility *string /*ID*/ @@ -93,6 +100,12 @@ type DcimSitesListParams struct { */ IDIn *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Latitude*/ Latitude *string /*Limit @@ -212,6 +225,39 @@ func (o *DcimSitesListParams) SetContactPhone(contactPhone *string) { o.ContactPhone = contactPhone } +// WithCreated adds the created to the dcim sites list params +func (o *DcimSitesListParams) WithCreated(created *string) *DcimSitesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the dcim sites list params +func (o *DcimSitesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the dcim sites list params +func (o *DcimSitesListParams) WithCreatedGte(createdGte *string) *DcimSitesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the dcim sites list params +func (o *DcimSitesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the dcim sites list params +func (o *DcimSitesListParams) WithCreatedLte(createdLte *string) *DcimSitesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the dcim sites list params +func (o *DcimSitesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + // WithFacility adds the facility to the dcim sites list params func (o *DcimSitesListParams) WithFacility(facility *string) *DcimSitesListParams { o.SetFacility(facility) @@ -245,6 +291,39 @@ func (o *DcimSitesListParams) SetIDIn(iDIn *string) { o.IDIn = iDIn } +// WithLastUpdated adds the lastUpdated to the dcim sites list params +func (o *DcimSitesListParams) WithLastUpdated(lastUpdated *string) *DcimSitesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the dcim sites list params +func (o *DcimSitesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the dcim sites list params +func (o *DcimSitesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimSitesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the dcim sites list params +func (o *DcimSitesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the dcim sites list params +func (o *DcimSitesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimSitesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the dcim sites list params +func (o *DcimSitesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLatitude adds the latitude to the dcim sites list params func (o *DcimSitesListParams) WithLatitude(latitude *string) *DcimSitesListParams { o.SetLatitude(latitude) @@ -482,6 +561,54 @@ func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } + 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.Facility != nil { // query param facility @@ -530,6 +657,54 @@ func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } + 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.Latitude != nil { // query param latitude diff --git a/netbox/client/dcim/dcim_sites_list_responses.go b/netbox/client/dcim/dcim_sites_list_responses.go index 31e1a707c6ea0f6006fe2e235af389518817b49f..f85f257001c8bf85e732514f4f5b32e5da99fb63 100644 --- a/netbox/client/dcim/dcim_sites_list_responses.go +++ b/netbox/client/dcim/dcim_sites_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimSitesListReader is a Reader for the DcimSitesList structure. @@ -42,7 +43,6 @@ type DcimSitesListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimSitesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimSitesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimSitesListOK) Error() string { return fmt.Sprintf("[GET /dcim/sites/][%d] dcimSitesListOK %+v", 200, o.Payload) } +func (o *DcimSitesListOK) GetPayload() *DcimSitesListOKBody { + return o.Payload +} + func (o *DcimSitesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimSitesListOKBody) diff --git a/netbox/client/dcim/dcim_sites_partial_update_parameters.go b/netbox/client/dcim/dcim_sites_partial_update_parameters.go index a8015f7246a77debf9b1a704bb5d35842fce29cd..be3988003d1a6589460b52a68fa31f1e0efa313d 100644 --- a/netbox/client/dcim/dcim_sites_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_sites_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimSitesPartialUpdateParams creates a new DcimSitesPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_sites_partial_update_responses.go b/netbox/client/dcim/dcim_sites_partial_update_responses.go index 2c440e5dac663480cfdc37ea6a0ce7975b47e511..f7b8fad5821e074d5a828a50af9edbffeda97efc 100644 --- a/netbox/client/dcim/dcim_sites_partial_update_responses.go +++ b/netbox/client/dcim/dcim_sites_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimSitesPartialUpdateReader is a Reader for the DcimSitesPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimSitesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimSitesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimSitesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimSitesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/sites/{id}/][%d] dcimSitesPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimSitesPartialUpdateOK) GetPayload() *models.Site { + return o.Payload +} + func (o *DcimSitesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Site) diff --git a/netbox/client/dcim/dcim_sites_read_parameters.go b/netbox/client/dcim/dcim_sites_read_parameters.go index ab14e1f3857c56967b998aac59af735a4c15334d..4ec58b4fb2e2321f60c13ac9db07a0c420a770cf 100644 --- a/netbox/client/dcim/dcim_sites_read_parameters.go +++ b/netbox/client/dcim/dcim_sites_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_sites_read_responses.go b/netbox/client/dcim/dcim_sites_read_responses.go index c25815e57b6c5ab37dddd277555cb0aa7cf5b0f3..7e57cee522699a09d07685a75cf64af42b1b5027 100644 --- a/netbox/client/dcim/dcim_sites_read_responses.go +++ b/netbox/client/dcim/dcim_sites_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimSitesReadReader is a Reader for the DcimSitesRead structure. @@ -38,7 +39,6 @@ type DcimSitesReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimSitesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimSitesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimSitesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/sites/{id}/][%d] dcimSitesReadOK %+v", 200, o.Payload) } +func (o *DcimSitesReadOK) GetPayload() *models.Site { + return o.Payload +} + func (o *DcimSitesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Site) diff --git a/netbox/client/dcim/dcim_sites_update_parameters.go b/netbox/client/dcim/dcim_sites_update_parameters.go index df49b03971017102ad63a4e46be6ff41db79c962..b67f62856ddbc3f0eb82d028ef161915fe85cf1f 100644 --- a/netbox/client/dcim/dcim_sites_update_parameters.go +++ b/netbox/client/dcim/dcim_sites_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimSitesUpdateParams creates a new DcimSitesUpdateParams object diff --git a/netbox/client/dcim/dcim_sites_update_responses.go b/netbox/client/dcim/dcim_sites_update_responses.go index 791a91d376a320d4f418c27e0ee8a4f2d8f4d6f5..dc823a73107f745a932221fcd58e60bf57574b5c 100644 --- a/netbox/client/dcim/dcim_sites_update_responses.go +++ b/netbox/client/dcim/dcim_sites_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimSitesUpdateReader is a Reader for the DcimSitesUpdate structure. @@ -38,7 +39,6 @@ type DcimSitesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimSitesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimSitesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimSitesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/sites/{id}/][%d] dcimSitesUpdateOK %+v", 200, o.Payload) } +func (o *DcimSitesUpdateOK) GetPayload() *models.Site { + return o.Payload +} + func (o *DcimSitesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Site) diff --git a/netbox/client/dcim/dcim_virtual_chassis_create_parameters.go b/netbox/client/dcim/dcim_virtual_chassis_create_parameters.go index 46b26aa43ebc4ae21e9296728b30c05555f0a3fe..cc76f9fa23868e921f0189f31829300dbcb61057 100644 --- a/netbox/client/dcim/dcim_virtual_chassis_create_parameters.go +++ b/netbox/client/dcim/dcim_virtual_chassis_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimVirtualChassisCreateParams creates a new DcimVirtualChassisCreateParams object diff --git a/netbox/client/dcim/dcim_virtual_chassis_create_responses.go b/netbox/client/dcim/dcim_virtual_chassis_create_responses.go index 7f048def34ec90ec7c22b891577a7b4f67d8d2cd..718c1edf6cc2737dfd499b3c5dc7ba5537909c25 100644 --- a/netbox/client/dcim/dcim_virtual_chassis_create_responses.go +++ b/netbox/client/dcim/dcim_virtual_chassis_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimVirtualChassisCreateReader is a Reader for the DcimVirtualChassisCreate structure. @@ -38,7 +39,6 @@ type DcimVirtualChassisCreateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimVirtualChassisCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewDcimVirtualChassisCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimVirtualChassisCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/virtual-chassis/][%d] dcimVirtualChassisCreateCreated %+v", 201, o.Payload) } +func (o *DcimVirtualChassisCreateCreated) GetPayload() *models.VirtualChassis { + return o.Payload +} + func (o *DcimVirtualChassisCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VirtualChassis) diff --git a/netbox/client/dcim/dcim_virtual_chassis_delete_parameters.go b/netbox/client/dcim/dcim_virtual_chassis_delete_parameters.go index 7823923abd17e8c35b56633ecfb03d198ffe75d7..7f37a3d4359e109eeded73bb7adb1b3e5e183cfa 100644 --- a/netbox/client/dcim/dcim_virtual_chassis_delete_parameters.go +++ b/netbox/client/dcim/dcim_virtual_chassis_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_virtual_chassis_delete_responses.go b/netbox/client/dcim/dcim_virtual_chassis_delete_responses.go index 83795c179cef31eec8a3b8b61911ee0ee606018d..e3779e0c4095e125f82177abf7455577f6a0d39b 100644 --- a/netbox/client/dcim/dcim_virtual_chassis_delete_responses.go +++ b/netbox/client/dcim/dcim_virtual_chassis_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -35,7 +36,6 @@ type DcimVirtualChassisDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *DcimVirtualChassisDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewDcimVirtualChassisDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go b/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go index f6983e18483b6c00abe565a49ce020c6b57b5087..c8776adcbfe5fc91c209a6c37e1ae801985a4b07 100644 --- a/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go +++ b/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -76,6 +77,10 @@ for the dcim virtual chassis list operation typically these are written to a htt */ type DcimVirtualChassisListParams struct { + /*Domain*/ + Domain *string + /*ID*/ + ID *string /*Limit Number of results to return per page. @@ -86,6 +91,22 @@ type DcimVirtualChassisListParams struct { */ Offset *int64 + /*Q*/ + Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string + /*Site*/ + Site *string + /*SiteID*/ + SiteID *string + /*Tag*/ + Tag *string + /*Tenant*/ + Tenant *string + /*TenantID*/ + TenantID *string timeout time.Duration Context context.Context @@ -125,6 +146,28 @@ func (o *DcimVirtualChassisListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithDomain adds the domain to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithDomain(domain *string) *DcimVirtualChassisListParams { + o.SetDomain(domain) + return o +} + +// SetDomain adds the domain to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetDomain(domain *string) { + o.Domain = domain +} + +// WithID adds the id to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithID(id *string) *DcimVirtualChassisListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetID(id *string) { + o.ID = id +} + // WithLimit adds the limit to the dcim virtual chassis list params func (o *DcimVirtualChassisListParams) WithLimit(limit *int64) *DcimVirtualChassisListParams { o.SetLimit(limit) @@ -147,6 +190,94 @@ func (o *DcimVirtualChassisListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithQ adds the q to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithQ(q *string) *DcimVirtualChassisListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetQ(q *string) { + o.Q = q +} + +// WithRegion adds the region to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithRegion(region *string) *DcimVirtualChassisListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithRegionID(regionID *string) *DcimVirtualChassisListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + +// WithSite adds the site to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithSite(site *string) *DcimVirtualChassisListParams { + o.SetSite(site) + return o +} + +// SetSite adds the site to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetSite(site *string) { + o.Site = site +} + +// WithSiteID adds the siteID to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithSiteID(siteID *string) *DcimVirtualChassisListParams { + o.SetSiteID(siteID) + return o +} + +// SetSiteID adds the siteId to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetSiteID(siteID *string) { + o.SiteID = siteID +} + +// WithTag adds the tag to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithTag(tag *string) *DcimVirtualChassisListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTenant adds the tenant to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithTenant(tenant *string) *DcimVirtualChassisListParams { + o.SetTenant(tenant) + return o +} + +// SetTenant adds the tenant to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetTenant(tenant *string) { + o.Tenant = tenant +} + +// WithTenantID adds the tenantID to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithTenantID(tenantID *string) *DcimVirtualChassisListParams { + o.SetTenantID(tenantID) + return o +} + +// SetTenantID adds the tenantId to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetTenantID(tenantID *string) { + o.TenantID = tenantID +} + // WriteToRequest writes these params to a swagger request func (o *DcimVirtualChassisListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -155,6 +286,38 @@ func (o *DcimVirtualChassisListParams) WriteToRequest(r runtime.ClientRequest, r } var res []error + if o.Domain != nil { + + // query param domain + var qrDomain string + if o.Domain != nil { + qrDomain = *o.Domain + } + qDomain := qrDomain + if qDomain != "" { + if err := r.SetQueryParam("domain", qDomain); 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.Limit != nil { // query param limit @@ -187,6 +350,134 @@ func (o *DcimVirtualChassisListParams) 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 o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + + if o.Site != nil { + + // query param site + var qrSite string + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + + } + + if o.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.Tenant != nil { + + // query param tenant + var qrTenant string + if o.Tenant != nil { + qrTenant = *o.Tenant + } + qTenant := qrTenant + if qTenant != "" { + if err := r.SetQueryParam("tenant", qTenant); err != nil { + return err + } + } + + } + + if o.TenantID != nil { + + // query param tenant_id + var qrTenantID string + if o.TenantID != nil { + qrTenantID = *o.TenantID + } + qTenantID := qrTenantID + if qTenantID != "" { + if err := r.SetQueryParam("tenant_id", qTenantID); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_virtual_chassis_list_responses.go b/netbox/client/dcim/dcim_virtual_chassis_list_responses.go index acd23ae508a9255221a068d5894b68dd6701b57e..07a3c2c7b1822a8d14f49b04e2026246de231332 100644 --- a/netbox/client/dcim/dcim_virtual_chassis_list_responses.go +++ b/netbox/client/dcim/dcim_virtual_chassis_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimVirtualChassisListReader is a Reader for the DcimVirtualChassisList structure. @@ -42,7 +43,6 @@ type DcimVirtualChassisListReader struct { // ReadResponse reads a server response into the received o. func (o *DcimVirtualChassisListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimVirtualChassisListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *DcimVirtualChassisListOK) Error() string { return fmt.Sprintf("[GET /dcim/virtual-chassis/][%d] dcimVirtualChassisListOK %+v", 200, o.Payload) } +func (o *DcimVirtualChassisListOK) GetPayload() *DcimVirtualChassisListOKBody { + return o.Payload +} + func (o *DcimVirtualChassisListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(DcimVirtualChassisListOKBody) diff --git a/netbox/client/dcim/dcim_virtual_chassis_partial_update_parameters.go b/netbox/client/dcim/dcim_virtual_chassis_partial_update_parameters.go index 44442763dd689085828b21dcb8652bebaaf23b40..6d70b41f0730c974935aa342e4239008fed56424 100644 --- a/netbox/client/dcim/dcim_virtual_chassis_partial_update_parameters.go +++ b/netbox/client/dcim/dcim_virtual_chassis_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimVirtualChassisPartialUpdateParams creates a new DcimVirtualChassisPartialUpdateParams object diff --git a/netbox/client/dcim/dcim_virtual_chassis_partial_update_responses.go b/netbox/client/dcim/dcim_virtual_chassis_partial_update_responses.go index dc2a1fa89b2f62a80309aad929450585c58dbb1b..9b51105ffbc4fb2f7e362e4b82318a0554086172 100644 --- a/netbox/client/dcim/dcim_virtual_chassis_partial_update_responses.go +++ b/netbox/client/dcim/dcim_virtual_chassis_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimVirtualChassisPartialUpdateReader is a Reader for the DcimVirtualChassisPartialUpdate structure. @@ -38,7 +39,6 @@ type DcimVirtualChassisPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimVirtualChassisPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimVirtualChassisPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimVirtualChassisPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/virtual-chassis/{id}/][%d] dcimVirtualChassisPartialUpdateOK %+v", 200, o.Payload) } +func (o *DcimVirtualChassisPartialUpdateOK) GetPayload() *models.VirtualChassis { + return o.Payload +} + func (o *DcimVirtualChassisPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VirtualChassis) diff --git a/netbox/client/dcim/dcim_virtual_chassis_read_parameters.go b/netbox/client/dcim/dcim_virtual_chassis_read_parameters.go index 58d2edbfba4fcd31f8475fd70dbed99ca8453ff9..68e18e9fecef7c40c51d817448e95e6d44f0067c 100644 --- a/netbox/client/dcim/dcim_virtual_chassis_read_parameters.go +++ b/netbox/client/dcim/dcim_virtual_chassis_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim diff --git a/netbox/client/dcim/dcim_virtual_chassis_read_responses.go b/netbox/client/dcim/dcim_virtual_chassis_read_responses.go index ba296017c5eb38c08e9ae0f979a66a95054010cd..2d3f1cfcc2c992ee4fed4c54a98417b8d05343f8 100644 --- a/netbox/client/dcim/dcim_virtual_chassis_read_responses.go +++ b/netbox/client/dcim/dcim_virtual_chassis_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimVirtualChassisReadReader is a Reader for the DcimVirtualChassisRead structure. @@ -38,7 +39,6 @@ type DcimVirtualChassisReadReader struct { // ReadResponse reads a server response into the received o. func (o *DcimVirtualChassisReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimVirtualChassisReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimVirtualChassisReadOK) Error() string { return fmt.Sprintf("[GET /dcim/virtual-chassis/{id}/][%d] dcimVirtualChassisReadOK %+v", 200, o.Payload) } +func (o *DcimVirtualChassisReadOK) GetPayload() *models.VirtualChassis { + return o.Payload +} + func (o *DcimVirtualChassisReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VirtualChassis) diff --git a/netbox/client/dcim/dcim_virtual_chassis_update_parameters.go b/netbox/client/dcim/dcim_virtual_chassis_update_parameters.go index 0e45f68b739bf817a3a474fcd76c9758dbbb4f09..dd02ecaff3bc3fc31c6aedb6721eb7943d7f92f8 100644 --- a/netbox/client/dcim/dcim_virtual_chassis_update_parameters.go +++ b/netbox/client/dcim/dcim_virtual_chassis_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewDcimVirtualChassisUpdateParams creates a new DcimVirtualChassisUpdateParams object diff --git a/netbox/client/dcim/dcim_virtual_chassis_update_responses.go b/netbox/client/dcim/dcim_virtual_chassis_update_responses.go index 3367b9dda0b3ec8d7f2711abe59d340d4aa75c5c..5d92b2f23a9ea938d84d7140d3165c3b96e97be4 100644 --- a/netbox/client/dcim/dcim_virtual_chassis_update_responses.go +++ b/netbox/client/dcim/dcim_virtual_chassis_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dcim @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // DcimVirtualChassisUpdateReader is a Reader for the DcimVirtualChassisUpdate structure. @@ -38,7 +39,6 @@ type DcimVirtualChassisUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *DcimVirtualChassisUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewDcimVirtualChassisUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *DcimVirtualChassisUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/virtual-chassis/{id}/][%d] dcimVirtualChassisUpdateOK %+v", 200, o.Payload) } +func (o *DcimVirtualChassisUpdateOK) GetPayload() *models.VirtualChassis { + return o.Payload +} + func (o *DcimVirtualChassisUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VirtualChassis) diff --git a/netbox/client/extras/extras_choices_list_parameters.go b/netbox/client/extras/extras_choices_list_parameters.go index e26a3df9489b83eb7c480f39945db95547810bbc..ea3fe2b488432c2599085dc53457524bb9e293fd 100644 --- a/netbox/client/extras/extras_choices_list_parameters.go +++ b/netbox/client/extras/extras_choices_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_choices_list_responses.go b/netbox/client/extras/extras_choices_list_responses.go index c4305abd4e987838086203ddb431d30bf15a06a7..0fb976c7cbfc256765a7dd06c10206cb58925ef8 100644 --- a/netbox/client/extras/extras_choices_list_responses.go +++ b/netbox/client/extras/extras_choices_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -35,7 +36,6 @@ type ExtrasChoicesListReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasChoicesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/extras/extras_choices_read_parameters.go b/netbox/client/extras/extras_choices_read_parameters.go index aec6ea7d4052a076c5706b2aa96e160d4ee41b46..f9fcc5d6f879c1971dd80dde0125a8d23566868a 100644 --- a/netbox/client/extras/extras_choices_read_parameters.go +++ b/netbox/client/extras/extras_choices_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_choices_read_responses.go b/netbox/client/extras/extras_choices_read_responses.go index 52513cb2f02cda987909f1dd08af30e8585015c8..5dd3094d41f4d4f23ebf882fe95d5cf20225e582 100644 --- a/netbox/client/extras/extras_choices_read_responses.go +++ b/netbox/client/extras/extras_choices_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -35,7 +36,6 @@ type ExtrasChoicesReadReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasChoicesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/extras/extras_client.go b/netbox/client/extras/extras_client.go index 9ed6c3edca489fa13c7194938a21776f327740ce..7f8ddb2eda8cd6c2ed3cff8faaedee358bf931af 100644 --- a/netbox/client/extras/extras_client.go +++ b/netbox/client/extras/extras_client.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -20,13 +21,14 @@ package extras // Editing this file might prove futile when you re-run the swagger generate command import ( - "github.com/go-openapi/runtime" + "fmt" - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" ) // New creates a new extras API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } @@ -38,8 +40,95 @@ type Client struct { formats strfmt.Registry } +// ClientService is the interface for Client methods +type ClientService interface { + ExtrasChoicesList(params *ExtrasChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasChoicesListOK, error) + + ExtrasChoicesRead(params *ExtrasChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasChoicesReadOK, error) + + ExtrasCustomFieldChoicesList(params *ExtrasCustomFieldChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasCustomFieldChoicesListOK, error) + + ExtrasCustomFieldChoicesRead(params *ExtrasCustomFieldChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasCustomFieldChoicesReadOK, error) + + ExtrasConfigContextsCreate(params *ExtrasConfigContextsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasConfigContextsCreateCreated, error) + + ExtrasConfigContextsDelete(params *ExtrasConfigContextsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasConfigContextsDeleteNoContent, error) + + ExtrasConfigContextsList(params *ExtrasConfigContextsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasConfigContextsListOK, error) + + ExtrasConfigContextsPartialUpdate(params *ExtrasConfigContextsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasConfigContextsPartialUpdateOK, error) + + ExtrasConfigContextsRead(params *ExtrasConfigContextsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasConfigContextsReadOK, error) + + ExtrasConfigContextsUpdate(params *ExtrasConfigContextsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasConfigContextsUpdateOK, error) + + ExtrasExportTemplatesCreate(params *ExtrasExportTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesCreateCreated, error) + + ExtrasExportTemplatesDelete(params *ExtrasExportTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesDeleteNoContent, error) + + ExtrasExportTemplatesList(params *ExtrasExportTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesListOK, error) + + ExtrasExportTemplatesPartialUpdate(params *ExtrasExportTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesPartialUpdateOK, error) + + ExtrasExportTemplatesRead(params *ExtrasExportTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesReadOK, error) + + ExtrasExportTemplatesUpdate(params *ExtrasExportTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesUpdateOK, error) + + ExtrasGraphsCreate(params *ExtrasGraphsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsCreateCreated, error) + + ExtrasGraphsDelete(params *ExtrasGraphsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsDeleteNoContent, error) + + ExtrasGraphsList(params *ExtrasGraphsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsListOK, error) + + ExtrasGraphsPartialUpdate(params *ExtrasGraphsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsPartialUpdateOK, error) + + ExtrasGraphsRead(params *ExtrasGraphsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsReadOK, error) + + ExtrasGraphsUpdate(params *ExtrasGraphsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsUpdateOK, error) + + ExtrasImageAttachmentsCreate(params *ExtrasImageAttachmentsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsCreateCreated, error) + + ExtrasImageAttachmentsDelete(params *ExtrasImageAttachmentsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsDeleteNoContent, error) + + ExtrasImageAttachmentsList(params *ExtrasImageAttachmentsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsListOK, error) + + ExtrasImageAttachmentsPartialUpdate(params *ExtrasImageAttachmentsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsPartialUpdateOK, error) + + ExtrasImageAttachmentsRead(params *ExtrasImageAttachmentsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsReadOK, error) + + ExtrasImageAttachmentsUpdate(params *ExtrasImageAttachmentsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsUpdateOK, error) + + ExtrasObjectChangesList(params *ExtrasObjectChangesListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasObjectChangesListOK, error) + + ExtrasObjectChangesRead(params *ExtrasObjectChangesReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasObjectChangesReadOK, error) + + ExtrasReportsList(params *ExtrasReportsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasReportsListOK, error) + + ExtrasReportsRead(params *ExtrasReportsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasReportsReadOK, error) + + ExtrasReportsRun(params *ExtrasReportsRunParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasReportsRunCreated, error) + + ExtrasScriptsList(params *ExtrasScriptsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasScriptsListOK, error) + + ExtrasScriptsRead(params *ExtrasScriptsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasScriptsReadOK, error) + + ExtrasTagsCreate(params *ExtrasTagsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsCreateCreated, error) + + ExtrasTagsDelete(params *ExtrasTagsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsDeleteNoContent, error) + + ExtrasTagsList(params *ExtrasTagsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsListOK, error) + + ExtrasTagsPartialUpdate(params *ExtrasTagsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsPartialUpdateOK, error) + + ExtrasTagsRead(params *ExtrasTagsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsReadOK, error) + + ExtrasTagsUpdate(params *ExtrasTagsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsUpdateOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* -ExtrasChoicesList extras choices list API + ExtrasChoicesList extras choices list API */ func (a *Client) ExtrasChoicesList(params *ExtrasChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasChoicesListOK, error) { // TODO: Validate the params before sending @@ -53,7 +142,7 @@ func (a *Client) ExtrasChoicesList(params *ExtrasChoicesListParams, authInfo run PathPattern: "/extras/_choices/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasChoicesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -63,12 +152,18 @@ func (a *Client) ExtrasChoicesList(params *ExtrasChoicesListParams, authInfo run if err != nil { return nil, err } - return result.(*ExtrasChoicesListOK), nil - + success, ok := result.(*ExtrasChoicesListOK) + 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 extras__choices_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasChoicesRead extras choices read API + ExtrasChoicesRead extras choices read API */ func (a *Client) ExtrasChoicesRead(params *ExtrasChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasChoicesReadOK, error) { // TODO: Validate the params before sending @@ -82,7 +177,7 @@ func (a *Client) ExtrasChoicesRead(params *ExtrasChoicesReadParams, authInfo run PathPattern: "/extras/_choices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasChoicesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -92,12 +187,18 @@ func (a *Client) ExtrasChoicesRead(params *ExtrasChoicesReadParams, authInfo run if err != nil { return nil, err } - return result.(*ExtrasChoicesReadOK), nil - + success, ok := result.(*ExtrasChoicesReadOK) + 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 extras__choices_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasCustomFieldChoicesList extras custom field choices list API + ExtrasCustomFieldChoicesList extras custom field choices list API */ func (a *Client) ExtrasCustomFieldChoicesList(params *ExtrasCustomFieldChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasCustomFieldChoicesListOK, error) { // TODO: Validate the params before sending @@ -111,7 +212,7 @@ func (a *Client) ExtrasCustomFieldChoicesList(params *ExtrasCustomFieldChoicesLi PathPattern: "/extras/_custom_field_choices/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomFieldChoicesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -121,12 +222,18 @@ func (a *Client) ExtrasCustomFieldChoicesList(params *ExtrasCustomFieldChoicesLi if err != nil { return nil, err } - return result.(*ExtrasCustomFieldChoicesListOK), nil - + success, ok := result.(*ExtrasCustomFieldChoicesListOK) + 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 extras__custom_field_choices_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasCustomFieldChoicesRead extras custom field choices read API + ExtrasCustomFieldChoicesRead extras custom field choices read API */ func (a *Client) ExtrasCustomFieldChoicesRead(params *ExtrasCustomFieldChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasCustomFieldChoicesReadOK, error) { // TODO: Validate the params before sending @@ -140,7 +247,7 @@ func (a *Client) ExtrasCustomFieldChoicesRead(params *ExtrasCustomFieldChoicesRe PathPattern: "/extras/_custom_field_choices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomFieldChoicesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -150,12 +257,18 @@ func (a *Client) ExtrasCustomFieldChoicesRead(params *ExtrasCustomFieldChoicesRe if err != nil { return nil, err } - return result.(*ExtrasCustomFieldChoicesReadOK), nil - + success, ok := result.(*ExtrasCustomFieldChoicesReadOK) + 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 extras__custom_field_choices_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasConfigContextsCreate extras config contexts create API + ExtrasConfigContextsCreate extras config contexts create API */ func (a *Client) ExtrasConfigContextsCreate(params *ExtrasConfigContextsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasConfigContextsCreateCreated, error) { // TODO: Validate the params before sending @@ -169,7 +282,7 @@ func (a *Client) ExtrasConfigContextsCreate(params *ExtrasConfigContextsCreatePa PathPattern: "/extras/config-contexts/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -179,12 +292,18 @@ func (a *Client) ExtrasConfigContextsCreate(params *ExtrasConfigContextsCreatePa if err != nil { return nil, err } - return result.(*ExtrasConfigContextsCreateCreated), nil - + success, ok := result.(*ExtrasConfigContextsCreateCreated) + 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 extras_config-contexts_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasConfigContextsDelete extras config contexts delete API + ExtrasConfigContextsDelete extras config contexts delete API */ func (a *Client) ExtrasConfigContextsDelete(params *ExtrasConfigContextsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasConfigContextsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -198,7 +317,7 @@ func (a *Client) ExtrasConfigContextsDelete(params *ExtrasConfigContextsDeletePa PathPattern: "/extras/config-contexts/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -208,12 +327,18 @@ func (a *Client) ExtrasConfigContextsDelete(params *ExtrasConfigContextsDeletePa if err != nil { return nil, err } - return result.(*ExtrasConfigContextsDeleteNoContent), nil - + success, ok := result.(*ExtrasConfigContextsDeleteNoContent) + 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 extras_config-contexts_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasConfigContextsList Call to super to allow for caching + ExtrasConfigContextsList Call to super to allow for caching */ func (a *Client) ExtrasConfigContextsList(params *ExtrasConfigContextsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasConfigContextsListOK, error) { // TODO: Validate the params before sending @@ -227,7 +352,7 @@ func (a *Client) ExtrasConfigContextsList(params *ExtrasConfigContextsListParams PathPattern: "/extras/config-contexts/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -237,12 +362,18 @@ func (a *Client) ExtrasConfigContextsList(params *ExtrasConfigContextsListParams if err != nil { return nil, err } - return result.(*ExtrasConfigContextsListOK), nil - + success, ok := result.(*ExtrasConfigContextsListOK) + 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 extras_config-contexts_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasConfigContextsPartialUpdate extras config contexts partial update API + ExtrasConfigContextsPartialUpdate extras config contexts partial update API */ func (a *Client) ExtrasConfigContextsPartialUpdate(params *ExtrasConfigContextsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasConfigContextsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -256,7 +387,7 @@ func (a *Client) ExtrasConfigContextsPartialUpdate(params *ExtrasConfigContextsP PathPattern: "/extras/config-contexts/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -266,12 +397,18 @@ func (a *Client) ExtrasConfigContextsPartialUpdate(params *ExtrasConfigContextsP if err != nil { return nil, err } - return result.(*ExtrasConfigContextsPartialUpdateOK), nil - + success, ok := result.(*ExtrasConfigContextsPartialUpdateOK) + 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 extras_config-contexts_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasConfigContextsRead Call to super to allow for caching + ExtrasConfigContextsRead Call to super to allow for caching */ func (a *Client) ExtrasConfigContextsRead(params *ExtrasConfigContextsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasConfigContextsReadOK, error) { // TODO: Validate the params before sending @@ -285,7 +422,7 @@ func (a *Client) ExtrasConfigContextsRead(params *ExtrasConfigContextsReadParams PathPattern: "/extras/config-contexts/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -295,12 +432,18 @@ func (a *Client) ExtrasConfigContextsRead(params *ExtrasConfigContextsReadParams if err != nil { return nil, err } - return result.(*ExtrasConfigContextsReadOK), nil - + success, ok := result.(*ExtrasConfigContextsReadOK) + 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 extras_config-contexts_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasConfigContextsUpdate extras config contexts update API + ExtrasConfigContextsUpdate extras config contexts update API */ func (a *Client) ExtrasConfigContextsUpdate(params *ExtrasConfigContextsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasConfigContextsUpdateOK, error) { // TODO: Validate the params before sending @@ -314,7 +457,7 @@ func (a *Client) ExtrasConfigContextsUpdate(params *ExtrasConfigContextsUpdatePa PathPattern: "/extras/config-contexts/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -324,12 +467,18 @@ func (a *Client) ExtrasConfigContextsUpdate(params *ExtrasConfigContextsUpdatePa if err != nil { return nil, err } - return result.(*ExtrasConfigContextsUpdateOK), nil - + success, ok := result.(*ExtrasConfigContextsUpdateOK) + 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 extras_config-contexts_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasExportTemplatesCreate extras export templates create API + ExtrasExportTemplatesCreate extras export templates create API */ func (a *Client) ExtrasExportTemplatesCreate(params *ExtrasExportTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesCreateCreated, error) { // TODO: Validate the params before sending @@ -343,7 +492,7 @@ func (a *Client) ExtrasExportTemplatesCreate(params *ExtrasExportTemplatesCreate PathPattern: "/extras/export-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -353,12 +502,18 @@ func (a *Client) ExtrasExportTemplatesCreate(params *ExtrasExportTemplatesCreate if err != nil { return nil, err } - return result.(*ExtrasExportTemplatesCreateCreated), nil - + success, ok := result.(*ExtrasExportTemplatesCreateCreated) + 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 extras_export-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasExportTemplatesDelete extras export templates delete API + ExtrasExportTemplatesDelete extras export templates delete API */ func (a *Client) ExtrasExportTemplatesDelete(params *ExtrasExportTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -372,7 +527,7 @@ func (a *Client) ExtrasExportTemplatesDelete(params *ExtrasExportTemplatesDelete PathPattern: "/extras/export-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -382,12 +537,18 @@ func (a *Client) ExtrasExportTemplatesDelete(params *ExtrasExportTemplatesDelete if err != nil { return nil, err } - return result.(*ExtrasExportTemplatesDeleteNoContent), nil - + success, ok := result.(*ExtrasExportTemplatesDeleteNoContent) + 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 extras_export-templates_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasExportTemplatesList Call to super to allow for caching + ExtrasExportTemplatesList Call to super to allow for caching */ func (a *Client) ExtrasExportTemplatesList(params *ExtrasExportTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesListOK, error) { // TODO: Validate the params before sending @@ -401,7 +562,7 @@ func (a *Client) ExtrasExportTemplatesList(params *ExtrasExportTemplatesListPara PathPattern: "/extras/export-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -411,12 +572,18 @@ func (a *Client) ExtrasExportTemplatesList(params *ExtrasExportTemplatesListPara if err != nil { return nil, err } - return result.(*ExtrasExportTemplatesListOK), nil - + success, ok := result.(*ExtrasExportTemplatesListOK) + 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 extras_export-templates_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasExportTemplatesPartialUpdate extras export templates partial update API + ExtrasExportTemplatesPartialUpdate extras export templates partial update API */ func (a *Client) ExtrasExportTemplatesPartialUpdate(params *ExtrasExportTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -430,7 +597,7 @@ func (a *Client) ExtrasExportTemplatesPartialUpdate(params *ExtrasExportTemplate PathPattern: "/extras/export-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -440,12 +607,18 @@ func (a *Client) ExtrasExportTemplatesPartialUpdate(params *ExtrasExportTemplate if err != nil { return nil, err } - return result.(*ExtrasExportTemplatesPartialUpdateOK), nil - + success, ok := result.(*ExtrasExportTemplatesPartialUpdateOK) + 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 extras_export-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasExportTemplatesRead Call to super to allow for caching + ExtrasExportTemplatesRead Call to super to allow for caching */ func (a *Client) ExtrasExportTemplatesRead(params *ExtrasExportTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -459,7 +632,7 @@ func (a *Client) ExtrasExportTemplatesRead(params *ExtrasExportTemplatesReadPara PathPattern: "/extras/export-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -469,12 +642,18 @@ func (a *Client) ExtrasExportTemplatesRead(params *ExtrasExportTemplatesReadPara if err != nil { return nil, err } - return result.(*ExtrasExportTemplatesReadOK), nil - + success, ok := result.(*ExtrasExportTemplatesReadOK) + 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 extras_export-templates_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasExportTemplatesUpdate extras export templates update API + ExtrasExportTemplatesUpdate extras export templates update API */ func (a *Client) ExtrasExportTemplatesUpdate(params *ExtrasExportTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesUpdateOK, error) { // TODO: Validate the params before sending @@ -488,7 +667,7 @@ func (a *Client) ExtrasExportTemplatesUpdate(params *ExtrasExportTemplatesUpdate PathPattern: "/extras/export-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -498,12 +677,18 @@ func (a *Client) ExtrasExportTemplatesUpdate(params *ExtrasExportTemplatesUpdate if err != nil { return nil, err } - return result.(*ExtrasExportTemplatesUpdateOK), nil - + success, ok := result.(*ExtrasExportTemplatesUpdateOK) + 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 extras_export-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasGraphsCreate extras graphs create API + ExtrasGraphsCreate extras graphs create API */ func (a *Client) ExtrasGraphsCreate(params *ExtrasGraphsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsCreateCreated, error) { // TODO: Validate the params before sending @@ -517,7 +702,7 @@ func (a *Client) ExtrasGraphsCreate(params *ExtrasGraphsCreateParams, authInfo r PathPattern: "/extras/graphs/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasGraphsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -527,12 +712,18 @@ func (a *Client) ExtrasGraphsCreate(params *ExtrasGraphsCreateParams, authInfo r if err != nil { return nil, err } - return result.(*ExtrasGraphsCreateCreated), nil - + success, ok := result.(*ExtrasGraphsCreateCreated) + 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 extras_graphs_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasGraphsDelete extras graphs delete API + ExtrasGraphsDelete extras graphs delete API */ func (a *Client) ExtrasGraphsDelete(params *ExtrasGraphsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -546,7 +737,7 @@ func (a *Client) ExtrasGraphsDelete(params *ExtrasGraphsDeleteParams, authInfo r PathPattern: "/extras/graphs/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasGraphsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -556,12 +747,18 @@ func (a *Client) ExtrasGraphsDelete(params *ExtrasGraphsDeleteParams, authInfo r if err != nil { return nil, err } - return result.(*ExtrasGraphsDeleteNoContent), nil - + success, ok := result.(*ExtrasGraphsDeleteNoContent) + 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 extras_graphs_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasGraphsList Call to super to allow for caching + ExtrasGraphsList Call to super to allow for caching */ func (a *Client) ExtrasGraphsList(params *ExtrasGraphsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsListOK, error) { // TODO: Validate the params before sending @@ -575,7 +772,7 @@ func (a *Client) ExtrasGraphsList(params *ExtrasGraphsListParams, authInfo runti PathPattern: "/extras/graphs/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasGraphsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -585,12 +782,18 @@ func (a *Client) ExtrasGraphsList(params *ExtrasGraphsListParams, authInfo runti if err != nil { return nil, err } - return result.(*ExtrasGraphsListOK), nil - + success, ok := result.(*ExtrasGraphsListOK) + 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 extras_graphs_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasGraphsPartialUpdate extras graphs partial update API + ExtrasGraphsPartialUpdate extras graphs partial update API */ func (a *Client) ExtrasGraphsPartialUpdate(params *ExtrasGraphsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -604,7 +807,7 @@ func (a *Client) ExtrasGraphsPartialUpdate(params *ExtrasGraphsPartialUpdatePara PathPattern: "/extras/graphs/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasGraphsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -614,12 +817,18 @@ func (a *Client) ExtrasGraphsPartialUpdate(params *ExtrasGraphsPartialUpdatePara if err != nil { return nil, err } - return result.(*ExtrasGraphsPartialUpdateOK), nil - + success, ok := result.(*ExtrasGraphsPartialUpdateOK) + 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 extras_graphs_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasGraphsRead Call to super to allow for caching + ExtrasGraphsRead Call to super to allow for caching */ func (a *Client) ExtrasGraphsRead(params *ExtrasGraphsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsReadOK, error) { // TODO: Validate the params before sending @@ -633,7 +842,7 @@ func (a *Client) ExtrasGraphsRead(params *ExtrasGraphsReadParams, authInfo runti PathPattern: "/extras/graphs/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasGraphsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -643,12 +852,18 @@ func (a *Client) ExtrasGraphsRead(params *ExtrasGraphsReadParams, authInfo runti if err != nil { return nil, err } - return result.(*ExtrasGraphsReadOK), nil - + success, ok := result.(*ExtrasGraphsReadOK) + 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 extras_graphs_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasGraphsUpdate extras graphs update API + ExtrasGraphsUpdate extras graphs update API */ func (a *Client) ExtrasGraphsUpdate(params *ExtrasGraphsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsUpdateOK, error) { // TODO: Validate the params before sending @@ -662,7 +877,7 @@ func (a *Client) ExtrasGraphsUpdate(params *ExtrasGraphsUpdateParams, authInfo r PathPattern: "/extras/graphs/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasGraphsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -672,12 +887,18 @@ func (a *Client) ExtrasGraphsUpdate(params *ExtrasGraphsUpdateParams, authInfo r if err != nil { return nil, err } - return result.(*ExtrasGraphsUpdateOK), nil - + success, ok := result.(*ExtrasGraphsUpdateOK) + 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 extras_graphs_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasImageAttachmentsCreate extras image attachments create API + ExtrasImageAttachmentsCreate extras image attachments create API */ func (a *Client) ExtrasImageAttachmentsCreate(params *ExtrasImageAttachmentsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsCreateCreated, error) { // TODO: Validate the params before sending @@ -691,7 +912,7 @@ func (a *Client) ExtrasImageAttachmentsCreate(params *ExtrasImageAttachmentsCrea PathPattern: "/extras/image-attachments/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -701,12 +922,18 @@ func (a *Client) ExtrasImageAttachmentsCreate(params *ExtrasImageAttachmentsCrea if err != nil { return nil, err } - return result.(*ExtrasImageAttachmentsCreateCreated), nil - + success, ok := result.(*ExtrasImageAttachmentsCreateCreated) + 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 extras_image-attachments_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasImageAttachmentsDelete extras image attachments delete API + ExtrasImageAttachmentsDelete extras image attachments delete API */ func (a *Client) ExtrasImageAttachmentsDelete(params *ExtrasImageAttachmentsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -720,7 +947,7 @@ func (a *Client) ExtrasImageAttachmentsDelete(params *ExtrasImageAttachmentsDele PathPattern: "/extras/image-attachments/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -730,12 +957,18 @@ func (a *Client) ExtrasImageAttachmentsDelete(params *ExtrasImageAttachmentsDele if err != nil { return nil, err } - return result.(*ExtrasImageAttachmentsDeleteNoContent), nil - + success, ok := result.(*ExtrasImageAttachmentsDeleteNoContent) + 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 extras_image-attachments_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasImageAttachmentsList Call to super to allow for caching + ExtrasImageAttachmentsList Call to super to allow for caching */ func (a *Client) ExtrasImageAttachmentsList(params *ExtrasImageAttachmentsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsListOK, error) { // TODO: Validate the params before sending @@ -749,7 +982,7 @@ func (a *Client) ExtrasImageAttachmentsList(params *ExtrasImageAttachmentsListPa PathPattern: "/extras/image-attachments/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -759,12 +992,18 @@ func (a *Client) ExtrasImageAttachmentsList(params *ExtrasImageAttachmentsListPa if err != nil { return nil, err } - return result.(*ExtrasImageAttachmentsListOK), nil - + success, ok := result.(*ExtrasImageAttachmentsListOK) + 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 extras_image-attachments_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasImageAttachmentsPartialUpdate extras image attachments partial update API + ExtrasImageAttachmentsPartialUpdate extras image attachments partial update API */ func (a *Client) ExtrasImageAttachmentsPartialUpdate(params *ExtrasImageAttachmentsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -778,7 +1017,7 @@ func (a *Client) ExtrasImageAttachmentsPartialUpdate(params *ExtrasImageAttachme PathPattern: "/extras/image-attachments/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -788,12 +1027,18 @@ func (a *Client) ExtrasImageAttachmentsPartialUpdate(params *ExtrasImageAttachme if err != nil { return nil, err } - return result.(*ExtrasImageAttachmentsPartialUpdateOK), nil - + success, ok := result.(*ExtrasImageAttachmentsPartialUpdateOK) + 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 extras_image-attachments_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasImageAttachmentsRead Call to super to allow for caching + ExtrasImageAttachmentsRead Call to super to allow for caching */ func (a *Client) ExtrasImageAttachmentsRead(params *ExtrasImageAttachmentsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsReadOK, error) { // TODO: Validate the params before sending @@ -807,7 +1052,7 @@ func (a *Client) ExtrasImageAttachmentsRead(params *ExtrasImageAttachmentsReadPa PathPattern: "/extras/image-attachments/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -817,12 +1062,18 @@ func (a *Client) ExtrasImageAttachmentsRead(params *ExtrasImageAttachmentsReadPa if err != nil { return nil, err } - return result.(*ExtrasImageAttachmentsReadOK), nil - + success, ok := result.(*ExtrasImageAttachmentsReadOK) + 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 extras_image-attachments_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasImageAttachmentsUpdate extras image attachments update API + ExtrasImageAttachmentsUpdate extras image attachments update API */ func (a *Client) ExtrasImageAttachmentsUpdate(params *ExtrasImageAttachmentsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsUpdateOK, error) { // TODO: Validate the params before sending @@ -836,7 +1087,7 @@ func (a *Client) ExtrasImageAttachmentsUpdate(params *ExtrasImageAttachmentsUpda PathPattern: "/extras/image-attachments/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -846,12 +1097,18 @@ func (a *Client) ExtrasImageAttachmentsUpdate(params *ExtrasImageAttachmentsUpda if err != nil { return nil, err } - return result.(*ExtrasImageAttachmentsUpdateOK), nil - + success, ok := result.(*ExtrasImageAttachmentsUpdateOK) + 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 extras_image-attachments_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasObjectChangesList Retrieve a list of recent changes. + ExtrasObjectChangesList Retrieve a list of recent changes. */ func (a *Client) ExtrasObjectChangesList(params *ExtrasObjectChangesListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasObjectChangesListOK, error) { // TODO: Validate the params before sending @@ -865,7 +1122,7 @@ func (a *Client) ExtrasObjectChangesList(params *ExtrasObjectChangesListParams, PathPattern: "/extras/object-changes/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasObjectChangesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -875,12 +1132,18 @@ func (a *Client) ExtrasObjectChangesList(params *ExtrasObjectChangesListParams, if err != nil { return nil, err } - return result.(*ExtrasObjectChangesListOK), nil - + success, ok := result.(*ExtrasObjectChangesListOK) + 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 extras_object-changes_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasObjectChangesRead Retrieve a list of recent changes. + ExtrasObjectChangesRead Retrieve a list of recent changes. */ func (a *Client) ExtrasObjectChangesRead(params *ExtrasObjectChangesReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasObjectChangesReadOK, error) { // TODO: Validate the params before sending @@ -894,7 +1157,7 @@ func (a *Client) ExtrasObjectChangesRead(params *ExtrasObjectChangesReadParams, PathPattern: "/extras/object-changes/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasObjectChangesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -904,12 +1167,18 @@ func (a *Client) ExtrasObjectChangesRead(params *ExtrasObjectChangesReadParams, if err != nil { return nil, err } - return result.(*ExtrasObjectChangesReadOK), nil - + success, ok := result.(*ExtrasObjectChangesReadOK) + 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 extras_object-changes_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasReportsList Compile all reports and their related results (if any). Result data is deferred in the list view. + ExtrasReportsList Compile all reports and their related results (if any). Result data is deferred in the list view. */ func (a *Client) ExtrasReportsList(params *ExtrasReportsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasReportsListOK, error) { // TODO: Validate the params before sending @@ -923,7 +1192,7 @@ func (a *Client) ExtrasReportsList(params *ExtrasReportsListParams, authInfo run PathPattern: "/extras/reports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasReportsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -933,12 +1202,18 @@ func (a *Client) ExtrasReportsList(params *ExtrasReportsListParams, authInfo run if err != nil { return nil, err } - return result.(*ExtrasReportsListOK), nil - + success, ok := result.(*ExtrasReportsListOK) + 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 extras_reports_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasReportsRead Retrieve a single Report identified as "<module>.<report>". + ExtrasReportsRead Retrieve a single Report identified as "<module>.<report>". */ func (a *Client) ExtrasReportsRead(params *ExtrasReportsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasReportsReadOK, error) { // TODO: Validate the params before sending @@ -952,7 +1227,7 @@ func (a *Client) ExtrasReportsRead(params *ExtrasReportsReadParams, authInfo run PathPattern: "/extras/reports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasReportsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -962,12 +1237,18 @@ func (a *Client) ExtrasReportsRead(params *ExtrasReportsReadParams, authInfo run if err != nil { return nil, err } - return result.(*ExtrasReportsReadOK), nil - + success, ok := result.(*ExtrasReportsReadOK) + 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 extras_reports_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasReportsRun Run a Report and create a new ReportResult, overwriting any previous result for the Report. + ExtrasReportsRun Run a Report and create a new ReportResult, overwriting any previous result for the Report. */ func (a *Client) ExtrasReportsRun(params *ExtrasReportsRunParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasReportsRunCreated, error) { // TODO: Validate the params before sending @@ -981,7 +1262,7 @@ func (a *Client) ExtrasReportsRun(params *ExtrasReportsRunParams, authInfo runti PathPattern: "/extras/reports/{id}/run/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasReportsRunReader{formats: a.formats}, AuthInfo: authInfo, @@ -991,86 +1272,34 @@ func (a *Client) ExtrasReportsRun(params *ExtrasReportsRunParams, authInfo runti if err != nil { return nil, err } - return result.(*ExtrasReportsRunCreated), nil - -} - -/* -ExtrasTagsCreate extras tags create API -*/ -func (a *Client) ExtrasTagsCreate(params *ExtrasTagsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewExtrasTagsCreateParams() + success, ok := result.(*ExtrasReportsRunCreated) + if ok { + return success, nil } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "extras_tags_create", - Method: "POST", - PathPattern: "/extras/tags/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &ExtrasTagsCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*ExtrasTagsCreateCreated), 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 extras_reports_run: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasTagsDelete extras tags delete API + ExtrasScriptsList extras scripts list API */ -func (a *Client) ExtrasTagsDelete(params *ExtrasTagsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsDeleteNoContent, error) { +func (a *Client) ExtrasScriptsList(params *ExtrasScriptsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasScriptsListOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewExtrasTagsDeleteParams() + params = NewExtrasScriptsListParams() } result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "extras_tags_delete", - Method: "DELETE", - PathPattern: "/extras/tags/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &ExtrasTagsDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*ExtrasTagsDeleteNoContent), nil - -} - -/* -ExtrasTagsList Call to super to allow for caching -*/ -func (a *Client) ExtrasTagsList(params *ExtrasTagsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewExtrasTagsListParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "extras_tags_list", + ID: "extras_scripts_list", Method: "GET", - PathPattern: "/extras/tags/", + PathPattern: "/extras/scripts/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &ExtrasTagsListReader{formats: a.formats}, + Reader: &ExtrasScriptsListReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1078,57 +1307,34 @@ func (a *Client) ExtrasTagsList(params *ExtrasTagsListParams, authInfo runtime.C if err != nil { return nil, err } - return result.(*ExtrasTagsListOK), nil - -} - -/* -ExtrasTagsPartialUpdate extras tags partial update API -*/ -func (a *Client) ExtrasTagsPartialUpdate(params *ExtrasTagsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewExtrasTagsPartialUpdateParams() + success, ok := result.(*ExtrasScriptsListOK) + if ok { + return success, nil } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "extras_tags_partial_update", - Method: "PATCH", - PathPattern: "/extras/tags/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &ExtrasTagsPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*ExtrasTagsPartialUpdateOK), 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 extras_scripts_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasTagsRead Call to super to allow for caching + ExtrasScriptsRead extras scripts read API */ -func (a *Client) ExtrasTagsRead(params *ExtrasTagsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsReadOK, error) { +func (a *Client) ExtrasScriptsRead(params *ExtrasScriptsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasScriptsReadOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewExtrasTagsReadParams() + params = NewExtrasScriptsReadParams() } result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "extras_tags_read", + ID: "extras_scripts_read", Method: "GET", - PathPattern: "/extras/tags/{id}/", + PathPattern: "/extras/scripts/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &ExtrasTagsReadReader{formats: a.formats}, + Reader: &ExtrasScriptsReadReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1136,57 +1342,34 @@ func (a *Client) ExtrasTagsRead(params *ExtrasTagsReadParams, authInfo runtime.C if err != nil { return nil, err } - return result.(*ExtrasTagsReadOK), nil - -} - -/* -ExtrasTagsUpdate extras tags update API -*/ -func (a *Client) ExtrasTagsUpdate(params *ExtrasTagsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewExtrasTagsUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "extras_tags_update", - Method: "PUT", - PathPattern: "/extras/tags/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &ExtrasTagsUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err + success, ok := result.(*ExtrasScriptsReadOK) + if ok { + return success, nil } - return result.(*ExtrasTagsUpdateOK), 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 extras_scripts_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasTopologyMapsCreate extras topology maps create API + ExtrasTagsCreate extras tags create API */ -func (a *Client) ExtrasTopologyMapsCreate(params *ExtrasTopologyMapsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTopologyMapsCreateCreated, error) { +func (a *Client) ExtrasTagsCreate(params *ExtrasTagsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsCreateCreated, error) { // TODO: Validate the params before sending if params == nil { - params = NewExtrasTopologyMapsCreateParams() + params = NewExtrasTagsCreateParams() } result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "extras_topology-maps_create", + ID: "extras_tags_create", Method: "POST", - PathPattern: "/extras/topology-maps/", + PathPattern: "/extras/tags/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &ExtrasTopologyMapsCreateReader{formats: a.formats}, + Reader: &ExtrasTagsCreateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1194,28 +1377,34 @@ func (a *Client) ExtrasTopologyMapsCreate(params *ExtrasTopologyMapsCreateParams if err != nil { return nil, err } - return result.(*ExtrasTopologyMapsCreateCreated), nil - + success, ok := result.(*ExtrasTagsCreateCreated) + 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 extras_tags_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasTopologyMapsDelete extras topology maps delete API + ExtrasTagsDelete extras tags delete API */ -func (a *Client) ExtrasTopologyMapsDelete(params *ExtrasTopologyMapsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTopologyMapsDeleteNoContent, error) { +func (a *Client) ExtrasTagsDelete(params *ExtrasTagsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewExtrasTopologyMapsDeleteParams() + params = NewExtrasTagsDeleteParams() } result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "extras_topology-maps_delete", + ID: "extras_tags_delete", Method: "DELETE", - PathPattern: "/extras/topology-maps/{id}/", + PathPattern: "/extras/tags/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &ExtrasTopologyMapsDeleteReader{formats: a.formats}, + Reader: &ExtrasTagsDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1223,28 +1412,34 @@ func (a *Client) ExtrasTopologyMapsDelete(params *ExtrasTopologyMapsDeleteParams if err != nil { return nil, err } - return result.(*ExtrasTopologyMapsDeleteNoContent), nil - + success, ok := result.(*ExtrasTagsDeleteNoContent) + 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 extras_tags_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasTopologyMapsList Call to super to allow for caching + ExtrasTagsList Call to super to allow for caching */ -func (a *Client) ExtrasTopologyMapsList(params *ExtrasTopologyMapsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTopologyMapsListOK, error) { +func (a *Client) ExtrasTagsList(params *ExtrasTagsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsListOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewExtrasTopologyMapsListParams() + params = NewExtrasTagsListParams() } result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "extras_topology-maps_list", + ID: "extras_tags_list", Method: "GET", - PathPattern: "/extras/topology-maps/", + PathPattern: "/extras/tags/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &ExtrasTopologyMapsListReader{formats: a.formats}, + Reader: &ExtrasTagsListReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1252,28 +1447,34 @@ func (a *Client) ExtrasTopologyMapsList(params *ExtrasTopologyMapsListParams, au if err != nil { return nil, err } - return result.(*ExtrasTopologyMapsListOK), nil - + success, ok := result.(*ExtrasTagsListOK) + 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 extras_tags_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasTopologyMapsPartialUpdate extras topology maps partial update API + ExtrasTagsPartialUpdate extras tags partial update API */ -func (a *Client) ExtrasTopologyMapsPartialUpdate(params *ExtrasTopologyMapsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTopologyMapsPartialUpdateOK, error) { +func (a *Client) ExtrasTagsPartialUpdate(params *ExtrasTagsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewExtrasTopologyMapsPartialUpdateParams() + params = NewExtrasTagsPartialUpdateParams() } result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "extras_topology-maps_partial_update", + ID: "extras_tags_partial_update", Method: "PATCH", - PathPattern: "/extras/topology-maps/{id}/", + PathPattern: "/extras/tags/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &ExtrasTopologyMapsPartialUpdateReader{formats: a.formats}, + Reader: &ExtrasTagsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1281,57 +1482,34 @@ func (a *Client) ExtrasTopologyMapsPartialUpdate(params *ExtrasTopologyMapsParti if err != nil { return nil, err } - return result.(*ExtrasTopologyMapsPartialUpdateOK), nil - -} - -/* -ExtrasTopologyMapsRead Call to super to allow for caching -*/ -func (a *Client) ExtrasTopologyMapsRead(params *ExtrasTopologyMapsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTopologyMapsReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewExtrasTopologyMapsReadParams() + success, ok := result.(*ExtrasTagsPartialUpdateOK) + if ok { + return success, nil } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "extras_topology-maps_read", - Method: "GET", - PathPattern: "/extras/topology-maps/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &ExtrasTopologyMapsReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*ExtrasTopologyMapsReadOK), nil - + // 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 extras_tags_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasTopologyMapsRender extras topology maps render API + ExtrasTagsRead Call to super to allow for caching */ -func (a *Client) ExtrasTopologyMapsRender(params *ExtrasTopologyMapsRenderParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTopologyMapsRenderOK, error) { +func (a *Client) ExtrasTagsRead(params *ExtrasTagsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsReadOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewExtrasTopologyMapsRenderParams() + params = NewExtrasTagsReadParams() } result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "extras_topology-maps_render", + ID: "extras_tags_read", Method: "GET", - PathPattern: "/extras/topology-maps/{id}/render/", + PathPattern: "/extras/tags/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &ExtrasTopologyMapsRenderReader{formats: a.formats}, + Reader: &ExtrasTagsReadReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1339,28 +1517,34 @@ func (a *Client) ExtrasTopologyMapsRender(params *ExtrasTopologyMapsRenderParams if err != nil { return nil, err } - return result.(*ExtrasTopologyMapsRenderOK), nil - + success, ok := result.(*ExtrasTagsReadOK) + 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 extras_tags_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -ExtrasTopologyMapsUpdate extras topology maps update API + ExtrasTagsUpdate extras tags update API */ -func (a *Client) ExtrasTopologyMapsUpdate(params *ExtrasTopologyMapsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTopologyMapsUpdateOK, error) { +func (a *Client) ExtrasTagsUpdate(params *ExtrasTagsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTagsUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewExtrasTopologyMapsUpdateParams() + params = NewExtrasTagsUpdateParams() } result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "extras_topology-maps_update", + ID: "extras_tags_update", Method: "PUT", - PathPattern: "/extras/topology-maps/{id}/", + PathPattern: "/extras/tags/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &ExtrasTopologyMapsUpdateReader{formats: a.formats}, + Reader: &ExtrasTagsUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1368,8 +1552,14 @@ func (a *Client) ExtrasTopologyMapsUpdate(params *ExtrasTopologyMapsUpdateParams if err != nil { return nil, err } - return result.(*ExtrasTopologyMapsUpdateOK), nil - + success, ok := result.(*ExtrasTagsUpdateOK) + 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 extras_tags_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 diff --git a/netbox/client/extras/extras_config_contexts_create_parameters.go b/netbox/client/extras/extras_config_contexts_create_parameters.go index 173b9a901330e234e83f7127d087980e959cd968..653fc259b6c1bcf29da33006b2180d5be11c97ac 100644 --- a/netbox/client/extras/extras_config_contexts_create_parameters.go +++ b/netbox/client/extras/extras_config_contexts_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasConfigContextsCreateParams creates a new ExtrasConfigContextsCreateParams object diff --git a/netbox/client/extras/extras_config_contexts_create_responses.go b/netbox/client/extras/extras_config_contexts_create_responses.go index bad671168749a071cef553bf633f1c4e9dd33882..e9d5f46337df65e749797d4e3b84588afd90eb99 100644 --- a/netbox/client/extras/extras_config_contexts_create_responses.go +++ b/netbox/client/extras/extras_config_contexts_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasConfigContextsCreateReader is a Reader for the ExtrasConfigContextsCreate structure. @@ -38,7 +39,6 @@ type ExtrasConfigContextsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasConfigContextsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewExtrasConfigContextsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasConfigContextsCreateCreated) Error() string { return fmt.Sprintf("[POST /extras/config-contexts/][%d] extrasConfigContextsCreateCreated %+v", 201, o.Payload) } +func (o *ExtrasConfigContextsCreateCreated) GetPayload() *models.ConfigContext { + return o.Payload +} + func (o *ExtrasConfigContextsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConfigContext) diff --git a/netbox/client/extras/extras_config_contexts_delete_parameters.go b/netbox/client/extras/extras_config_contexts_delete_parameters.go index 022fabbd664a3b16766b2f2804f705fbd4c5d3dd..13fc69cab11bb69052a82e5965a857a936573b81 100644 --- a/netbox/client/extras/extras_config_contexts_delete_parameters.go +++ b/netbox/client/extras/extras_config_contexts_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_config_contexts_delete_responses.go b/netbox/client/extras/extras_config_contexts_delete_responses.go index 8d1e25f2a0ebd02395599a62b9449363ff7122d4..1304c75728dd3c7603c811c2c162fcbe368dab87 100644 --- a/netbox/client/extras/extras_config_contexts_delete_responses.go +++ b/netbox/client/extras/extras_config_contexts_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -35,7 +36,6 @@ type ExtrasConfigContextsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasConfigContextsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewExtrasConfigContextsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/extras/extras_config_contexts_list_parameters.go b/netbox/client/extras/extras_config_contexts_list_parameters.go index 7a1151010f0bc66b211f14561b194196504e79e8..dce0b05be14f984f636513365a5a0130b8d4fc2a 100644 --- a/netbox/client/extras/extras_config_contexts_list_parameters.go +++ b/netbox/client/extras/extras_config_contexts_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -108,6 +109,8 @@ type ExtrasConfigContextsListParams struct { Site *string /*SiteID*/ SiteID *string + /*Tag*/ + Tag *string /*Tenant*/ Tenant *string /*TenantGroup*/ @@ -298,6 +301,17 @@ func (o *ExtrasConfigContextsListParams) SetSiteID(siteID *string) { o.SiteID = siteID } +// WithTag adds the tag to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithTag(tag *string) *ExtrasConfigContextsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetTag(tag *string) { + o.Tag = tag +} + // WithTenant adds the tenant to the extras config contexts list params func (o *ExtrasConfigContextsListParams) WithTenant(tenant *string) *ExtrasConfigContextsListParams { o.SetTenant(tenant) @@ -558,6 +572,22 @@ func (o *ExtrasConfigContextsListParams) WriteToRequest(r runtime.ClientRequest, } + 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.Tenant != nil { // query param tenant diff --git a/netbox/client/extras/extras_config_contexts_list_responses.go b/netbox/client/extras/extras_config_contexts_list_responses.go index dd81c72ab162649858526bbf99fd749f7d772166..57b11e4518ca6a0f9373c0a6bf67c9c2fcc2ca8a 100644 --- a/netbox/client/extras/extras_config_contexts_list_responses.go +++ b/netbox/client/extras/extras_config_contexts_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasConfigContextsListReader is a Reader for the ExtrasConfigContextsList structure. @@ -42,7 +43,6 @@ type ExtrasConfigContextsListReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasConfigContextsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasConfigContextsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *ExtrasConfigContextsListOK) Error() string { return fmt.Sprintf("[GET /extras/config-contexts/][%d] extrasConfigContextsListOK %+v", 200, o.Payload) } +func (o *ExtrasConfigContextsListOK) GetPayload() *ExtrasConfigContextsListOKBody { + return o.Payload +} + func (o *ExtrasConfigContextsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(ExtrasConfigContextsListOKBody) diff --git a/netbox/client/extras/extras_config_contexts_partial_update_parameters.go b/netbox/client/extras/extras_config_contexts_partial_update_parameters.go index abd6e3bf8a4fb979d81f90ebb338c56c37609e7b..7aee69ad946583c2de82c70212bc5a040c41773a 100644 --- a/netbox/client/extras/extras_config_contexts_partial_update_parameters.go +++ b/netbox/client/extras/extras_config_contexts_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasConfigContextsPartialUpdateParams creates a new ExtrasConfigContextsPartialUpdateParams object diff --git a/netbox/client/extras/extras_config_contexts_partial_update_responses.go b/netbox/client/extras/extras_config_contexts_partial_update_responses.go index 1b9b0104a45ecc164063d38603a25301985cc750..5e12652108fc035a627c1cb122b6f7248ec24f1a 100644 --- a/netbox/client/extras/extras_config_contexts_partial_update_responses.go +++ b/netbox/client/extras/extras_config_contexts_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasConfigContextsPartialUpdateReader is a Reader for the ExtrasConfigContextsPartialUpdate structure. @@ -38,7 +39,6 @@ type ExtrasConfigContextsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasConfigContextsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasConfigContextsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasConfigContextsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /extras/config-contexts/{id}/][%d] extrasConfigContextsPartialUpdateOK %+v", 200, o.Payload) } +func (o *ExtrasConfigContextsPartialUpdateOK) GetPayload() *models.ConfigContext { + return o.Payload +} + func (o *ExtrasConfigContextsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConfigContext) diff --git a/netbox/client/extras/extras_config_contexts_read_parameters.go b/netbox/client/extras/extras_config_contexts_read_parameters.go index b3fa3545f7b418c372d309b61a7df870d345b263..4d9daeb37299cff03e1b26b6b1d1666186aad2a3 100644 --- a/netbox/client/extras/extras_config_contexts_read_parameters.go +++ b/netbox/client/extras/extras_config_contexts_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_config_contexts_read_responses.go b/netbox/client/extras/extras_config_contexts_read_responses.go index 4ecbfe5ab53c915f831560d9a0a820e3083cf4ef..5832172314de9615a331f66bd68905c28c8b0605 100644 --- a/netbox/client/extras/extras_config_contexts_read_responses.go +++ b/netbox/client/extras/extras_config_contexts_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasConfigContextsReadReader is a Reader for the ExtrasConfigContextsRead structure. @@ -38,7 +39,6 @@ type ExtrasConfigContextsReadReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasConfigContextsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasConfigContextsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasConfigContextsReadOK) Error() string { return fmt.Sprintf("[GET /extras/config-contexts/{id}/][%d] extrasConfigContextsReadOK %+v", 200, o.Payload) } +func (o *ExtrasConfigContextsReadOK) GetPayload() *models.ConfigContext { + return o.Payload +} + func (o *ExtrasConfigContextsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConfigContext) diff --git a/netbox/client/extras/extras_config_contexts_update_parameters.go b/netbox/client/extras/extras_config_contexts_update_parameters.go index bea114c4b04307ca4f483acf172131771ce54145..bb3e6ba3f9b4cc390676b9b6dfcea10aa8f36f4c 100644 --- a/netbox/client/extras/extras_config_contexts_update_parameters.go +++ b/netbox/client/extras/extras_config_contexts_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasConfigContextsUpdateParams creates a new ExtrasConfigContextsUpdateParams object diff --git a/netbox/client/extras/extras_config_contexts_update_responses.go b/netbox/client/extras/extras_config_contexts_update_responses.go index 7e40216607d3b5d5ea3655c11c7a62b9b2250233..2d7a7469b77eaf0ca8a0148b614219bc28686251 100644 --- a/netbox/client/extras/extras_config_contexts_update_responses.go +++ b/netbox/client/extras/extras_config_contexts_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasConfigContextsUpdateReader is a Reader for the ExtrasConfigContextsUpdate structure. @@ -38,7 +39,6 @@ type ExtrasConfigContextsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasConfigContextsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasConfigContextsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasConfigContextsUpdateOK) Error() string { return fmt.Sprintf("[PUT /extras/config-contexts/{id}/][%d] extrasConfigContextsUpdateOK %+v", 200, o.Payload) } +func (o *ExtrasConfigContextsUpdateOK) GetPayload() *models.ConfigContext { + return o.Payload +} + func (o *ExtrasConfigContextsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ConfigContext) diff --git a/netbox/client/extras/extras_custom_field_choices_list_parameters.go b/netbox/client/extras/extras_custom_field_choices_list_parameters.go index c8f737c11074c9cfa3c9f25d6d7971650568d24d..2f3c75f5d9d5af3b6beb78a934c1d168f9661ba3 100644 --- a/netbox/client/extras/extras_custom_field_choices_list_parameters.go +++ b/netbox/client/extras/extras_custom_field_choices_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_custom_field_choices_list_responses.go b/netbox/client/extras/extras_custom_field_choices_list_responses.go index 8ebf6da73a46b0b5e7af45f207e2484a011487c4..f20ba90e7207fe014b78e34dbad8ebc7e583ae91 100644 --- a/netbox/client/extras/extras_custom_field_choices_list_responses.go +++ b/netbox/client/extras/extras_custom_field_choices_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -35,7 +36,6 @@ type ExtrasCustomFieldChoicesListReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasCustomFieldChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasCustomFieldChoicesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/extras/extras_custom_field_choices_read_parameters.go b/netbox/client/extras/extras_custom_field_choices_read_parameters.go index 9812423d00a2f90c4ac57e387c2da55879fdd4db..aa941f7c3cbb8e56f0b4eef6e950afbe52a1e6b9 100644 --- a/netbox/client/extras/extras_custom_field_choices_read_parameters.go +++ b/netbox/client/extras/extras_custom_field_choices_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_custom_field_choices_read_responses.go b/netbox/client/extras/extras_custom_field_choices_read_responses.go index a1a673d592ebf28085c5f92250bfe6769accb80b..78f73d52bc6f7739fe2dae1d1790bc47591ff55d 100644 --- a/netbox/client/extras/extras_custom_field_choices_read_responses.go +++ b/netbox/client/extras/extras_custom_field_choices_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -35,7 +36,6 @@ type ExtrasCustomFieldChoicesReadReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasCustomFieldChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasCustomFieldChoicesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/extras/extras_export_templates_create_parameters.go b/netbox/client/extras/extras_export_templates_create_parameters.go index 8bdda6f86625c89df742dbf2445a590aff5ceb4d..c10f0ad90931ae1851f6cdd55b638352d43e6f2f 100644 --- a/netbox/client/extras/extras_export_templates_create_parameters.go +++ b/netbox/client/extras/extras_export_templates_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasExportTemplatesCreateParams creates a new ExtrasExportTemplatesCreateParams object diff --git a/netbox/client/extras/extras_export_templates_create_responses.go b/netbox/client/extras/extras_export_templates_create_responses.go index 7b98415edff8e0cf101089c88087c9909a5b3d7d..9bd381fc6911198843bbe70c1b2487bfa03e423b 100644 --- a/netbox/client/extras/extras_export_templates_create_responses.go +++ b/netbox/client/extras/extras_export_templates_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasExportTemplatesCreateReader is a Reader for the ExtrasExportTemplatesCreate structure. @@ -38,7 +39,6 @@ type ExtrasExportTemplatesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasExportTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewExtrasExportTemplatesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasExportTemplatesCreateCreated) Error() string { return fmt.Sprintf("[POST /extras/export-templates/][%d] extrasExportTemplatesCreateCreated %+v", 201, o.Payload) } +func (o *ExtrasExportTemplatesCreateCreated) GetPayload() *models.ExportTemplate { + return o.Payload +} + func (o *ExtrasExportTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ExportTemplate) diff --git a/netbox/client/extras/extras_export_templates_delete_parameters.go b/netbox/client/extras/extras_export_templates_delete_parameters.go index 396886e48cbe9088e26fb1066e5d3f185699c4a9..1b4bf1bf5b48074430b76715e4c376c9b602ca5d 100644 --- a/netbox/client/extras/extras_export_templates_delete_parameters.go +++ b/netbox/client/extras/extras_export_templates_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_export_templates_delete_responses.go b/netbox/client/extras/extras_export_templates_delete_responses.go index b8e60bbc3aa17b60ec22a988981412dac9522e31..50e2f0d00ad6b2dd76d2d4efe5a4d562583aa1b3 100644 --- a/netbox/client/extras/extras_export_templates_delete_responses.go +++ b/netbox/client/extras/extras_export_templates_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -35,7 +36,6 @@ type ExtrasExportTemplatesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasExportTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewExtrasExportTemplatesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/extras/extras_export_templates_list_parameters.go b/netbox/client/extras/extras_export_templates_list_parameters.go index 756312c4832f510233ec2f163154906d96f7287c..18e2f81898eae2eaea43816510743a2fac1008e1 100644 --- a/netbox/client/extras/extras_export_templates_list_parameters.go +++ b/netbox/client/extras/extras_export_templates_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_export_templates_list_responses.go b/netbox/client/extras/extras_export_templates_list_responses.go index eb6a52e463578fbc6b31ac3af407aacca417f0bc..c195f16c95553d5bbfe0e8160bf92395918919c7 100644 --- a/netbox/client/extras/extras_export_templates_list_responses.go +++ b/netbox/client/extras/extras_export_templates_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasExportTemplatesListReader is a Reader for the ExtrasExportTemplatesList structure. @@ -42,7 +43,6 @@ type ExtrasExportTemplatesListReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasExportTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasExportTemplatesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *ExtrasExportTemplatesListOK) Error() string { return fmt.Sprintf("[GET /extras/export-templates/][%d] extrasExportTemplatesListOK %+v", 200, o.Payload) } +func (o *ExtrasExportTemplatesListOK) GetPayload() *ExtrasExportTemplatesListOKBody { + return o.Payload +} + func (o *ExtrasExportTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(ExtrasExportTemplatesListOKBody) diff --git a/netbox/client/extras/extras_export_templates_partial_update_parameters.go b/netbox/client/extras/extras_export_templates_partial_update_parameters.go index 53993664c7b6317eadcf310a5dc76f6f93b57dfa..9e7191584fa2e7a81c95ca985d545987f08b66a1 100644 --- a/netbox/client/extras/extras_export_templates_partial_update_parameters.go +++ b/netbox/client/extras/extras_export_templates_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasExportTemplatesPartialUpdateParams creates a new ExtrasExportTemplatesPartialUpdateParams object diff --git a/netbox/client/extras/extras_export_templates_partial_update_responses.go b/netbox/client/extras/extras_export_templates_partial_update_responses.go index 08f7e9bc3a10b54a3e2d605c3e188cdf24bd914d..2eb667bde7a04950d20238baec426947376ef339 100644 --- a/netbox/client/extras/extras_export_templates_partial_update_responses.go +++ b/netbox/client/extras/extras_export_templates_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasExportTemplatesPartialUpdateReader is a Reader for the ExtrasExportTemplatesPartialUpdate structure. @@ -38,7 +39,6 @@ type ExtrasExportTemplatesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasExportTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasExportTemplatesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasExportTemplatesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /extras/export-templates/{id}/][%d] extrasExportTemplatesPartialUpdateOK %+v", 200, o.Payload) } +func (o *ExtrasExportTemplatesPartialUpdateOK) GetPayload() *models.ExportTemplate { + return o.Payload +} + func (o *ExtrasExportTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ExportTemplate) diff --git a/netbox/client/extras/extras_export_templates_read_parameters.go b/netbox/client/extras/extras_export_templates_read_parameters.go index c3d94b224e1227af9ee292e87309c9aaed682d25..2899be4f1e1230477194e4715dee7f45a313808f 100644 --- a/netbox/client/extras/extras_export_templates_read_parameters.go +++ b/netbox/client/extras/extras_export_templates_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_export_templates_read_responses.go b/netbox/client/extras/extras_export_templates_read_responses.go index df18fa6c6e688617f53313ba734ee96e16127705..ffeb453f63911396ab05d545d3bf2c74dbc04fc2 100644 --- a/netbox/client/extras/extras_export_templates_read_responses.go +++ b/netbox/client/extras/extras_export_templates_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasExportTemplatesReadReader is a Reader for the ExtrasExportTemplatesRead structure. @@ -38,7 +39,6 @@ type ExtrasExportTemplatesReadReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasExportTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasExportTemplatesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasExportTemplatesReadOK) Error() string { return fmt.Sprintf("[GET /extras/export-templates/{id}/][%d] extrasExportTemplatesReadOK %+v", 200, o.Payload) } +func (o *ExtrasExportTemplatesReadOK) GetPayload() *models.ExportTemplate { + return o.Payload +} + func (o *ExtrasExportTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ExportTemplate) diff --git a/netbox/client/extras/extras_export_templates_update_parameters.go b/netbox/client/extras/extras_export_templates_update_parameters.go index d1850dd6f37a7e1d997b1a71618b6dac2cb40c80..1d3409db073c065aefc93e7ad13d0aade2592679 100644 --- a/netbox/client/extras/extras_export_templates_update_parameters.go +++ b/netbox/client/extras/extras_export_templates_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasExportTemplatesUpdateParams creates a new ExtrasExportTemplatesUpdateParams object diff --git a/netbox/client/extras/extras_export_templates_update_responses.go b/netbox/client/extras/extras_export_templates_update_responses.go index 4ab0a6e72c9f21e9224194fb4c32fbdad4ca0957..c7427b3aa90a467e41427ada2d5c7ce0736cadf1 100644 --- a/netbox/client/extras/extras_export_templates_update_responses.go +++ b/netbox/client/extras/extras_export_templates_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasExportTemplatesUpdateReader is a Reader for the ExtrasExportTemplatesUpdate structure. @@ -38,7 +39,6 @@ type ExtrasExportTemplatesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasExportTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasExportTemplatesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasExportTemplatesUpdateOK) Error() string { return fmt.Sprintf("[PUT /extras/export-templates/{id}/][%d] extrasExportTemplatesUpdateOK %+v", 200, o.Payload) } +func (o *ExtrasExportTemplatesUpdateOK) GetPayload() *models.ExportTemplate { + return o.Payload +} + func (o *ExtrasExportTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ExportTemplate) diff --git a/netbox/client/extras/extras_graphs_create_parameters.go b/netbox/client/extras/extras_graphs_create_parameters.go index 1108183adf486eb45526a82c891750d1c668645b..e256fb8b84eb461b76983da9834459b76d2b44b7 100644 --- a/netbox/client/extras/extras_graphs_create_parameters.go +++ b/netbox/client/extras/extras_graphs_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasGraphsCreateParams creates a new ExtrasGraphsCreateParams object @@ -78,7 +79,7 @@ for the extras graphs create operation typically these are written to a http.Req type ExtrasGraphsCreateParams struct { /*Data*/ - Data *models.WritableGraph + Data *models.Graph timeout time.Duration Context context.Context @@ -119,13 +120,13 @@ func (o *ExtrasGraphsCreateParams) SetHTTPClient(client *http.Client) { } // WithData adds the data to the extras graphs create params -func (o *ExtrasGraphsCreateParams) WithData(data *models.WritableGraph) *ExtrasGraphsCreateParams { +func (o *ExtrasGraphsCreateParams) WithData(data *models.Graph) *ExtrasGraphsCreateParams { o.SetData(data) return o } // SetData adds the data to the extras graphs create params -func (o *ExtrasGraphsCreateParams) SetData(data *models.WritableGraph) { +func (o *ExtrasGraphsCreateParams) SetData(data *models.Graph) { o.Data = data } diff --git a/netbox/client/extras/extras_graphs_create_responses.go b/netbox/client/extras/extras_graphs_create_responses.go index e61913c422f34d9001502d297bcda68ca158d9b5..a48cbe5afa4e8683251be73303a340a74f384d7d 100644 --- a/netbox/client/extras/extras_graphs_create_responses.go +++ b/netbox/client/extras/extras_graphs_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasGraphsCreateReader is a Reader for the ExtrasGraphsCreate structure. @@ -38,7 +39,6 @@ type ExtrasGraphsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasGraphsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewExtrasGraphsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasGraphsCreateCreated) Error() string { return fmt.Sprintf("[POST /extras/graphs/][%d] extrasGraphsCreateCreated %+v", 201, o.Payload) } +func (o *ExtrasGraphsCreateCreated) GetPayload() *models.Graph { + return o.Payload +} + func (o *ExtrasGraphsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Graph) diff --git a/netbox/client/extras/extras_graphs_delete_parameters.go b/netbox/client/extras/extras_graphs_delete_parameters.go index ac684b51fb376e6ca3ebb1844f1ee59178e587d6..cac56592099d9f7575f40f76603652df84d21210 100644 --- a/netbox/client/extras/extras_graphs_delete_parameters.go +++ b/netbox/client/extras/extras_graphs_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_graphs_delete_responses.go b/netbox/client/extras/extras_graphs_delete_responses.go index 3033d7d2d6486c1b29f8cdb95cb0be9140dfcf3b..323fcd6cf868d6dfe6bca370f9fb32d476388b97 100644 --- a/netbox/client/extras/extras_graphs_delete_responses.go +++ b/netbox/client/extras/extras_graphs_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -35,7 +36,6 @@ type ExtrasGraphsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasGraphsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewExtrasGraphsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/extras/extras_graphs_list_parameters.go b/netbox/client/extras/extras_graphs_list_parameters.go index ac1eaa99f7eca83bab2a56142bdfdfb78516ee14..9d423e624f5554b4d04047ca60b8d608deff5dc3 100644 --- a/netbox/client/extras/extras_graphs_list_parameters.go +++ b/netbox/client/extras/extras_graphs_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -88,6 +89,8 @@ type ExtrasGraphsListParams struct { */ Offset *int64 + /*TemplateLanguage*/ + TemplateLanguage *string /*Type*/ Type *string @@ -162,6 +165,17 @@ func (o *ExtrasGraphsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithTemplateLanguage adds the templateLanguage to the extras graphs list params +func (o *ExtrasGraphsListParams) WithTemplateLanguage(templateLanguage *string) *ExtrasGraphsListParams { + o.SetTemplateLanguage(templateLanguage) + return o +} + +// SetTemplateLanguage adds the templateLanguage to the extras graphs list params +func (o *ExtrasGraphsListParams) SetTemplateLanguage(templateLanguage *string) { + o.TemplateLanguage = templateLanguage +} + // WithType adds the typeVar to the extras graphs list params func (o *ExtrasGraphsListParams) WithType(typeVar *string) *ExtrasGraphsListParams { o.SetType(typeVar) @@ -229,6 +243,22 @@ func (o *ExtrasGraphsListParams) WriteToRequest(r runtime.ClientRequest, reg str } + if o.TemplateLanguage != nil { + + // query param template_language + var qrTemplateLanguage string + if o.TemplateLanguage != nil { + qrTemplateLanguage = *o.TemplateLanguage + } + qTemplateLanguage := qrTemplateLanguage + if qTemplateLanguage != "" { + if err := r.SetQueryParam("template_language", qTemplateLanguage); err != nil { + return err + } + } + + } + if o.Type != nil { // query param type diff --git a/netbox/client/extras/extras_graphs_list_responses.go b/netbox/client/extras/extras_graphs_list_responses.go index f07db14ef11afcbfb5423a035664756396997876..72bd6278ea94e69b8c89a48e54b399180e8095e7 100644 --- a/netbox/client/extras/extras_graphs_list_responses.go +++ b/netbox/client/extras/extras_graphs_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasGraphsListReader is a Reader for the ExtrasGraphsList structure. @@ -42,7 +43,6 @@ type ExtrasGraphsListReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasGraphsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasGraphsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *ExtrasGraphsListOK) Error() string { return fmt.Sprintf("[GET /extras/graphs/][%d] extrasGraphsListOK %+v", 200, o.Payload) } +func (o *ExtrasGraphsListOK) GetPayload() *ExtrasGraphsListOKBody { + return o.Payload +} + func (o *ExtrasGraphsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(ExtrasGraphsListOKBody) diff --git a/netbox/client/extras/extras_graphs_partial_update_parameters.go b/netbox/client/extras/extras_graphs_partial_update_parameters.go index a60f5e4a0773fde734a1593290d9fb8e0046011e..b43d9be48c60224942ab2c4e3d73c362b7d0cd13 100644 --- a/netbox/client/extras/extras_graphs_partial_update_parameters.go +++ b/netbox/client/extras/extras_graphs_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasGraphsPartialUpdateParams creates a new ExtrasGraphsPartialUpdateParams object @@ -79,7 +80,7 @@ for the extras graphs partial update operation typically these are written to a type ExtrasGraphsPartialUpdateParams struct { /*Data*/ - Data *models.WritableGraph + Data *models.Graph /*ID A unique integer value identifying this graph. @@ -125,13 +126,13 @@ func (o *ExtrasGraphsPartialUpdateParams) SetHTTPClient(client *http.Client) { } // WithData adds the data to the extras graphs partial update params -func (o *ExtrasGraphsPartialUpdateParams) WithData(data *models.WritableGraph) *ExtrasGraphsPartialUpdateParams { +func (o *ExtrasGraphsPartialUpdateParams) WithData(data *models.Graph) *ExtrasGraphsPartialUpdateParams { o.SetData(data) return o } // SetData adds the data to the extras graphs partial update params -func (o *ExtrasGraphsPartialUpdateParams) SetData(data *models.WritableGraph) { +func (o *ExtrasGraphsPartialUpdateParams) SetData(data *models.Graph) { o.Data = data } diff --git a/netbox/client/extras/extras_graphs_partial_update_responses.go b/netbox/client/extras/extras_graphs_partial_update_responses.go index 4b51a137e33e9c716ca6b03782358de2ba60c5d3..b07174321d16097ca648567ca59c11f1a764513c 100644 --- a/netbox/client/extras/extras_graphs_partial_update_responses.go +++ b/netbox/client/extras/extras_graphs_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasGraphsPartialUpdateReader is a Reader for the ExtrasGraphsPartialUpdate structure. @@ -38,7 +39,6 @@ type ExtrasGraphsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasGraphsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasGraphsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasGraphsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /extras/graphs/{id}/][%d] extrasGraphsPartialUpdateOK %+v", 200, o.Payload) } +func (o *ExtrasGraphsPartialUpdateOK) GetPayload() *models.Graph { + return o.Payload +} + func (o *ExtrasGraphsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Graph) diff --git a/netbox/client/extras/extras_graphs_read_parameters.go b/netbox/client/extras/extras_graphs_read_parameters.go index 71bf073cacca81a845661093041a22b4336a5985..b511722c3220b067550590547e3af1c405f2056d 100644 --- a/netbox/client/extras/extras_graphs_read_parameters.go +++ b/netbox/client/extras/extras_graphs_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_graphs_read_responses.go b/netbox/client/extras/extras_graphs_read_responses.go index 0e69da237948814d5e1a35fe0a8578beb330f9fc..8ef35c4569a2ffeb1f14976ed220c270f79fa5ee 100644 --- a/netbox/client/extras/extras_graphs_read_responses.go +++ b/netbox/client/extras/extras_graphs_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasGraphsReadReader is a Reader for the ExtrasGraphsRead structure. @@ -38,7 +39,6 @@ type ExtrasGraphsReadReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasGraphsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasGraphsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasGraphsReadOK) Error() string { return fmt.Sprintf("[GET /extras/graphs/{id}/][%d] extrasGraphsReadOK %+v", 200, o.Payload) } +func (o *ExtrasGraphsReadOK) GetPayload() *models.Graph { + return o.Payload +} + func (o *ExtrasGraphsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Graph) diff --git a/netbox/client/extras/extras_graphs_update_parameters.go b/netbox/client/extras/extras_graphs_update_parameters.go index c7011d377ad5d82518e09d67c39c9ed924dbfe3d..fbfa114c4f9c440a0e4e545d09b8bfaa3dc24c54 100644 --- a/netbox/client/extras/extras_graphs_update_parameters.go +++ b/netbox/client/extras/extras_graphs_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasGraphsUpdateParams creates a new ExtrasGraphsUpdateParams object @@ -79,7 +80,7 @@ for the extras graphs update operation typically these are written to a http.Req type ExtrasGraphsUpdateParams struct { /*Data*/ - Data *models.WritableGraph + Data *models.Graph /*ID A unique integer value identifying this graph. @@ -125,13 +126,13 @@ func (o *ExtrasGraphsUpdateParams) SetHTTPClient(client *http.Client) { } // WithData adds the data to the extras graphs update params -func (o *ExtrasGraphsUpdateParams) WithData(data *models.WritableGraph) *ExtrasGraphsUpdateParams { +func (o *ExtrasGraphsUpdateParams) WithData(data *models.Graph) *ExtrasGraphsUpdateParams { o.SetData(data) return o } // SetData adds the data to the extras graphs update params -func (o *ExtrasGraphsUpdateParams) SetData(data *models.WritableGraph) { +func (o *ExtrasGraphsUpdateParams) SetData(data *models.Graph) { o.Data = data } diff --git a/netbox/client/extras/extras_graphs_update_responses.go b/netbox/client/extras/extras_graphs_update_responses.go index 2df15fab889943ddac23ada3cc50408bc1687781..50afb49b53f05af5673cb18fc4d8d6882029715e 100644 --- a/netbox/client/extras/extras_graphs_update_responses.go +++ b/netbox/client/extras/extras_graphs_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasGraphsUpdateReader is a Reader for the ExtrasGraphsUpdate structure. @@ -38,7 +39,6 @@ type ExtrasGraphsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasGraphsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasGraphsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasGraphsUpdateOK) Error() string { return fmt.Sprintf("[PUT /extras/graphs/{id}/][%d] extrasGraphsUpdateOK %+v", 200, o.Payload) } +func (o *ExtrasGraphsUpdateOK) GetPayload() *models.Graph { + return o.Payload +} + func (o *ExtrasGraphsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Graph) diff --git a/netbox/client/extras/extras_image_attachments_create_parameters.go b/netbox/client/extras/extras_image_attachments_create_parameters.go index ee859e633de667d04a0126900a2b9921d359eaa7..976b4e35af9de64bd8543c13c748fee8426d905e 100644 --- a/netbox/client/extras/extras_image_attachments_create_parameters.go +++ b/netbox/client/extras/extras_image_attachments_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasImageAttachmentsCreateParams creates a new ExtrasImageAttachmentsCreateParams object diff --git a/netbox/client/extras/extras_image_attachments_create_responses.go b/netbox/client/extras/extras_image_attachments_create_responses.go index d3dafa3d37e1a1049d0fe5a0bba59166e3701143..bce3c8845900e88d5e91033b98826dc221c3c3a1 100644 --- a/netbox/client/extras/extras_image_attachments_create_responses.go +++ b/netbox/client/extras/extras_image_attachments_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasImageAttachmentsCreateReader is a Reader for the ExtrasImageAttachmentsCreate structure. @@ -38,7 +39,6 @@ type ExtrasImageAttachmentsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasImageAttachmentsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewExtrasImageAttachmentsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasImageAttachmentsCreateCreated) Error() string { return fmt.Sprintf("[POST /extras/image-attachments/][%d] extrasImageAttachmentsCreateCreated %+v", 201, o.Payload) } +func (o *ExtrasImageAttachmentsCreateCreated) GetPayload() *models.ImageAttachment { + return o.Payload +} + func (o *ExtrasImageAttachmentsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ImageAttachment) diff --git a/netbox/client/extras/extras_image_attachments_delete_parameters.go b/netbox/client/extras/extras_image_attachments_delete_parameters.go index de8fab8ff2b20ffcdd8a80134babe02baf866a80..a2dc576caa1bc77e53a181d822d96202b5fd0a40 100644 --- a/netbox/client/extras/extras_image_attachments_delete_parameters.go +++ b/netbox/client/extras/extras_image_attachments_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_image_attachments_delete_responses.go b/netbox/client/extras/extras_image_attachments_delete_responses.go index 97c2ea0c20f9cbf7b16dd09c3e2b4777384db3c5..4b1af402ef631e2b370057cf99068e2385019ae5 100644 --- a/netbox/client/extras/extras_image_attachments_delete_responses.go +++ b/netbox/client/extras/extras_image_attachments_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -35,7 +36,6 @@ type ExtrasImageAttachmentsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasImageAttachmentsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewExtrasImageAttachmentsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/extras/extras_image_attachments_list_parameters.go b/netbox/client/extras/extras_image_attachments_list_parameters.go index 17e304661ee693dade29d65f253b8c59fa120735..b00114fc93051ad54ca73560dbde3075c292b176 100644 --- a/netbox/client/extras/extras_image_attachments_list_parameters.go +++ b/netbox/client/extras/extras_image_attachments_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_image_attachments_list_responses.go b/netbox/client/extras/extras_image_attachments_list_responses.go index b73e1e5edf5a932c6bf0e18b75e71ee449bf419f..e4894252e973cf6f66eefbaf8de6e4d99d464f88 100644 --- a/netbox/client/extras/extras_image_attachments_list_responses.go +++ b/netbox/client/extras/extras_image_attachments_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasImageAttachmentsListReader is a Reader for the ExtrasImageAttachmentsList structure. @@ -42,7 +43,6 @@ type ExtrasImageAttachmentsListReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasImageAttachmentsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasImageAttachmentsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *ExtrasImageAttachmentsListOK) Error() string { return fmt.Sprintf("[GET /extras/image-attachments/][%d] extrasImageAttachmentsListOK %+v", 200, o.Payload) } +func (o *ExtrasImageAttachmentsListOK) GetPayload() *ExtrasImageAttachmentsListOKBody { + return o.Payload +} + func (o *ExtrasImageAttachmentsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(ExtrasImageAttachmentsListOKBody) diff --git a/netbox/client/extras/extras_image_attachments_partial_update_parameters.go b/netbox/client/extras/extras_image_attachments_partial_update_parameters.go index e4dabef3b856e71cf5a260c900b0340980f516ef..a735046d1a45b76869b0a2a34b14e970878d926d 100644 --- a/netbox/client/extras/extras_image_attachments_partial_update_parameters.go +++ b/netbox/client/extras/extras_image_attachments_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasImageAttachmentsPartialUpdateParams creates a new ExtrasImageAttachmentsPartialUpdateParams object diff --git a/netbox/client/extras/extras_image_attachments_partial_update_responses.go b/netbox/client/extras/extras_image_attachments_partial_update_responses.go index d6fac1f63015427ebdd9c6cb0308b435f99887f9..530fe0dc472ca0dba4b0fe9b6a7deb63ad48977d 100644 --- a/netbox/client/extras/extras_image_attachments_partial_update_responses.go +++ b/netbox/client/extras/extras_image_attachments_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasImageAttachmentsPartialUpdateReader is a Reader for the ExtrasImageAttachmentsPartialUpdate structure. @@ -38,7 +39,6 @@ type ExtrasImageAttachmentsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasImageAttachmentsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasImageAttachmentsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasImageAttachmentsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /extras/image-attachments/{id}/][%d] extrasImageAttachmentsPartialUpdateOK %+v", 200, o.Payload) } +func (o *ExtrasImageAttachmentsPartialUpdateOK) GetPayload() *models.ImageAttachment { + return o.Payload +} + func (o *ExtrasImageAttachmentsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ImageAttachment) diff --git a/netbox/client/extras/extras_image_attachments_read_parameters.go b/netbox/client/extras/extras_image_attachments_read_parameters.go index 6385cff8fca912533ea144662da060dfdbf1a447..2f76f6512c130deecd5c7aaa09a412c0713d4795 100644 --- a/netbox/client/extras/extras_image_attachments_read_parameters.go +++ b/netbox/client/extras/extras_image_attachments_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_image_attachments_read_responses.go b/netbox/client/extras/extras_image_attachments_read_responses.go index 69f55a9ed5a777aaa2c7954a45cde817bda88a29..fd12b275f3cd195f27bc10687f0feb4fdd41d417 100644 --- a/netbox/client/extras/extras_image_attachments_read_responses.go +++ b/netbox/client/extras/extras_image_attachments_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasImageAttachmentsReadReader is a Reader for the ExtrasImageAttachmentsRead structure. @@ -38,7 +39,6 @@ type ExtrasImageAttachmentsReadReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasImageAttachmentsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasImageAttachmentsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasImageAttachmentsReadOK) Error() string { return fmt.Sprintf("[GET /extras/image-attachments/{id}/][%d] extrasImageAttachmentsReadOK %+v", 200, o.Payload) } +func (o *ExtrasImageAttachmentsReadOK) GetPayload() *models.ImageAttachment { + return o.Payload +} + func (o *ExtrasImageAttachmentsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ImageAttachment) diff --git a/netbox/client/extras/extras_image_attachments_update_parameters.go b/netbox/client/extras/extras_image_attachments_update_parameters.go index dc72b376930536e60cc5e48d8d7cc5791dac38c4..7208cbdcc1bdbba6b191a89cadea35f6081bd387 100644 --- a/netbox/client/extras/extras_image_attachments_update_parameters.go +++ b/netbox/client/extras/extras_image_attachments_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasImageAttachmentsUpdateParams creates a new ExtrasImageAttachmentsUpdateParams object diff --git a/netbox/client/extras/extras_image_attachments_update_responses.go b/netbox/client/extras/extras_image_attachments_update_responses.go index 9b50ace0d12e16b82135c043f23774e664d91a22..bcd6ceaf527612ec46e993c170436dd736c6af4b 100644 --- a/netbox/client/extras/extras_image_attachments_update_responses.go +++ b/netbox/client/extras/extras_image_attachments_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasImageAttachmentsUpdateReader is a Reader for the ExtrasImageAttachmentsUpdate structure. @@ -38,7 +39,6 @@ type ExtrasImageAttachmentsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasImageAttachmentsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasImageAttachmentsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasImageAttachmentsUpdateOK) Error() string { return fmt.Sprintf("[PUT /extras/image-attachments/{id}/][%d] extrasImageAttachmentsUpdateOK %+v", 200, o.Payload) } +func (o *ExtrasImageAttachmentsUpdateOK) GetPayload() *models.ImageAttachment { + return o.Payload +} + func (o *ExtrasImageAttachmentsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ImageAttachment) diff --git a/netbox/client/extras/extras_object_changes_list_parameters.go b/netbox/client/extras/extras_object_changes_list_parameters.go index a85ad5ec45204268b63e3f14ae7e5c334ad19db5..f822fd40197576ed0c5646c01c59c40714aa83e1 100644 --- a/netbox/client/extras/extras_object_changes_list_parameters.go +++ b/netbox/client/extras/extras_object_changes_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -78,6 +79,8 @@ type ExtrasObjectChangesListParams struct { /*Action*/ Action *string + /*ChangedObjectID*/ + ChangedObjectID *float64 /*ChangedObjectType*/ ChangedObjectType *string /*Limit @@ -152,6 +155,17 @@ func (o *ExtrasObjectChangesListParams) SetAction(action *string) { o.Action = action } +// WithChangedObjectID adds the changedObjectID to the extras object changes list params +func (o *ExtrasObjectChangesListParams) WithChangedObjectID(changedObjectID *float64) *ExtrasObjectChangesListParams { + o.SetChangedObjectID(changedObjectID) + return o +} + +// SetChangedObjectID adds the changedObjectId to the extras object changes list params +func (o *ExtrasObjectChangesListParams) SetChangedObjectID(changedObjectID *float64) { + o.ChangedObjectID = changedObjectID +} + // WithChangedObjectType adds the changedObjectType to the extras object changes list params func (o *ExtrasObjectChangesListParams) WithChangedObjectType(changedObjectType *string) *ExtrasObjectChangesListParams { o.SetChangedObjectType(changedObjectType) @@ -275,6 +289,22 @@ func (o *ExtrasObjectChangesListParams) WriteToRequest(r runtime.ClientRequest, } + if o.ChangedObjectID != nil { + + // query param changed_object_id + var qrChangedObjectID float64 + if o.ChangedObjectID != nil { + qrChangedObjectID = *o.ChangedObjectID + } + qChangedObjectID := swag.FormatFloat64(qrChangedObjectID) + if qChangedObjectID != "" { + if err := r.SetQueryParam("changed_object_id", qChangedObjectID); err != nil { + return err + } + } + + } + if o.ChangedObjectType != nil { // query param changed_object_type diff --git a/netbox/client/extras/extras_object_changes_list_responses.go b/netbox/client/extras/extras_object_changes_list_responses.go index c4fd031cf24e9fe1bfa261b53da99c03c6c2c666..5296e963734a13be1a29d77142ad51bd0d45d772 100644 --- a/netbox/client/extras/extras_object_changes_list_responses.go +++ b/netbox/client/extras/extras_object_changes_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasObjectChangesListReader is a Reader for the ExtrasObjectChangesList structure. @@ -42,7 +43,6 @@ type ExtrasObjectChangesListReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasObjectChangesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasObjectChangesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *ExtrasObjectChangesListOK) Error() string { return fmt.Sprintf("[GET /extras/object-changes/][%d] extrasObjectChangesListOK %+v", 200, o.Payload) } +func (o *ExtrasObjectChangesListOK) GetPayload() *ExtrasObjectChangesListOKBody { + return o.Payload +} + func (o *ExtrasObjectChangesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(ExtrasObjectChangesListOKBody) diff --git a/netbox/client/extras/extras_object_changes_read_parameters.go b/netbox/client/extras/extras_object_changes_read_parameters.go index acbacb80ad849fb210f653d5a10143bff5c0d8ad..1cbc4a71834ce986b54a678c5ee9451eb9c9e90b 100644 --- a/netbox/client/extras/extras_object_changes_read_parameters.go +++ b/netbox/client/extras/extras_object_changes_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_object_changes_read_responses.go b/netbox/client/extras/extras_object_changes_read_responses.go index 94416bd960631d6ed16a795f201cc18553bff28d..c8f538be1b671a5ff32cb460ca3d58bbbb4d10b6 100644 --- a/netbox/client/extras/extras_object_changes_read_responses.go +++ b/netbox/client/extras/extras_object_changes_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasObjectChangesReadReader is a Reader for the ExtrasObjectChangesRead structure. @@ -38,7 +39,6 @@ type ExtrasObjectChangesReadReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasObjectChangesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasObjectChangesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasObjectChangesReadOK) Error() string { return fmt.Sprintf("[GET /extras/object-changes/{id}/][%d] extrasObjectChangesReadOK %+v", 200, o.Payload) } +func (o *ExtrasObjectChangesReadOK) GetPayload() *models.ObjectChange { + return o.Payload +} + func (o *ExtrasObjectChangesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ObjectChange) diff --git a/netbox/client/extras/extras_reports_list_parameters.go b/netbox/client/extras/extras_reports_list_parameters.go index 11acdcf93a343c306fed074abca40f775bf6e1f7..1b8bc81f160f84f450e059801d72340495437d07 100644 --- a/netbox/client/extras/extras_reports_list_parameters.go +++ b/netbox/client/extras/extras_reports_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_reports_list_responses.go b/netbox/client/extras/extras_reports_list_responses.go index 172f4b2269bbb349bf0f0805c03d833f1c25ddc8..80c392be012a57e9bf58753bd4b7b45eb4157e06 100644 --- a/netbox/client/extras/extras_reports_list_responses.go +++ b/netbox/client/extras/extras_reports_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -35,7 +36,6 @@ type ExtrasReportsListReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasReportsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasReportsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/extras/extras_reports_read_parameters.go b/netbox/client/extras/extras_reports_read_parameters.go index dd28ccaea2f6498daad1a3fa0b3bba2b457c6f33..3814e93371b15d976fdb54b286a444efd805b3ae 100644 --- a/netbox/client/extras/extras_reports_read_parameters.go +++ b/netbox/client/extras/extras_reports_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_reports_read_responses.go b/netbox/client/extras/extras_reports_read_responses.go index 8db1a69949138b08c61fd848b1b45dc0843d7a5d..df5c5be7122ddf1b47eb59436f414125c1925ca1 100644 --- a/netbox/client/extras/extras_reports_read_responses.go +++ b/netbox/client/extras/extras_reports_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -35,7 +36,6 @@ type ExtrasReportsReadReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasReportsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasReportsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/extras/extras_reports_run_parameters.go b/netbox/client/extras/extras_reports_run_parameters.go index aa662136a7adfd3796e635698c635ea43bbb5253..916189ee0900e198eb17809baf27f853fc837b21 100644 --- a/netbox/client/extras/extras_reports_run_parameters.go +++ b/netbox/client/extras/extras_reports_run_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_reports_run_responses.go b/netbox/client/extras/extras_reports_run_responses.go index 994e80946d83b0955610d5ceabc33437ce1d67b4..94d912e71c7fc763a086571874100fc4221db7f0 100644 --- a/netbox/client/extras/extras_reports_run_responses.go +++ b/netbox/client/extras/extras_reports_run_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -35,7 +36,6 @@ type ExtrasReportsRunReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasReportsRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewExtrasReportsRunCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/extras/extras_scripts_list_parameters.go b/netbox/client/extras/extras_scripts_list_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..87cc9f73aaa9841a30b004a3aa2f4fa4a92d6e94 --- /dev/null +++ b/netbox/client/extras/extras_scripts_list_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2018 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package extras + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewExtrasScriptsListParams creates a new ExtrasScriptsListParams object +// with the default values initialized. +func NewExtrasScriptsListParams() *ExtrasScriptsListParams { + + return &ExtrasScriptsListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewExtrasScriptsListParamsWithTimeout creates a new ExtrasScriptsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewExtrasScriptsListParamsWithTimeout(timeout time.Duration) *ExtrasScriptsListParams { + + return &ExtrasScriptsListParams{ + + timeout: timeout, + } +} + +// NewExtrasScriptsListParamsWithContext creates a new ExtrasScriptsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewExtrasScriptsListParamsWithContext(ctx context.Context) *ExtrasScriptsListParams { + + return &ExtrasScriptsListParams{ + + Context: ctx, + } +} + +// NewExtrasScriptsListParamsWithHTTPClient creates a new ExtrasScriptsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewExtrasScriptsListParamsWithHTTPClient(client *http.Client) *ExtrasScriptsListParams { + + return &ExtrasScriptsListParams{ + HTTPClient: client, + } +} + +/*ExtrasScriptsListParams contains all the parameters to send to the API endpoint +for the extras scripts list operation typically these are written to a http.Request +*/ +type ExtrasScriptsListParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the extras scripts list params +func (o *ExtrasScriptsListParams) WithTimeout(timeout time.Duration) *ExtrasScriptsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the extras scripts list params +func (o *ExtrasScriptsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the extras scripts list params +func (o *ExtrasScriptsListParams) WithContext(ctx context.Context) *ExtrasScriptsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the extras scripts list params +func (o *ExtrasScriptsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the extras scripts list params +func (o *ExtrasScriptsListParams) WithHTTPClient(client *http.Client) *ExtrasScriptsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the extras scripts list params +func (o *ExtrasScriptsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ExtrasScriptsListParams) 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/extras/extras_scripts_list_responses.go b/netbox/client/extras/extras_scripts_list_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..e2715068677b519f80a5eb7e434e3e1e85ba8837 --- /dev/null +++ b/netbox/client/extras/extras_scripts_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2018 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package extras + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" +) + +// ExtrasScriptsListReader is a Reader for the ExtrasScriptsList structure. +type ExtrasScriptsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ExtrasScriptsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewExtrasScriptsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewExtrasScriptsListOK creates a ExtrasScriptsListOK with default headers values +func NewExtrasScriptsListOK() *ExtrasScriptsListOK { + return &ExtrasScriptsListOK{} +} + +/*ExtrasScriptsListOK handles this case with default header values. + +ExtrasScriptsListOK extras scripts list o k +*/ +type ExtrasScriptsListOK struct { +} + +func (o *ExtrasScriptsListOK) Error() string { + return fmt.Sprintf("[GET /extras/scripts/][%d] extrasScriptsListOK ", 200) +} + +func (o *ExtrasScriptsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/extras/extras_scripts_read_parameters.go b/netbox/client/extras/extras_scripts_read_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..571b1bb729ce78c11f110e3a92ac72c84bc7d46f --- /dev/null +++ b/netbox/client/extras/extras_scripts_read_parameters.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2018 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package extras + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewExtrasScriptsReadParams creates a new ExtrasScriptsReadParams object +// with the default values initialized. +func NewExtrasScriptsReadParams() *ExtrasScriptsReadParams { + var () + return &ExtrasScriptsReadParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewExtrasScriptsReadParamsWithTimeout creates a new ExtrasScriptsReadParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewExtrasScriptsReadParamsWithTimeout(timeout time.Duration) *ExtrasScriptsReadParams { + var () + return &ExtrasScriptsReadParams{ + + timeout: timeout, + } +} + +// NewExtrasScriptsReadParamsWithContext creates a new ExtrasScriptsReadParams object +// with the default values initialized, and the ability to set a context for a request +func NewExtrasScriptsReadParamsWithContext(ctx context.Context) *ExtrasScriptsReadParams { + var () + return &ExtrasScriptsReadParams{ + + Context: ctx, + } +} + +// NewExtrasScriptsReadParamsWithHTTPClient creates a new ExtrasScriptsReadParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewExtrasScriptsReadParamsWithHTTPClient(client *http.Client) *ExtrasScriptsReadParams { + var () + return &ExtrasScriptsReadParams{ + HTTPClient: client, + } +} + +/*ExtrasScriptsReadParams contains all the parameters to send to the API endpoint +for the extras scripts read operation typically these are written to a http.Request +*/ +type ExtrasScriptsReadParams struct { + + /*ID*/ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the extras scripts read params +func (o *ExtrasScriptsReadParams) WithTimeout(timeout time.Duration) *ExtrasScriptsReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the extras scripts read params +func (o *ExtrasScriptsReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the extras scripts read params +func (o *ExtrasScriptsReadParams) WithContext(ctx context.Context) *ExtrasScriptsReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the extras scripts read params +func (o *ExtrasScriptsReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the extras scripts read params +func (o *ExtrasScriptsReadParams) WithHTTPClient(client *http.Client) *ExtrasScriptsReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the extras scripts read params +func (o *ExtrasScriptsReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the extras scripts read params +func (o *ExtrasScriptsReadParams) WithID(id string) *ExtrasScriptsReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the extras scripts read params +func (o *ExtrasScriptsReadParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *ExtrasScriptsReadParams) 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/extras/extras_scripts_read_responses.go b/netbox/client/extras/extras_scripts_read_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..8ae7e88098fd1cf6469252a12a3a08128636d45e --- /dev/null +++ b/netbox/client/extras/extras_scripts_read_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2018 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package extras + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" +) + +// ExtrasScriptsReadReader is a Reader for the ExtrasScriptsRead structure. +type ExtrasScriptsReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ExtrasScriptsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewExtrasScriptsReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewExtrasScriptsReadOK creates a ExtrasScriptsReadOK with default headers values +func NewExtrasScriptsReadOK() *ExtrasScriptsReadOK { + return &ExtrasScriptsReadOK{} +} + +/*ExtrasScriptsReadOK handles this case with default header values. + +ExtrasScriptsReadOK extras scripts read o k +*/ +type ExtrasScriptsReadOK struct { +} + +func (o *ExtrasScriptsReadOK) Error() string { + return fmt.Sprintf("[GET /extras/scripts/{id}/][%d] extrasScriptsReadOK ", 200) +} + +func (o *ExtrasScriptsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/extras/extras_tags_create_parameters.go b/netbox/client/extras/extras_tags_create_parameters.go index 8a20a2a1211a101867da45ce5477568c45820be8..966c02277388353f6356a21214d80a75fe8f2351 100644 --- a/netbox/client/extras/extras_tags_create_parameters.go +++ b/netbox/client/extras/extras_tags_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasTagsCreateParams creates a new ExtrasTagsCreateParams object diff --git a/netbox/client/extras/extras_tags_create_responses.go b/netbox/client/extras/extras_tags_create_responses.go index 8b6cbac9c64f4591ad786eaf2c874b3c2741bdff..9b0c29f28a2a8b4ebf8467b48e43bd1e87748dfb 100644 --- a/netbox/client/extras/extras_tags_create_responses.go +++ b/netbox/client/extras/extras_tags_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasTagsCreateReader is a Reader for the ExtrasTagsCreate structure. @@ -38,7 +39,6 @@ type ExtrasTagsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasTagsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewExtrasTagsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasTagsCreateCreated) Error() string { return fmt.Sprintf("[POST /extras/tags/][%d] extrasTagsCreateCreated %+v", 201, o.Payload) } +func (o *ExtrasTagsCreateCreated) GetPayload() *models.Tag { + return o.Payload +} + func (o *ExtrasTagsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Tag) diff --git a/netbox/client/extras/extras_tags_delete_parameters.go b/netbox/client/extras/extras_tags_delete_parameters.go index 2811f2f42482af58e1492fc5c7669219499f26ee..8eb2e6e8705aed85b484b2a94d74ca1a1314dc32 100644 --- a/netbox/client/extras/extras_tags_delete_parameters.go +++ b/netbox/client/extras/extras_tags_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_tags_delete_responses.go b/netbox/client/extras/extras_tags_delete_responses.go index bc5e931fbb911c5574e06b914e1f18ce61929826..9ba22281515f52adb44dae4fbaf8ea9cf6dd4c8d 100644 --- a/netbox/client/extras/extras_tags_delete_responses.go +++ b/netbox/client/extras/extras_tags_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -35,7 +36,6 @@ type ExtrasTagsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasTagsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewExtrasTagsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/extras/extras_tags_list_parameters.go b/netbox/client/extras/extras_tags_list_parameters.go index 00942640b7a176c17adc538cf5d721b33711e1a8..b1a752ad2d5d92c6c96c53b1fd2b687f7b231a15 100644 --- a/netbox/client/extras/extras_tags_list_parameters.go +++ b/netbox/client/extras/extras_tags_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_tags_list_responses.go b/netbox/client/extras/extras_tags_list_responses.go index 7f7050313c1ee817fda85827793567f1afd0ffc4..7c93f15abab6686561a87c7f9da28ce97d941b63 100644 --- a/netbox/client/extras/extras_tags_list_responses.go +++ b/netbox/client/extras/extras_tags_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasTagsListReader is a Reader for the ExtrasTagsList structure. @@ -42,7 +43,6 @@ type ExtrasTagsListReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasTagsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasTagsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *ExtrasTagsListOK) Error() string { return fmt.Sprintf("[GET /extras/tags/][%d] extrasTagsListOK %+v", 200, o.Payload) } +func (o *ExtrasTagsListOK) GetPayload() *ExtrasTagsListOKBody { + return o.Payload +} + func (o *ExtrasTagsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(ExtrasTagsListOKBody) diff --git a/netbox/client/extras/extras_tags_partial_update_parameters.go b/netbox/client/extras/extras_tags_partial_update_parameters.go index 624de0e58f223cd90e2beef7cb8fe65b6291357f..8cb7edc1751be21a1ce462ea531167b33ef24a2a 100644 --- a/netbox/client/extras/extras_tags_partial_update_parameters.go +++ b/netbox/client/extras/extras_tags_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasTagsPartialUpdateParams creates a new ExtrasTagsPartialUpdateParams object diff --git a/netbox/client/extras/extras_tags_partial_update_responses.go b/netbox/client/extras/extras_tags_partial_update_responses.go index fcbfdb886543541845afede141738904731c1f88..e5b2906d767689e2a55dedd6581140708cf32c71 100644 --- a/netbox/client/extras/extras_tags_partial_update_responses.go +++ b/netbox/client/extras/extras_tags_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasTagsPartialUpdateReader is a Reader for the ExtrasTagsPartialUpdate structure. @@ -38,7 +39,6 @@ type ExtrasTagsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasTagsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasTagsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasTagsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /extras/tags/{id}/][%d] extrasTagsPartialUpdateOK %+v", 200, o.Payload) } +func (o *ExtrasTagsPartialUpdateOK) GetPayload() *models.Tag { + return o.Payload +} + func (o *ExtrasTagsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Tag) diff --git a/netbox/client/extras/extras_tags_read_parameters.go b/netbox/client/extras/extras_tags_read_parameters.go index 3009cf4242629b4fab3d8d9fa5d5439244b1168d..c249d37a591f83ef038c5ba8600cedee9f34180f 100644 --- a/netbox/client/extras/extras_tags_read_parameters.go +++ b/netbox/client/extras/extras_tags_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras diff --git a/netbox/client/extras/extras_tags_read_responses.go b/netbox/client/extras/extras_tags_read_responses.go index 1174a34eb954812b02ce7658fda353000d7daebb..375f05bf8195589d9f75ef15d347eb718f2eb858 100644 --- a/netbox/client/extras/extras_tags_read_responses.go +++ b/netbox/client/extras/extras_tags_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasTagsReadReader is a Reader for the ExtrasTagsRead structure. @@ -38,7 +39,6 @@ type ExtrasTagsReadReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasTagsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasTagsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasTagsReadOK) Error() string { return fmt.Sprintf("[GET /extras/tags/{id}/][%d] extrasTagsReadOK %+v", 200, o.Payload) } +func (o *ExtrasTagsReadOK) GetPayload() *models.Tag { + return o.Payload +} + func (o *ExtrasTagsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Tag) diff --git a/netbox/client/extras/extras_tags_update_parameters.go b/netbox/client/extras/extras_tags_update_parameters.go index 4fae0c47e7810a3c3b978b37d0c401cfd20ff31e..9bc3ec0bcea46c60507a03ed35062b437e9dc0b2 100644 --- a/netbox/client/extras/extras_tags_update_parameters.go +++ b/netbox/client/extras/extras_tags_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewExtrasTagsUpdateParams creates a new ExtrasTagsUpdateParams object diff --git a/netbox/client/extras/extras_tags_update_responses.go b/netbox/client/extras/extras_tags_update_responses.go index 16ac2d8b01aea2c54bd0fadc163355d680e02776..38841278c9305cbdc9b1b7cc5c76eafe0a32def2 100644 --- a/netbox/client/extras/extras_tags_update_responses.go +++ b/netbox/client/extras/extras_tags_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package extras @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // ExtrasTagsUpdateReader is a Reader for the ExtrasTagsUpdate structure. @@ -38,7 +39,6 @@ type ExtrasTagsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *ExtrasTagsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExtrasTagsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *ExtrasTagsUpdateOK) Error() string { return fmt.Sprintf("[PUT /extras/tags/{id}/][%d] extrasTagsUpdateOK %+v", 200, o.Payload) } +func (o *ExtrasTagsUpdateOK) GetPayload() *models.Tag { + return o.Payload +} + func (o *ExtrasTagsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Tag) diff --git a/netbox/client/extras/extras_topology_maps_create_parameters.go b/netbox/client/extras/extras_topology_maps_create_parameters.go deleted file mode 100644 index 1ee30c784d97689791c0595aa32b4e8f2b8cefd6..0000000000000000000000000000000000000000 --- a/netbox/client/extras/extras_topology_maps_create_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewExtrasTopologyMapsCreateParams creates a new ExtrasTopologyMapsCreateParams object -// with the default values initialized. -func NewExtrasTopologyMapsCreateParams() *ExtrasTopologyMapsCreateParams { - var () - return &ExtrasTopologyMapsCreateParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewExtrasTopologyMapsCreateParamsWithTimeout creates a new ExtrasTopologyMapsCreateParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewExtrasTopologyMapsCreateParamsWithTimeout(timeout time.Duration) *ExtrasTopologyMapsCreateParams { - var () - return &ExtrasTopologyMapsCreateParams{ - - timeout: timeout, - } -} - -// NewExtrasTopologyMapsCreateParamsWithContext creates a new ExtrasTopologyMapsCreateParams object -// with the default values initialized, and the ability to set a context for a request -func NewExtrasTopologyMapsCreateParamsWithContext(ctx context.Context) *ExtrasTopologyMapsCreateParams { - var () - return &ExtrasTopologyMapsCreateParams{ - - Context: ctx, - } -} - -// NewExtrasTopologyMapsCreateParamsWithHTTPClient creates a new ExtrasTopologyMapsCreateParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewExtrasTopologyMapsCreateParamsWithHTTPClient(client *http.Client) *ExtrasTopologyMapsCreateParams { - var () - return &ExtrasTopologyMapsCreateParams{ - HTTPClient: client, - } -} - -/*ExtrasTopologyMapsCreateParams contains all the parameters to send to the API endpoint -for the extras topology maps create operation typically these are written to a http.Request -*/ -type ExtrasTopologyMapsCreateParams struct { - - /*Data*/ - Data *models.WritableTopologyMap - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the extras topology maps create params -func (o *ExtrasTopologyMapsCreateParams) WithTimeout(timeout time.Duration) *ExtrasTopologyMapsCreateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the extras topology maps create params -func (o *ExtrasTopologyMapsCreateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the extras topology maps create params -func (o *ExtrasTopologyMapsCreateParams) WithContext(ctx context.Context) *ExtrasTopologyMapsCreateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the extras topology maps create params -func (o *ExtrasTopologyMapsCreateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the extras topology maps create params -func (o *ExtrasTopologyMapsCreateParams) WithHTTPClient(client *http.Client) *ExtrasTopologyMapsCreateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the extras topology maps create params -func (o *ExtrasTopologyMapsCreateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the extras topology maps create params -func (o *ExtrasTopologyMapsCreateParams) WithData(data *models.WritableTopologyMap) *ExtrasTopologyMapsCreateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the extras topology maps create params -func (o *ExtrasTopologyMapsCreateParams) SetData(data *models.WritableTopologyMap) { - o.Data = data -} - -// WriteToRequest writes these params to a swagger request -func (o *ExtrasTopologyMapsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Data != nil { - if err := r.SetBodyParam(o.Data); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/extras/extras_topology_maps_create_responses.go b/netbox/client/extras/extras_topology_maps_create_responses.go deleted file mode 100644 index 1fd88ca8b8390b6364ae491ae7df616e2f184c65..0000000000000000000000000000000000000000 --- a/netbox/client/extras/extras_topology_maps_create_responses.go +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/netbox-community/go-netbox/netbox/models" -) - -// ExtrasTopologyMapsCreateReader is a Reader for the ExtrasTopologyMapsCreate structure. -type ExtrasTopologyMapsCreateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ExtrasTopologyMapsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 201: - result := NewExtrasTopologyMapsCreateCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) - } -} - -// NewExtrasTopologyMapsCreateCreated creates a ExtrasTopologyMapsCreateCreated with default headers values -func NewExtrasTopologyMapsCreateCreated() *ExtrasTopologyMapsCreateCreated { - return &ExtrasTopologyMapsCreateCreated{} -} - -/*ExtrasTopologyMapsCreateCreated handles this case with default header values. - -ExtrasTopologyMapsCreateCreated extras topology maps create created -*/ -type ExtrasTopologyMapsCreateCreated struct { - Payload *models.TopologyMap -} - -func (o *ExtrasTopologyMapsCreateCreated) Error() string { - return fmt.Sprintf("[POST /extras/topology-maps/][%d] extrasTopologyMapsCreateCreated %+v", 201, o.Payload) -} - -func (o *ExtrasTopologyMapsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TopologyMap) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/netbox/client/extras/extras_topology_maps_delete_parameters.go b/netbox/client/extras/extras_topology_maps_delete_parameters.go deleted file mode 100644 index 64fd59d4069cba967e4edad67ed0813c49418659..0000000000000000000000000000000000000000 --- a/netbox/client/extras/extras_topology_maps_delete_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "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/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewExtrasTopologyMapsDeleteParams creates a new ExtrasTopologyMapsDeleteParams object -// with the default values initialized. -func NewExtrasTopologyMapsDeleteParams() *ExtrasTopologyMapsDeleteParams { - var () - return &ExtrasTopologyMapsDeleteParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewExtrasTopologyMapsDeleteParamsWithTimeout creates a new ExtrasTopologyMapsDeleteParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewExtrasTopologyMapsDeleteParamsWithTimeout(timeout time.Duration) *ExtrasTopologyMapsDeleteParams { - var () - return &ExtrasTopologyMapsDeleteParams{ - - timeout: timeout, - } -} - -// NewExtrasTopologyMapsDeleteParamsWithContext creates a new ExtrasTopologyMapsDeleteParams object -// with the default values initialized, and the ability to set a context for a request -func NewExtrasTopologyMapsDeleteParamsWithContext(ctx context.Context) *ExtrasTopologyMapsDeleteParams { - var () - return &ExtrasTopologyMapsDeleteParams{ - - Context: ctx, - } -} - -// NewExtrasTopologyMapsDeleteParamsWithHTTPClient creates a new ExtrasTopologyMapsDeleteParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewExtrasTopologyMapsDeleteParamsWithHTTPClient(client *http.Client) *ExtrasTopologyMapsDeleteParams { - var () - return &ExtrasTopologyMapsDeleteParams{ - HTTPClient: client, - } -} - -/*ExtrasTopologyMapsDeleteParams contains all the parameters to send to the API endpoint -for the extras topology maps delete operation typically these are written to a http.Request -*/ -type ExtrasTopologyMapsDeleteParams struct { - - /*ID - A unique integer value identifying this topology map. - - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the extras topology maps delete params -func (o *ExtrasTopologyMapsDeleteParams) WithTimeout(timeout time.Duration) *ExtrasTopologyMapsDeleteParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the extras topology maps delete params -func (o *ExtrasTopologyMapsDeleteParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the extras topology maps delete params -func (o *ExtrasTopologyMapsDeleteParams) WithContext(ctx context.Context) *ExtrasTopologyMapsDeleteParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the extras topology maps delete params -func (o *ExtrasTopologyMapsDeleteParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the extras topology maps delete params -func (o *ExtrasTopologyMapsDeleteParams) WithHTTPClient(client *http.Client) *ExtrasTopologyMapsDeleteParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the extras topology maps delete params -func (o *ExtrasTopologyMapsDeleteParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the extras topology maps delete params -func (o *ExtrasTopologyMapsDeleteParams) WithID(id int64) *ExtrasTopologyMapsDeleteParams { - o.SetID(id) - return o -} - -// SetID adds the id to the extras topology maps delete params -func (o *ExtrasTopologyMapsDeleteParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ExtrasTopologyMapsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/extras/extras_topology_maps_delete_responses.go b/netbox/client/extras/extras_topology_maps_delete_responses.go deleted file mode 100644 index 460e489949af2ce367c46d7ce88b8cc2968f1566..0000000000000000000000000000000000000000 --- a/netbox/client/extras/extras_topology_maps_delete_responses.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" -) - -// ExtrasTopologyMapsDeleteReader is a Reader for the ExtrasTopologyMapsDelete structure. -type ExtrasTopologyMapsDeleteReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ExtrasTopologyMapsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 204: - result := NewExtrasTopologyMapsDeleteNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) - } -} - -// NewExtrasTopologyMapsDeleteNoContent creates a ExtrasTopologyMapsDeleteNoContent with default headers values -func NewExtrasTopologyMapsDeleteNoContent() *ExtrasTopologyMapsDeleteNoContent { - return &ExtrasTopologyMapsDeleteNoContent{} -} - -/*ExtrasTopologyMapsDeleteNoContent handles this case with default header values. - -ExtrasTopologyMapsDeleteNoContent extras topology maps delete no content -*/ -type ExtrasTopologyMapsDeleteNoContent struct { -} - -func (o *ExtrasTopologyMapsDeleteNoContent) Error() string { - return fmt.Sprintf("[DELETE /extras/topology-maps/{id}/][%d] extrasTopologyMapsDeleteNoContent ", 204) -} - -func (o *ExtrasTopologyMapsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/netbox/client/extras/extras_topology_maps_list_parameters.go b/netbox/client/extras/extras_topology_maps_list_parameters.go deleted file mode 100644 index d848ddc328b60d9fa0abe4d20d2ee95859c2a426..0000000000000000000000000000000000000000 --- a/netbox/client/extras/extras_topology_maps_list_parameters.go +++ /dev/null @@ -1,310 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "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/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewExtrasTopologyMapsListParams creates a new ExtrasTopologyMapsListParams object -// with the default values initialized. -func NewExtrasTopologyMapsListParams() *ExtrasTopologyMapsListParams { - var () - return &ExtrasTopologyMapsListParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewExtrasTopologyMapsListParamsWithTimeout creates a new ExtrasTopologyMapsListParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewExtrasTopologyMapsListParamsWithTimeout(timeout time.Duration) *ExtrasTopologyMapsListParams { - var () - return &ExtrasTopologyMapsListParams{ - - timeout: timeout, - } -} - -// NewExtrasTopologyMapsListParamsWithContext creates a new ExtrasTopologyMapsListParams object -// with the default values initialized, and the ability to set a context for a request -func NewExtrasTopologyMapsListParamsWithContext(ctx context.Context) *ExtrasTopologyMapsListParams { - var () - return &ExtrasTopologyMapsListParams{ - - Context: ctx, - } -} - -// NewExtrasTopologyMapsListParamsWithHTTPClient creates a new ExtrasTopologyMapsListParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewExtrasTopologyMapsListParamsWithHTTPClient(client *http.Client) *ExtrasTopologyMapsListParams { - var () - return &ExtrasTopologyMapsListParams{ - HTTPClient: client, - } -} - -/*ExtrasTopologyMapsListParams contains all the parameters to send to the API endpoint -for the extras topology maps list operation typically these are written to a http.Request -*/ -type ExtrasTopologyMapsListParams struct { - - /*Limit - Number of results to return per page. - - */ - Limit *int64 - /*Name*/ - Name *string - /*Offset - The initial index from which to return the results. - - */ - Offset *int64 - /*Site*/ - Site *string - /*SiteID*/ - SiteID *string - /*Slug*/ - Slug *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) WithTimeout(timeout time.Duration) *ExtrasTopologyMapsListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) WithContext(ctx context.Context) *ExtrasTopologyMapsListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) WithHTTPClient(client *http.Client) *ExtrasTopologyMapsListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithLimit adds the limit to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) WithLimit(limit *int64) *ExtrasTopologyMapsListParams { - o.SetLimit(limit) - return o -} - -// SetLimit adds the limit to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) SetLimit(limit *int64) { - o.Limit = limit -} - -// WithName adds the name to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) WithName(name *string) *ExtrasTopologyMapsListParams { - o.SetName(name) - return o -} - -// SetName adds the name to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) SetName(name *string) { - o.Name = name -} - -// WithOffset adds the offset to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) WithOffset(offset *int64) *ExtrasTopologyMapsListParams { - o.SetOffset(offset) - return o -} - -// SetOffset adds the offset to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) SetOffset(offset *int64) { - o.Offset = offset -} - -// WithSite adds the site to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) WithSite(site *string) *ExtrasTopologyMapsListParams { - o.SetSite(site) - return o -} - -// SetSite adds the site to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) SetSite(site *string) { - o.Site = site -} - -// WithSiteID adds the siteID to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) WithSiteID(siteID *string) *ExtrasTopologyMapsListParams { - o.SetSiteID(siteID) - return o -} - -// SetSiteID adds the siteId to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) SetSiteID(siteID *string) { - o.SiteID = siteID -} - -// WithSlug adds the slug to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) WithSlug(slug *string) *ExtrasTopologyMapsListParams { - o.SetSlug(slug) - return o -} - -// SetSlug adds the slug to the extras topology maps list params -func (o *ExtrasTopologyMapsListParams) SetSlug(slug *string) { - o.Slug = slug -} - -// WriteToRequest writes these params to a swagger request -func (o *ExtrasTopologyMapsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Limit != nil { - - // query param limit - var qrLimit int64 - if o.Limit != nil { - qrLimit = *o.Limit - } - qLimit := swag.FormatInt64(qrLimit) - if qLimit != "" { - if err := r.SetQueryParam("limit", qLimit); err != nil { - return err - } - } - - } - - if o.Name != nil { - - // query param name - var qrName string - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - - } - - if o.Offset != nil { - - // query param offset - var qrOffset int64 - if o.Offset != nil { - qrOffset = *o.Offset - } - qOffset := swag.FormatInt64(qrOffset) - if qOffset != "" { - if err := r.SetQueryParam("offset", qOffset); err != nil { - return err - } - } - - } - - if o.Site != nil { - - // query param site - var qrSite string - if o.Site != nil { - qrSite = *o.Site - } - qSite := qrSite - if qSite != "" { - if err := r.SetQueryParam("site", qSite); err != nil { - return err - } - } - - } - - if o.SiteID != nil { - - // query param site_id - var qrSiteID string - if o.SiteID != nil { - qrSiteID = *o.SiteID - } - qSiteID := qrSiteID - if qSiteID != "" { - if err := r.SetQueryParam("site_id", qSiteID); err != nil { - return err - } - } - - } - - if o.Slug != nil { - - // query param slug - var qrSlug string - if o.Slug != nil { - qrSlug = *o.Slug - } - qSlug := qrSlug - if qSlug != "" { - if err := r.SetQueryParam("slug", qSlug); err != nil { - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/extras/extras_topology_maps_list_responses.go b/netbox/client/extras/extras_topology_maps_list_responses.go deleted file mode 100644 index dea73249fbccf99404feb88bc7ebbd3cdcec71cd..0000000000000000000000000000000000000000 --- a/netbox/client/extras/extras_topology_maps_list_responses.go +++ /dev/null @@ -1,211 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/netbox-community/go-netbox/netbox/models" -) - -// ExtrasTopologyMapsListReader is a Reader for the ExtrasTopologyMapsList structure. -type ExtrasTopologyMapsListReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ExtrasTopologyMapsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewExtrasTopologyMapsListOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) - } -} - -// NewExtrasTopologyMapsListOK creates a ExtrasTopologyMapsListOK with default headers values -func NewExtrasTopologyMapsListOK() *ExtrasTopologyMapsListOK { - return &ExtrasTopologyMapsListOK{} -} - -/*ExtrasTopologyMapsListOK handles this case with default header values. - -ExtrasTopologyMapsListOK extras topology maps list o k -*/ -type ExtrasTopologyMapsListOK struct { - Payload *ExtrasTopologyMapsListOKBody -} - -func (o *ExtrasTopologyMapsListOK) Error() string { - return fmt.Sprintf("[GET /extras/topology-maps/][%d] extrasTopologyMapsListOK %+v", 200, o.Payload) -} - -func (o *ExtrasTopologyMapsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(ExtrasTopologyMapsListOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/*ExtrasTopologyMapsListOKBody extras topology maps list o k body -swagger:model ExtrasTopologyMapsListOKBody -*/ -type ExtrasTopologyMapsListOKBody 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.TopologyMap `json:"results"` -} - -// Validate validates this extras topology maps list o k body -func (o *ExtrasTopologyMapsListOKBody) 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 *ExtrasTopologyMapsListOKBody) validateCount(formats strfmt.Registry) error { - - if err := validate.Required("extrasTopologyMapsListOK"+"."+"count", "body", o.Count); err != nil { - return err - } - - return nil -} - -func (o *ExtrasTopologyMapsListOKBody) validateNext(formats strfmt.Registry) error { - - if swag.IsZero(o.Next) { // not required - return nil - } - - if err := validate.FormatOf("extrasTopologyMapsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { - return err - } - - return nil -} - -func (o *ExtrasTopologyMapsListOKBody) validatePrevious(formats strfmt.Registry) error { - - if swag.IsZero(o.Previous) { // not required - return nil - } - - if err := validate.FormatOf("extrasTopologyMapsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { - return err - } - - return nil -} - -func (o *ExtrasTopologyMapsListOKBody) validateResults(formats strfmt.Registry) error { - - if err := validate.Required("extrasTopologyMapsListOK"+"."+"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("extrasTopologyMapsListOK" + "." + "results" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ExtrasTopologyMapsListOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ExtrasTopologyMapsListOKBody) UnmarshalBinary(b []byte) error { - var res ExtrasTopologyMapsListOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/netbox/client/extras/extras_topology_maps_partial_update_parameters.go b/netbox/client/extras/extras_topology_maps_partial_update_parameters.go deleted file mode 100644 index d8c0c38c56b1bd2d754a0684fec138c007e2bda7..0000000000000000000000000000000000000000 --- a/netbox/client/extras/extras_topology_maps_partial_update_parameters.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "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/swag" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewExtrasTopologyMapsPartialUpdateParams creates a new ExtrasTopologyMapsPartialUpdateParams object -// with the default values initialized. -func NewExtrasTopologyMapsPartialUpdateParams() *ExtrasTopologyMapsPartialUpdateParams { - var () - return &ExtrasTopologyMapsPartialUpdateParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewExtrasTopologyMapsPartialUpdateParamsWithTimeout creates a new ExtrasTopologyMapsPartialUpdateParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewExtrasTopologyMapsPartialUpdateParamsWithTimeout(timeout time.Duration) *ExtrasTopologyMapsPartialUpdateParams { - var () - return &ExtrasTopologyMapsPartialUpdateParams{ - - timeout: timeout, - } -} - -// NewExtrasTopologyMapsPartialUpdateParamsWithContext creates a new ExtrasTopologyMapsPartialUpdateParams object -// with the default values initialized, and the ability to set a context for a request -func NewExtrasTopologyMapsPartialUpdateParamsWithContext(ctx context.Context) *ExtrasTopologyMapsPartialUpdateParams { - var () - return &ExtrasTopologyMapsPartialUpdateParams{ - - Context: ctx, - } -} - -// NewExtrasTopologyMapsPartialUpdateParamsWithHTTPClient creates a new ExtrasTopologyMapsPartialUpdateParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewExtrasTopologyMapsPartialUpdateParamsWithHTTPClient(client *http.Client) *ExtrasTopologyMapsPartialUpdateParams { - var () - return &ExtrasTopologyMapsPartialUpdateParams{ - HTTPClient: client, - } -} - -/*ExtrasTopologyMapsPartialUpdateParams contains all the parameters to send to the API endpoint -for the extras topology maps partial update operation typically these are written to a http.Request -*/ -type ExtrasTopologyMapsPartialUpdateParams struct { - - /*Data*/ - Data *models.WritableTopologyMap - /*ID - A unique integer value identifying this topology map. - - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the extras topology maps partial update params -func (o *ExtrasTopologyMapsPartialUpdateParams) WithTimeout(timeout time.Duration) *ExtrasTopologyMapsPartialUpdateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the extras topology maps partial update params -func (o *ExtrasTopologyMapsPartialUpdateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the extras topology maps partial update params -func (o *ExtrasTopologyMapsPartialUpdateParams) WithContext(ctx context.Context) *ExtrasTopologyMapsPartialUpdateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the extras topology maps partial update params -func (o *ExtrasTopologyMapsPartialUpdateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the extras topology maps partial update params -func (o *ExtrasTopologyMapsPartialUpdateParams) WithHTTPClient(client *http.Client) *ExtrasTopologyMapsPartialUpdateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the extras topology maps partial update params -func (o *ExtrasTopologyMapsPartialUpdateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the extras topology maps partial update params -func (o *ExtrasTopologyMapsPartialUpdateParams) WithData(data *models.WritableTopologyMap) *ExtrasTopologyMapsPartialUpdateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the extras topology maps partial update params -func (o *ExtrasTopologyMapsPartialUpdateParams) SetData(data *models.WritableTopologyMap) { - o.Data = data -} - -// WithID adds the id to the extras topology maps partial update params -func (o *ExtrasTopologyMapsPartialUpdateParams) WithID(id int64) *ExtrasTopologyMapsPartialUpdateParams { - o.SetID(id) - return o -} - -// SetID adds the id to the extras topology maps partial update params -func (o *ExtrasTopologyMapsPartialUpdateParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ExtrasTopologyMapsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Data != nil { - if err := r.SetBodyParam(o.Data); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/extras/extras_topology_maps_partial_update_responses.go b/netbox/client/extras/extras_topology_maps_partial_update_responses.go deleted file mode 100644 index 8e2acec18dffbe4600aeb43c5057352812fcf074..0000000000000000000000000000000000000000 --- a/netbox/client/extras/extras_topology_maps_partial_update_responses.go +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/netbox-community/go-netbox/netbox/models" -) - -// ExtrasTopologyMapsPartialUpdateReader is a Reader for the ExtrasTopologyMapsPartialUpdate structure. -type ExtrasTopologyMapsPartialUpdateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ExtrasTopologyMapsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewExtrasTopologyMapsPartialUpdateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) - } -} - -// NewExtrasTopologyMapsPartialUpdateOK creates a ExtrasTopologyMapsPartialUpdateOK with default headers values -func NewExtrasTopologyMapsPartialUpdateOK() *ExtrasTopologyMapsPartialUpdateOK { - return &ExtrasTopologyMapsPartialUpdateOK{} -} - -/*ExtrasTopologyMapsPartialUpdateOK handles this case with default header values. - -ExtrasTopologyMapsPartialUpdateOK extras topology maps partial update o k -*/ -type ExtrasTopologyMapsPartialUpdateOK struct { - Payload *models.TopologyMap -} - -func (o *ExtrasTopologyMapsPartialUpdateOK) Error() string { - return fmt.Sprintf("[PATCH /extras/topology-maps/{id}/][%d] extrasTopologyMapsPartialUpdateOK %+v", 200, o.Payload) -} - -func (o *ExtrasTopologyMapsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TopologyMap) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/netbox/client/extras/extras_topology_maps_read_parameters.go b/netbox/client/extras/extras_topology_maps_read_parameters.go deleted file mode 100644 index a89af3f8f27e94ac6f1b89189845c6c766ce5d06..0000000000000000000000000000000000000000 --- a/netbox/client/extras/extras_topology_maps_read_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "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/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewExtrasTopologyMapsReadParams creates a new ExtrasTopologyMapsReadParams object -// with the default values initialized. -func NewExtrasTopologyMapsReadParams() *ExtrasTopologyMapsReadParams { - var () - return &ExtrasTopologyMapsReadParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewExtrasTopologyMapsReadParamsWithTimeout creates a new ExtrasTopologyMapsReadParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewExtrasTopologyMapsReadParamsWithTimeout(timeout time.Duration) *ExtrasTopologyMapsReadParams { - var () - return &ExtrasTopologyMapsReadParams{ - - timeout: timeout, - } -} - -// NewExtrasTopologyMapsReadParamsWithContext creates a new ExtrasTopologyMapsReadParams object -// with the default values initialized, and the ability to set a context for a request -func NewExtrasTopologyMapsReadParamsWithContext(ctx context.Context) *ExtrasTopologyMapsReadParams { - var () - return &ExtrasTopologyMapsReadParams{ - - Context: ctx, - } -} - -// NewExtrasTopologyMapsReadParamsWithHTTPClient creates a new ExtrasTopologyMapsReadParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewExtrasTopologyMapsReadParamsWithHTTPClient(client *http.Client) *ExtrasTopologyMapsReadParams { - var () - return &ExtrasTopologyMapsReadParams{ - HTTPClient: client, - } -} - -/*ExtrasTopologyMapsReadParams contains all the parameters to send to the API endpoint -for the extras topology maps read operation typically these are written to a http.Request -*/ -type ExtrasTopologyMapsReadParams struct { - - /*ID - A unique integer value identifying this topology map. - - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the extras topology maps read params -func (o *ExtrasTopologyMapsReadParams) WithTimeout(timeout time.Duration) *ExtrasTopologyMapsReadParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the extras topology maps read params -func (o *ExtrasTopologyMapsReadParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the extras topology maps read params -func (o *ExtrasTopologyMapsReadParams) WithContext(ctx context.Context) *ExtrasTopologyMapsReadParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the extras topology maps read params -func (o *ExtrasTopologyMapsReadParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the extras topology maps read params -func (o *ExtrasTopologyMapsReadParams) WithHTTPClient(client *http.Client) *ExtrasTopologyMapsReadParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the extras topology maps read params -func (o *ExtrasTopologyMapsReadParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the extras topology maps read params -func (o *ExtrasTopologyMapsReadParams) WithID(id int64) *ExtrasTopologyMapsReadParams { - o.SetID(id) - return o -} - -// SetID adds the id to the extras topology maps read params -func (o *ExtrasTopologyMapsReadParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ExtrasTopologyMapsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/extras/extras_topology_maps_render_parameters.go b/netbox/client/extras/extras_topology_maps_render_parameters.go deleted file mode 100644 index 78a9ad7d1c04b8d133c2d2adf9982f193d76da6e..0000000000000000000000000000000000000000 --- a/netbox/client/extras/extras_topology_maps_render_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "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/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewExtrasTopologyMapsRenderParams creates a new ExtrasTopologyMapsRenderParams object -// with the default values initialized. -func NewExtrasTopologyMapsRenderParams() *ExtrasTopologyMapsRenderParams { - var () - return &ExtrasTopologyMapsRenderParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewExtrasTopologyMapsRenderParamsWithTimeout creates a new ExtrasTopologyMapsRenderParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewExtrasTopologyMapsRenderParamsWithTimeout(timeout time.Duration) *ExtrasTopologyMapsRenderParams { - var () - return &ExtrasTopologyMapsRenderParams{ - - timeout: timeout, - } -} - -// NewExtrasTopologyMapsRenderParamsWithContext creates a new ExtrasTopologyMapsRenderParams object -// with the default values initialized, and the ability to set a context for a request -func NewExtrasTopologyMapsRenderParamsWithContext(ctx context.Context) *ExtrasTopologyMapsRenderParams { - var () - return &ExtrasTopologyMapsRenderParams{ - - Context: ctx, - } -} - -// NewExtrasTopologyMapsRenderParamsWithHTTPClient creates a new ExtrasTopologyMapsRenderParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewExtrasTopologyMapsRenderParamsWithHTTPClient(client *http.Client) *ExtrasTopologyMapsRenderParams { - var () - return &ExtrasTopologyMapsRenderParams{ - HTTPClient: client, - } -} - -/*ExtrasTopologyMapsRenderParams contains all the parameters to send to the API endpoint -for the extras topology maps render operation typically these are written to a http.Request -*/ -type ExtrasTopologyMapsRenderParams struct { - - /*ID - A unique integer value identifying this topology map. - - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the extras topology maps render params -func (o *ExtrasTopologyMapsRenderParams) WithTimeout(timeout time.Duration) *ExtrasTopologyMapsRenderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the extras topology maps render params -func (o *ExtrasTopologyMapsRenderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the extras topology maps render params -func (o *ExtrasTopologyMapsRenderParams) WithContext(ctx context.Context) *ExtrasTopologyMapsRenderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the extras topology maps render params -func (o *ExtrasTopologyMapsRenderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the extras topology maps render params -func (o *ExtrasTopologyMapsRenderParams) WithHTTPClient(client *http.Client) *ExtrasTopologyMapsRenderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the extras topology maps render params -func (o *ExtrasTopologyMapsRenderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the extras topology maps render params -func (o *ExtrasTopologyMapsRenderParams) WithID(id int64) *ExtrasTopologyMapsRenderParams { - o.SetID(id) - return o -} - -// SetID adds the id to the extras topology maps render params -func (o *ExtrasTopologyMapsRenderParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ExtrasTopologyMapsRenderParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/extras/extras_topology_maps_render_responses.go b/netbox/client/extras/extras_topology_maps_render_responses.go deleted file mode 100644 index 95b9a5321332f467db89058b4f138eaafe5c4219..0000000000000000000000000000000000000000 --- a/netbox/client/extras/extras_topology_maps_render_responses.go +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/netbox-community/go-netbox/netbox/models" -) - -// ExtrasTopologyMapsRenderReader is a Reader for the ExtrasTopologyMapsRender structure. -type ExtrasTopologyMapsRenderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ExtrasTopologyMapsRenderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewExtrasTopologyMapsRenderOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) - } -} - -// NewExtrasTopologyMapsRenderOK creates a ExtrasTopologyMapsRenderOK with default headers values -func NewExtrasTopologyMapsRenderOK() *ExtrasTopologyMapsRenderOK { - return &ExtrasTopologyMapsRenderOK{} -} - -/*ExtrasTopologyMapsRenderOK handles this case with default header values. - -ExtrasTopologyMapsRenderOK extras topology maps render o k -*/ -type ExtrasTopologyMapsRenderOK struct { - Payload *models.TopologyMap -} - -func (o *ExtrasTopologyMapsRenderOK) Error() string { - return fmt.Sprintf("[GET /extras/topology-maps/{id}/render/][%d] extrasTopologyMapsRenderOK %+v", 200, o.Payload) -} - -func (o *ExtrasTopologyMapsRenderOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TopologyMap) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/netbox/client/extras/extras_topology_maps_update_parameters.go b/netbox/client/extras/extras_topology_maps_update_parameters.go deleted file mode 100644 index 80d0caff98a2715684e55eb11b139773250ea426..0000000000000000000000000000000000000000 --- a/netbox/client/extras/extras_topology_maps_update_parameters.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "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/swag" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewExtrasTopologyMapsUpdateParams creates a new ExtrasTopologyMapsUpdateParams object -// with the default values initialized. -func NewExtrasTopologyMapsUpdateParams() *ExtrasTopologyMapsUpdateParams { - var () - return &ExtrasTopologyMapsUpdateParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewExtrasTopologyMapsUpdateParamsWithTimeout creates a new ExtrasTopologyMapsUpdateParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewExtrasTopologyMapsUpdateParamsWithTimeout(timeout time.Duration) *ExtrasTopologyMapsUpdateParams { - var () - return &ExtrasTopologyMapsUpdateParams{ - - timeout: timeout, - } -} - -// NewExtrasTopologyMapsUpdateParamsWithContext creates a new ExtrasTopologyMapsUpdateParams object -// with the default values initialized, and the ability to set a context for a request -func NewExtrasTopologyMapsUpdateParamsWithContext(ctx context.Context) *ExtrasTopologyMapsUpdateParams { - var () - return &ExtrasTopologyMapsUpdateParams{ - - Context: ctx, - } -} - -// NewExtrasTopologyMapsUpdateParamsWithHTTPClient creates a new ExtrasTopologyMapsUpdateParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewExtrasTopologyMapsUpdateParamsWithHTTPClient(client *http.Client) *ExtrasTopologyMapsUpdateParams { - var () - return &ExtrasTopologyMapsUpdateParams{ - HTTPClient: client, - } -} - -/*ExtrasTopologyMapsUpdateParams contains all the parameters to send to the API endpoint -for the extras topology maps update operation typically these are written to a http.Request -*/ -type ExtrasTopologyMapsUpdateParams struct { - - /*Data*/ - Data *models.WritableTopologyMap - /*ID - A unique integer value identifying this topology map. - - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the extras topology maps update params -func (o *ExtrasTopologyMapsUpdateParams) WithTimeout(timeout time.Duration) *ExtrasTopologyMapsUpdateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the extras topology maps update params -func (o *ExtrasTopologyMapsUpdateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the extras topology maps update params -func (o *ExtrasTopologyMapsUpdateParams) WithContext(ctx context.Context) *ExtrasTopologyMapsUpdateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the extras topology maps update params -func (o *ExtrasTopologyMapsUpdateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the extras topology maps update params -func (o *ExtrasTopologyMapsUpdateParams) WithHTTPClient(client *http.Client) *ExtrasTopologyMapsUpdateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the extras topology maps update params -func (o *ExtrasTopologyMapsUpdateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the extras topology maps update params -func (o *ExtrasTopologyMapsUpdateParams) WithData(data *models.WritableTopologyMap) *ExtrasTopologyMapsUpdateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the extras topology maps update params -func (o *ExtrasTopologyMapsUpdateParams) SetData(data *models.WritableTopologyMap) { - o.Data = data -} - -// WithID adds the id to the extras topology maps update params -func (o *ExtrasTopologyMapsUpdateParams) WithID(id int64) *ExtrasTopologyMapsUpdateParams { - o.SetID(id) - return o -} - -// SetID adds the id to the extras topology maps update params -func (o *ExtrasTopologyMapsUpdateParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ExtrasTopologyMapsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Data != nil { - if err := r.SetBodyParam(o.Data); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/extras/extras_topology_maps_update_responses.go b/netbox/client/extras/extras_topology_maps_update_responses.go deleted file mode 100644 index 2760a62bcfc4ee1272188b5995c99952fd3de4ae..0000000000000000000000000000000000000000 --- a/netbox/client/extras/extras_topology_maps_update_responses.go +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/netbox-community/go-netbox/netbox/models" -) - -// ExtrasTopologyMapsUpdateReader is a Reader for the ExtrasTopologyMapsUpdate structure. -type ExtrasTopologyMapsUpdateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ExtrasTopologyMapsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewExtrasTopologyMapsUpdateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) - } -} - -// NewExtrasTopologyMapsUpdateOK creates a ExtrasTopologyMapsUpdateOK with default headers values -func NewExtrasTopologyMapsUpdateOK() *ExtrasTopologyMapsUpdateOK { - return &ExtrasTopologyMapsUpdateOK{} -} - -/*ExtrasTopologyMapsUpdateOK handles this case with default header values. - -ExtrasTopologyMapsUpdateOK extras topology maps update o k -*/ -type ExtrasTopologyMapsUpdateOK struct { - Payload *models.TopologyMap -} - -func (o *ExtrasTopologyMapsUpdateOK) Error() string { - return fmt.Sprintf("[PUT /extras/topology-maps/{id}/][%d] extrasTopologyMapsUpdateOK %+v", 200, o.Payload) -} - -func (o *ExtrasTopologyMapsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TopologyMap) - - // 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/ip_a_m_client.go b/netbox/client/ipam/ip_a_m_client.go deleted file mode 100644 index 7d15390b2ca97082f9313c82b7767555a4999286..0000000000000000000000000000000000000000 --- a/netbox/client/ipam/ip_a_m_client.go +++ /dev/null @@ -1,1788 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ipam - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" -) - -// New creates a new ipam API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { - return &Client{transport: transport, formats: formats} -} - -/* -Client for ipam API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -/* -IPAMChoicesList ipam choices list API -*/ -func (a *Client) IPAMChoicesList(params *IPAMChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMChoicesListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMChoicesListParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam__choices_list", - Method: "GET", - PathPattern: "/ipam/_choices/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMChoicesListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMChoicesListOK), nil - -} - -/* -IPAMChoicesRead ipam choices read API -*/ -func (a *Client) IPAMChoicesRead(params *IPAMChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMChoicesReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMChoicesReadParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam__choices_read", - Method: "GET", - PathPattern: "/ipam/_choices/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMChoicesReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMChoicesReadOK), nil - -} - -/* -IPAMAggregatesCreate ipam aggregates create API -*/ -func (a *Client) IPAMAggregatesCreate(params *IPAMAggregatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMAggregatesCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMAggregatesCreateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_aggregates_create", - Method: "POST", - PathPattern: "/ipam/aggregates/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMAggregatesCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMAggregatesCreateCreated), nil - -} - -/* -IPAMAggregatesDelete ipam aggregates delete API -*/ -func (a *Client) IPAMAggregatesDelete(params *IPAMAggregatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMAggregatesDeleteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMAggregatesDeleteParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_aggregates_delete", - Method: "DELETE", - PathPattern: "/ipam/aggregates/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMAggregatesDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMAggregatesDeleteNoContent), nil - -} - -/* -IPAMAggregatesList Call to super to allow for caching -*/ -func (a *Client) IPAMAggregatesList(params *IPAMAggregatesListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMAggregatesListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMAggregatesListParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_aggregates_list", - Method: "GET", - PathPattern: "/ipam/aggregates/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMAggregatesListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMAggregatesListOK), nil - -} - -/* -IPAMAggregatesPartialUpdate ipam aggregates partial update API -*/ -func (a *Client) IPAMAggregatesPartialUpdate(params *IPAMAggregatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMAggregatesPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMAggregatesPartialUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_aggregates_partial_update", - Method: "PATCH", - PathPattern: "/ipam/aggregates/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMAggregatesPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMAggregatesPartialUpdateOK), nil - -} - -/* -IPAMAggregatesRead Call to super to allow for caching -*/ -func (a *Client) IPAMAggregatesRead(params *IPAMAggregatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMAggregatesReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMAggregatesReadParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_aggregates_read", - Method: "GET", - PathPattern: "/ipam/aggregates/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMAggregatesReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMAggregatesReadOK), nil - -} - -/* -IPAMAggregatesUpdate ipam aggregates update API -*/ -func (a *Client) IPAMAggregatesUpdate(params *IPAMAggregatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMAggregatesUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMAggregatesUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_aggregates_update", - Method: "PUT", - PathPattern: "/ipam/aggregates/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMAggregatesUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMAggregatesUpdateOK), nil - -} - -/* -IPAMIPAddressesCreate ipam ip addresses create API -*/ -func (a *Client) IPAMIPAddressesCreate(params *IPAMIPAddressesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMIPAddressesCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMIPAddressesCreateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_ip-addresses_create", - Method: "POST", - PathPattern: "/ipam/ip-addresses/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMIPAddressesCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMIPAddressesCreateCreated), nil - -} - -/* -IPAMIPAddressesDelete ipam ip addresses delete API -*/ -func (a *Client) IPAMIPAddressesDelete(params *IPAMIPAddressesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMIPAddressesDeleteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMIPAddressesDeleteParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_ip-addresses_delete", - Method: "DELETE", - PathPattern: "/ipam/ip-addresses/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMIPAddressesDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMIPAddressesDeleteNoContent), nil - -} - -/* -IPAMIPAddressesList Call to super to allow for caching -*/ -func (a *Client) IPAMIPAddressesList(params *IPAMIPAddressesListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMIPAddressesListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMIPAddressesListParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_ip-addresses_list", - Method: "GET", - PathPattern: "/ipam/ip-addresses/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMIPAddressesListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMIPAddressesListOK), nil - -} - -/* -IPAMIPAddressesPartialUpdate ipam ip addresses partial update API -*/ -func (a *Client) IPAMIPAddressesPartialUpdate(params *IPAMIPAddressesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMIPAddressesPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMIPAddressesPartialUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_ip-addresses_partial_update", - Method: "PATCH", - PathPattern: "/ipam/ip-addresses/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMIPAddressesPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMIPAddressesPartialUpdateOK), nil - -} - -/* -IPAMIPAddressesRead Call to super to allow for caching -*/ -func (a *Client) IPAMIPAddressesRead(params *IPAMIPAddressesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMIPAddressesReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMIPAddressesReadParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_ip-addresses_read", - Method: "GET", - PathPattern: "/ipam/ip-addresses/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMIPAddressesReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMIPAddressesReadOK), nil - -} - -/* -IPAMIPAddressesUpdate ipam ip addresses update API -*/ -func (a *Client) IPAMIPAddressesUpdate(params *IPAMIPAddressesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMIPAddressesUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMIPAddressesUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_ip-addresses_update", - Method: "PUT", - PathPattern: "/ipam/ip-addresses/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMIPAddressesUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMIPAddressesUpdateOK), nil - -} - -/* -IPAMPrefixesAvailableIpsCreate A convenience method for returning available IP addresses within a prefix. By default, the number of IPs -returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be passed, -however results will not be paginated. -*/ -func (a *Client) IPAMPrefixesAvailableIpsCreate(params *IPAMPrefixesAvailableIpsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesAvailableIpsCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMPrefixesAvailableIpsCreateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_prefixes_available-ips_create", - Method: "POST", - PathPattern: "/ipam/prefixes/{id}/available-ips/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMPrefixesAvailableIpsCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMPrefixesAvailableIpsCreateCreated), nil - -} - -/* -IPAMPrefixesAvailableIpsRead A convenience method for returning available IP addresses within a prefix. By default, the number of IPs -returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be passed, -however results will not be paginated. -*/ -func (a *Client) IPAMPrefixesAvailableIpsRead(params *IPAMPrefixesAvailableIpsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesAvailableIpsReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMPrefixesAvailableIpsReadParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_prefixes_available-ips_read", - Method: "GET", - PathPattern: "/ipam/prefixes/{id}/available-ips/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMPrefixesAvailableIpsReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMPrefixesAvailableIpsReadOK), nil - -} - -/* -IPAMPrefixesAvailablePrefixesCreate A convenience method for returning available child prefixes within a parent. -*/ -func (a *Client) IPAMPrefixesAvailablePrefixesCreate(params *IPAMPrefixesAvailablePrefixesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesAvailablePrefixesCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMPrefixesAvailablePrefixesCreateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_prefixes_available-prefixes_create", - Method: "POST", - PathPattern: "/ipam/prefixes/{id}/available-prefixes/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMPrefixesAvailablePrefixesCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMPrefixesAvailablePrefixesCreateCreated), nil - -} - -/* -IPAMPrefixesAvailablePrefixesRead A convenience method for returning available child prefixes within a parent. -*/ -func (a *Client) IPAMPrefixesAvailablePrefixesRead(params *IPAMPrefixesAvailablePrefixesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesAvailablePrefixesReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMPrefixesAvailablePrefixesReadParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_prefixes_available-prefixes_read", - Method: "GET", - PathPattern: "/ipam/prefixes/{id}/available-prefixes/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMPrefixesAvailablePrefixesReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMPrefixesAvailablePrefixesReadOK), nil - -} - -/* -IPAMPrefixesCreate ipam prefixes create API -*/ -func (a *Client) IPAMPrefixesCreate(params *IPAMPrefixesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMPrefixesCreateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_prefixes_create", - Method: "POST", - PathPattern: "/ipam/prefixes/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMPrefixesCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMPrefixesCreateCreated), nil - -} - -/* -IPAMPrefixesDelete ipam prefixes delete API -*/ -func (a *Client) IPAMPrefixesDelete(params *IPAMPrefixesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesDeleteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMPrefixesDeleteParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_prefixes_delete", - Method: "DELETE", - PathPattern: "/ipam/prefixes/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMPrefixesDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMPrefixesDeleteNoContent), nil - -} - -/* -IPAMPrefixesList Call to super to allow for caching -*/ -func (a *Client) IPAMPrefixesList(params *IPAMPrefixesListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMPrefixesListParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_prefixes_list", - Method: "GET", - PathPattern: "/ipam/prefixes/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMPrefixesListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMPrefixesListOK), nil - -} - -/* -IPAMPrefixesPartialUpdate ipam prefixes partial update API -*/ -func (a *Client) IPAMPrefixesPartialUpdate(params *IPAMPrefixesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMPrefixesPartialUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_prefixes_partial_update", - Method: "PATCH", - PathPattern: "/ipam/prefixes/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMPrefixesPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMPrefixesPartialUpdateOK), nil - -} - -/* -IPAMPrefixesRead Call to super to allow for caching -*/ -func (a *Client) IPAMPrefixesRead(params *IPAMPrefixesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMPrefixesReadParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_prefixes_read", - Method: "GET", - PathPattern: "/ipam/prefixes/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMPrefixesReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMPrefixesReadOK), nil - -} - -/* -IPAMPrefixesUpdate ipam prefixes update API -*/ -func (a *Client) IPAMPrefixesUpdate(params *IPAMPrefixesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMPrefixesUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_prefixes_update", - Method: "PUT", - PathPattern: "/ipam/prefixes/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMPrefixesUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMPrefixesUpdateOK), nil - -} - -/* -IPAMRirsCreate ipam rirs create API -*/ -func (a *Client) IPAMRirsCreate(params *IPAMRirsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRirsCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMRirsCreateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_rirs_create", - Method: "POST", - PathPattern: "/ipam/rirs/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMRirsCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMRirsCreateCreated), nil - -} - -/* -IPAMRirsDelete ipam rirs delete API -*/ -func (a *Client) IPAMRirsDelete(params *IPAMRirsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRirsDeleteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMRirsDeleteParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_rirs_delete", - Method: "DELETE", - PathPattern: "/ipam/rirs/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMRirsDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMRirsDeleteNoContent), nil - -} - -/* -IPAMRirsList Call to super to allow for caching -*/ -func (a *Client) IPAMRirsList(params *IPAMRirsListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRirsListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMRirsListParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_rirs_list", - Method: "GET", - PathPattern: "/ipam/rirs/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMRirsListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMRirsListOK), nil - -} - -/* -IPAMRirsPartialUpdate ipam rirs partial update API -*/ -func (a *Client) IPAMRirsPartialUpdate(params *IPAMRirsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRirsPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMRirsPartialUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_rirs_partial_update", - Method: "PATCH", - PathPattern: "/ipam/rirs/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMRirsPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMRirsPartialUpdateOK), nil - -} - -/* -IPAMRirsRead Call to super to allow for caching -*/ -func (a *Client) IPAMRirsRead(params *IPAMRirsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRirsReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMRirsReadParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_rirs_read", - Method: "GET", - PathPattern: "/ipam/rirs/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMRirsReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMRirsReadOK), nil - -} - -/* -IPAMRirsUpdate ipam rirs update API -*/ -func (a *Client) IPAMRirsUpdate(params *IPAMRirsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRirsUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMRirsUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_rirs_update", - Method: "PUT", - PathPattern: "/ipam/rirs/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMRirsUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMRirsUpdateOK), nil - -} - -/* -IPAMRolesCreate ipam roles create API -*/ -func (a *Client) IPAMRolesCreate(params *IPAMRolesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRolesCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMRolesCreateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_roles_create", - Method: "POST", - PathPattern: "/ipam/roles/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMRolesCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMRolesCreateCreated), nil - -} - -/* -IPAMRolesDelete ipam roles delete API -*/ -func (a *Client) IPAMRolesDelete(params *IPAMRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRolesDeleteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMRolesDeleteParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_roles_delete", - Method: "DELETE", - PathPattern: "/ipam/roles/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMRolesDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMRolesDeleteNoContent), nil - -} - -/* -IPAMRolesList Call to super to allow for caching -*/ -func (a *Client) IPAMRolesList(params *IPAMRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRolesListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMRolesListParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_roles_list", - Method: "GET", - PathPattern: "/ipam/roles/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMRolesListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMRolesListOK), nil - -} - -/* -IPAMRolesPartialUpdate ipam roles partial update API -*/ -func (a *Client) IPAMRolesPartialUpdate(params *IPAMRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRolesPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMRolesPartialUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_roles_partial_update", - Method: "PATCH", - PathPattern: "/ipam/roles/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMRolesPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMRolesPartialUpdateOK), nil - -} - -/* -IPAMRolesRead Call to super to allow for caching -*/ -func (a *Client) IPAMRolesRead(params *IPAMRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRolesReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMRolesReadParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_roles_read", - Method: "GET", - PathPattern: "/ipam/roles/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMRolesReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMRolesReadOK), nil - -} - -/* -IPAMRolesUpdate ipam roles update API -*/ -func (a *Client) IPAMRolesUpdate(params *IPAMRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRolesUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMRolesUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_roles_update", - Method: "PUT", - PathPattern: "/ipam/roles/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMRolesUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMRolesUpdateOK), nil - -} - -/* -IPAMServicesCreate ipam services create API -*/ -func (a *Client) IPAMServicesCreate(params *IPAMServicesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMServicesCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMServicesCreateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_services_create", - Method: "POST", - PathPattern: "/ipam/services/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMServicesCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMServicesCreateCreated), nil - -} - -/* -IPAMServicesDelete ipam services delete API -*/ -func (a *Client) IPAMServicesDelete(params *IPAMServicesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMServicesDeleteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMServicesDeleteParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_services_delete", - Method: "DELETE", - PathPattern: "/ipam/services/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMServicesDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMServicesDeleteNoContent), nil - -} - -/* -IPAMServicesList Call to super to allow for caching -*/ -func (a *Client) IPAMServicesList(params *IPAMServicesListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMServicesListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMServicesListParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_services_list", - Method: "GET", - PathPattern: "/ipam/services/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMServicesListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMServicesListOK), nil - -} - -/* -IPAMServicesPartialUpdate ipam services partial update API -*/ -func (a *Client) IPAMServicesPartialUpdate(params *IPAMServicesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMServicesPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMServicesPartialUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_services_partial_update", - Method: "PATCH", - PathPattern: "/ipam/services/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMServicesPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMServicesPartialUpdateOK), nil - -} - -/* -IPAMServicesRead Call to super to allow for caching -*/ -func (a *Client) IPAMServicesRead(params *IPAMServicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMServicesReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMServicesReadParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_services_read", - Method: "GET", - PathPattern: "/ipam/services/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMServicesReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMServicesReadOK), nil - -} - -/* -IPAMServicesUpdate ipam services update API -*/ -func (a *Client) IPAMServicesUpdate(params *IPAMServicesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMServicesUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMServicesUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_services_update", - Method: "PUT", - PathPattern: "/ipam/services/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMServicesUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMServicesUpdateOK), nil - -} - -/* -IPAMVlanGroupsCreate ipam vlan groups create API -*/ -func (a *Client) IPAMVlanGroupsCreate(params *IPAMVlanGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlanGroupsCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVlanGroupsCreateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vlan-groups_create", - Method: "POST", - PathPattern: "/ipam/vlan-groups/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVlanGroupsCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVlanGroupsCreateCreated), nil - -} - -/* -IPAMVlanGroupsDelete ipam vlan groups delete API -*/ -func (a *Client) IPAMVlanGroupsDelete(params *IPAMVlanGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlanGroupsDeleteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVlanGroupsDeleteParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vlan-groups_delete", - Method: "DELETE", - PathPattern: "/ipam/vlan-groups/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVlanGroupsDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVlanGroupsDeleteNoContent), nil - -} - -/* -IPAMVlanGroupsList Call to super to allow for caching -*/ -func (a *Client) IPAMVlanGroupsList(params *IPAMVlanGroupsListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlanGroupsListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVlanGroupsListParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vlan-groups_list", - Method: "GET", - PathPattern: "/ipam/vlan-groups/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVlanGroupsListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVlanGroupsListOK), nil - -} - -/* -IPAMVlanGroupsPartialUpdate ipam vlan groups partial update API -*/ -func (a *Client) IPAMVlanGroupsPartialUpdate(params *IPAMVlanGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlanGroupsPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVlanGroupsPartialUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vlan-groups_partial_update", - Method: "PATCH", - PathPattern: "/ipam/vlan-groups/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVlanGroupsPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVlanGroupsPartialUpdateOK), nil - -} - -/* -IPAMVlanGroupsRead Call to super to allow for caching -*/ -func (a *Client) IPAMVlanGroupsRead(params *IPAMVlanGroupsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlanGroupsReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVlanGroupsReadParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vlan-groups_read", - Method: "GET", - PathPattern: "/ipam/vlan-groups/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVlanGroupsReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVlanGroupsReadOK), nil - -} - -/* -IPAMVlanGroupsUpdate ipam vlan groups update API -*/ -func (a *Client) IPAMVlanGroupsUpdate(params *IPAMVlanGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlanGroupsUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVlanGroupsUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vlan-groups_update", - Method: "PUT", - PathPattern: "/ipam/vlan-groups/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVlanGroupsUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVlanGroupsUpdateOK), nil - -} - -/* -IPAMVlansCreate ipam vlans create API -*/ -func (a *Client) IPAMVlansCreate(params *IPAMVlansCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlansCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVlansCreateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vlans_create", - Method: "POST", - PathPattern: "/ipam/vlans/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVlansCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVlansCreateCreated), nil - -} - -/* -IPAMVlansDelete ipam vlans delete API -*/ -func (a *Client) IPAMVlansDelete(params *IPAMVlansDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlansDeleteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVlansDeleteParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vlans_delete", - Method: "DELETE", - PathPattern: "/ipam/vlans/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVlansDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVlansDeleteNoContent), nil - -} - -/* -IPAMVlansList Call to super to allow for caching -*/ -func (a *Client) IPAMVlansList(params *IPAMVlansListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlansListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVlansListParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vlans_list", - Method: "GET", - PathPattern: "/ipam/vlans/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVlansListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVlansListOK), nil - -} - -/* -IPAMVlansPartialUpdate ipam vlans partial update API -*/ -func (a *Client) IPAMVlansPartialUpdate(params *IPAMVlansPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlansPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVlansPartialUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vlans_partial_update", - Method: "PATCH", - PathPattern: "/ipam/vlans/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVlansPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVlansPartialUpdateOK), nil - -} - -/* -IPAMVlansRead Call to super to allow for caching -*/ -func (a *Client) IPAMVlansRead(params *IPAMVlansReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlansReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVlansReadParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vlans_read", - Method: "GET", - PathPattern: "/ipam/vlans/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVlansReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVlansReadOK), nil - -} - -/* -IPAMVlansUpdate ipam vlans update API -*/ -func (a *Client) IPAMVlansUpdate(params *IPAMVlansUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlansUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVlansUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vlans_update", - Method: "PUT", - PathPattern: "/ipam/vlans/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVlansUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVlansUpdateOK), nil - -} - -/* -IPAMVrfsCreate ipam vrfs create API -*/ -func (a *Client) IPAMVrfsCreate(params *IPAMVrfsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVrfsCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVrfsCreateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vrfs_create", - Method: "POST", - PathPattern: "/ipam/vrfs/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVrfsCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVrfsCreateCreated), nil - -} - -/* -IPAMVrfsDelete ipam vrfs delete API -*/ -func (a *Client) IPAMVrfsDelete(params *IPAMVrfsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVrfsDeleteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVrfsDeleteParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vrfs_delete", - Method: "DELETE", - PathPattern: "/ipam/vrfs/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVrfsDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVrfsDeleteNoContent), nil - -} - -/* -IPAMVrfsList Call to super to allow for caching -*/ -func (a *Client) IPAMVrfsList(params *IPAMVrfsListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVrfsListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVrfsListParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vrfs_list", - Method: "GET", - PathPattern: "/ipam/vrfs/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVrfsListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVrfsListOK), nil - -} - -/* -IPAMVrfsPartialUpdate ipam vrfs partial update API -*/ -func (a *Client) IPAMVrfsPartialUpdate(params *IPAMVrfsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVrfsPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVrfsPartialUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vrfs_partial_update", - Method: "PATCH", - PathPattern: "/ipam/vrfs/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVrfsPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVrfsPartialUpdateOK), nil - -} - -/* -IPAMVrfsRead Call to super to allow for caching -*/ -func (a *Client) IPAMVrfsRead(params *IPAMVrfsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVrfsReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVrfsReadParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vrfs_read", - Method: "GET", - PathPattern: "/ipam/vrfs/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVrfsReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVrfsReadOK), nil - -} - -/* -IPAMVrfsUpdate ipam vrfs update API -*/ -func (a *Client) IPAMVrfsUpdate(params *IPAMVrfsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVrfsUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIPAMVrfsUpdateParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ipam_vrfs_update", - Method: "PUT", - PathPattern: "/ipam/vrfs/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &IPAMVrfsUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*IPAMVrfsUpdateOK), nil - -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/netbox/client/ipam/ip_a_m_aggregates_create_parameters.go b/netbox/client/ipam/ipam_aggregates_create_parameters.go similarity index 63% rename from netbox/client/ipam/ip_a_m_aggregates_create_parameters.go rename to netbox/client/ipam/ipam_aggregates_create_parameters.go index 1cddd72be665369d8646de30df75befd1f3ca842..ec1fc76b0ad80a57c9d910fef37ffa0a299af71b 100644 --- a/netbox/client/ipam/ip_a_m_aggregates_create_parameters.go +++ b/netbox/client/ipam/ipam_aggregates_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -30,52 +31,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMAggregatesCreateParams creates a new IPAMAggregatesCreateParams object +// NewIpamAggregatesCreateParams creates a new IpamAggregatesCreateParams object // with the default values initialized. -func NewIPAMAggregatesCreateParams() *IPAMAggregatesCreateParams { +func NewIpamAggregatesCreateParams() *IpamAggregatesCreateParams { var () - return &IPAMAggregatesCreateParams{ + return &IpamAggregatesCreateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMAggregatesCreateParamsWithTimeout creates a new IPAMAggregatesCreateParams object +// NewIpamAggregatesCreateParamsWithTimeout creates a new IpamAggregatesCreateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMAggregatesCreateParamsWithTimeout(timeout time.Duration) *IPAMAggregatesCreateParams { +func NewIpamAggregatesCreateParamsWithTimeout(timeout time.Duration) *IpamAggregatesCreateParams { var () - return &IPAMAggregatesCreateParams{ + return &IpamAggregatesCreateParams{ timeout: timeout, } } -// NewIPAMAggregatesCreateParamsWithContext creates a new IPAMAggregatesCreateParams object +// NewIpamAggregatesCreateParamsWithContext creates a new IpamAggregatesCreateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMAggregatesCreateParamsWithContext(ctx context.Context) *IPAMAggregatesCreateParams { +func NewIpamAggregatesCreateParamsWithContext(ctx context.Context) *IpamAggregatesCreateParams { var () - return &IPAMAggregatesCreateParams{ + return &IpamAggregatesCreateParams{ Context: ctx, } } -// NewIPAMAggregatesCreateParamsWithHTTPClient creates a new IPAMAggregatesCreateParams object +// NewIpamAggregatesCreateParamsWithHTTPClient creates a new IpamAggregatesCreateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMAggregatesCreateParamsWithHTTPClient(client *http.Client) *IPAMAggregatesCreateParams { +func NewIpamAggregatesCreateParamsWithHTTPClient(client *http.Client) *IpamAggregatesCreateParams { var () - return &IPAMAggregatesCreateParams{ + return &IpamAggregatesCreateParams{ HTTPClient: client, } } -/*IPAMAggregatesCreateParams contains all the parameters to send to the API endpoint +/*IpamAggregatesCreateParams contains all the parameters to send to the API endpoint for the ipam aggregates create operation typically these are written to a http.Request */ -type IPAMAggregatesCreateParams struct { +type IpamAggregatesCreateParams struct { /*Data*/ Data *models.WritableAggregate @@ -86,51 +87,51 @@ type IPAMAggregatesCreateParams struct { } // WithTimeout adds the timeout to the ipam aggregates create params -func (o *IPAMAggregatesCreateParams) WithTimeout(timeout time.Duration) *IPAMAggregatesCreateParams { +func (o *IpamAggregatesCreateParams) WithTimeout(timeout time.Duration) *IpamAggregatesCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam aggregates create params -func (o *IPAMAggregatesCreateParams) SetTimeout(timeout time.Duration) { +func (o *IpamAggregatesCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam aggregates create params -func (o *IPAMAggregatesCreateParams) WithContext(ctx context.Context) *IPAMAggregatesCreateParams { +func (o *IpamAggregatesCreateParams) WithContext(ctx context.Context) *IpamAggregatesCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam aggregates create params -func (o *IPAMAggregatesCreateParams) SetContext(ctx context.Context) { +func (o *IpamAggregatesCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam aggregates create params -func (o *IPAMAggregatesCreateParams) WithHTTPClient(client *http.Client) *IPAMAggregatesCreateParams { +func (o *IpamAggregatesCreateParams) WithHTTPClient(client *http.Client) *IpamAggregatesCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam aggregates create params -func (o *IPAMAggregatesCreateParams) SetHTTPClient(client *http.Client) { +func (o *IpamAggregatesCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam aggregates create params -func (o *IPAMAggregatesCreateParams) WithData(data *models.WritableAggregate) *IPAMAggregatesCreateParams { +func (o *IpamAggregatesCreateParams) WithData(data *models.WritableAggregate) *IpamAggregatesCreateParams { o.SetData(data) return o } // SetData adds the data to the ipam aggregates create params -func (o *IPAMAggregatesCreateParams) SetData(data *models.WritableAggregate) { +func (o *IpamAggregatesCreateParams) SetData(data *models.WritableAggregate) { o.Data = data } // WriteToRequest writes these params to a swagger request -func (o *IPAMAggregatesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamAggregatesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_aggregates_create_responses.go b/netbox/client/ipam/ipam_aggregates_create_responses.go similarity index 68% rename from netbox/client/ipam/ip_a_m_aggregates_create_responses.go rename to netbox/client/ipam/ipam_aggregates_create_responses.go index 9cb293c20cc0cba99a407b061c2d07ac6e769690..3173650a2796f2a39b7c01f81d99279b14726a90 100644 --- a/netbox/client/ipam/ip_a_m_aggregates_create_responses.go +++ b/netbox/client/ipam/ipam_aggregates_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMAggregatesCreateReader is a Reader for the IPAMAggregatesCreate structure. -type IPAMAggregatesCreateReader struct { +// IpamAggregatesCreateReader is a Reader for the IpamAggregatesCreate structure. +type IpamAggregatesCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMAggregatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamAggregatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: - result := NewIPAMAggregatesCreateCreated() + result := NewIpamAggregatesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMAggregatesCreateReader) ReadResponse(response runtime.ClientRespons } } -// NewIPAMAggregatesCreateCreated creates a IPAMAggregatesCreateCreated with default headers values -func NewIPAMAggregatesCreateCreated() *IPAMAggregatesCreateCreated { - return &IPAMAggregatesCreateCreated{} +// NewIpamAggregatesCreateCreated creates a IpamAggregatesCreateCreated with default headers values +func NewIpamAggregatesCreateCreated() *IpamAggregatesCreateCreated { + return &IpamAggregatesCreateCreated{} } -/*IPAMAggregatesCreateCreated handles this case with default header values. +/*IpamAggregatesCreateCreated handles this case with default header values. -IPAMAggregatesCreateCreated ipam aggregates create created +IpamAggregatesCreateCreated ipam aggregates create created */ -type IPAMAggregatesCreateCreated struct { +type IpamAggregatesCreateCreated struct { Payload *models.Aggregate } -func (o *IPAMAggregatesCreateCreated) Error() string { +func (o *IpamAggregatesCreateCreated) Error() string { return fmt.Sprintf("[POST /ipam/aggregates/][%d] ipamAggregatesCreateCreated %+v", 201, o.Payload) } -func (o *IPAMAggregatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamAggregatesCreateCreated) GetPayload() *models.Aggregate { + return o.Payload +} + +func (o *IpamAggregatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Aggregate) diff --git a/netbox/client/ipam/ip_a_m_aggregates_delete_parameters.go b/netbox/client/ipam/ipam_aggregates_delete_parameters.go similarity index 65% rename from netbox/client/ipam/ip_a_m_aggregates_delete_parameters.go rename to netbox/client/ipam/ipam_aggregates_delete_parameters.go index 34f3540d466d625ee46c3c71cb58cf704895b0bb..60559a3d8591e1503feb15655f157e8ded567b5a 100644 --- a/netbox/client/ipam/ip_a_m_aggregates_delete_parameters.go +++ b/netbox/client/ipam/ipam_aggregates_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMAggregatesDeleteParams creates a new IPAMAggregatesDeleteParams object +// NewIpamAggregatesDeleteParams creates a new IpamAggregatesDeleteParams object // with the default values initialized. -func NewIPAMAggregatesDeleteParams() *IPAMAggregatesDeleteParams { +func NewIpamAggregatesDeleteParams() *IpamAggregatesDeleteParams { var () - return &IPAMAggregatesDeleteParams{ + return &IpamAggregatesDeleteParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMAggregatesDeleteParamsWithTimeout creates a new IPAMAggregatesDeleteParams object +// NewIpamAggregatesDeleteParamsWithTimeout creates a new IpamAggregatesDeleteParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMAggregatesDeleteParamsWithTimeout(timeout time.Duration) *IPAMAggregatesDeleteParams { +func NewIpamAggregatesDeleteParamsWithTimeout(timeout time.Duration) *IpamAggregatesDeleteParams { var () - return &IPAMAggregatesDeleteParams{ + return &IpamAggregatesDeleteParams{ timeout: timeout, } } -// NewIPAMAggregatesDeleteParamsWithContext creates a new IPAMAggregatesDeleteParams object +// NewIpamAggregatesDeleteParamsWithContext creates a new IpamAggregatesDeleteParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMAggregatesDeleteParamsWithContext(ctx context.Context) *IPAMAggregatesDeleteParams { +func NewIpamAggregatesDeleteParamsWithContext(ctx context.Context) *IpamAggregatesDeleteParams { var () - return &IPAMAggregatesDeleteParams{ + return &IpamAggregatesDeleteParams{ Context: ctx, } } -// NewIPAMAggregatesDeleteParamsWithHTTPClient creates a new IPAMAggregatesDeleteParams object +// NewIpamAggregatesDeleteParamsWithHTTPClient creates a new IpamAggregatesDeleteParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMAggregatesDeleteParamsWithHTTPClient(client *http.Client) *IPAMAggregatesDeleteParams { +func NewIpamAggregatesDeleteParamsWithHTTPClient(client *http.Client) *IpamAggregatesDeleteParams { var () - return &IPAMAggregatesDeleteParams{ + return &IpamAggregatesDeleteParams{ HTTPClient: client, } } -/*IPAMAggregatesDeleteParams contains all the parameters to send to the API endpoint +/*IpamAggregatesDeleteParams contains all the parameters to send to the API endpoint for the ipam aggregates delete operation typically these are written to a http.Request */ -type IPAMAggregatesDeleteParams struct { +type IpamAggregatesDeleteParams struct { /*ID A unique integer value identifying this aggregate. @@ -88,51 +89,51 @@ type IPAMAggregatesDeleteParams struct { } // WithTimeout adds the timeout to the ipam aggregates delete params -func (o *IPAMAggregatesDeleteParams) WithTimeout(timeout time.Duration) *IPAMAggregatesDeleteParams { +func (o *IpamAggregatesDeleteParams) WithTimeout(timeout time.Duration) *IpamAggregatesDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam aggregates delete params -func (o *IPAMAggregatesDeleteParams) SetTimeout(timeout time.Duration) { +func (o *IpamAggregatesDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam aggregates delete params -func (o *IPAMAggregatesDeleteParams) WithContext(ctx context.Context) *IPAMAggregatesDeleteParams { +func (o *IpamAggregatesDeleteParams) WithContext(ctx context.Context) *IpamAggregatesDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam aggregates delete params -func (o *IPAMAggregatesDeleteParams) SetContext(ctx context.Context) { +func (o *IpamAggregatesDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam aggregates delete params -func (o *IPAMAggregatesDeleteParams) WithHTTPClient(client *http.Client) *IPAMAggregatesDeleteParams { +func (o *IpamAggregatesDeleteParams) WithHTTPClient(client *http.Client) *IpamAggregatesDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam aggregates delete params -func (o *IPAMAggregatesDeleteParams) SetHTTPClient(client *http.Client) { +func (o *IpamAggregatesDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam aggregates delete params -func (o *IPAMAggregatesDeleteParams) WithID(id int64) *IPAMAggregatesDeleteParams { +func (o *IpamAggregatesDeleteParams) WithID(id int64) *IpamAggregatesDeleteParams { o.SetID(id) return o } // SetID adds the id to the ipam aggregates delete params -func (o *IPAMAggregatesDeleteParams) SetID(id int64) { +func (o *IpamAggregatesDeleteParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMAggregatesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamAggregatesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_aggregates_delete_responses.go b/netbox/client/ipam/ipam_aggregates_delete_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_aggregates_delete_responses.go rename to netbox/client/ipam/ipam_aggregates_delete_responses.go index 32812e171f6290c2a8766fece63d913770241c81..b0eb72bec213a36013e7f01b64abe7c849a8d8a0 100644 --- a/netbox/client/ipam/ip_a_m_aggregates_delete_responses.go +++ b/netbox/client/ipam/ipam_aggregates_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,17 +28,16 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// IPAMAggregatesDeleteReader is a Reader for the IPAMAggregatesDelete structure. -type IPAMAggregatesDeleteReader struct { +// IpamAggregatesDeleteReader is a Reader for the IpamAggregatesDelete structure. +type IpamAggregatesDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMAggregatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamAggregatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: - result := NewIPAMAggregatesDeleteNoContent() + result := NewIpamAggregatesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -48,23 +48,23 @@ func (o *IPAMAggregatesDeleteReader) ReadResponse(response runtime.ClientRespons } } -// NewIPAMAggregatesDeleteNoContent creates a IPAMAggregatesDeleteNoContent with default headers values -func NewIPAMAggregatesDeleteNoContent() *IPAMAggregatesDeleteNoContent { - return &IPAMAggregatesDeleteNoContent{} +// NewIpamAggregatesDeleteNoContent creates a IpamAggregatesDeleteNoContent with default headers values +func NewIpamAggregatesDeleteNoContent() *IpamAggregatesDeleteNoContent { + return &IpamAggregatesDeleteNoContent{} } -/*IPAMAggregatesDeleteNoContent handles this case with default header values. +/*IpamAggregatesDeleteNoContent handles this case with default header values. -IPAMAggregatesDeleteNoContent ipam aggregates delete no content +IpamAggregatesDeleteNoContent ipam aggregates delete no content */ -type IPAMAggregatesDeleteNoContent struct { +type IpamAggregatesDeleteNoContent struct { } -func (o *IPAMAggregatesDeleteNoContent) Error() string { +func (o *IpamAggregatesDeleteNoContent) Error() string { return fmt.Sprintf("[DELETE /ipam/aggregates/{id}/][%d] ipamAggregatesDeleteNoContent ", 204) } -func (o *IPAMAggregatesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamAggregatesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/ipam/ip_a_m_aggregates_list_parameters.go b/netbox/client/ipam/ipam_aggregates_list_parameters.go similarity index 50% rename from netbox/client/ipam/ip_a_m_aggregates_list_parameters.go rename to netbox/client/ipam/ipam_aggregates_list_parameters.go index 728616354dd9dcdfcb64c10132194e296d5fbace..32524baed9dab2d92162b26c8442eee825de2e95 100644 --- a/netbox/client/ipam/ip_a_m_aggregates_list_parameters.go +++ b/netbox/client/ipam/ipam_aggregates_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,50 +33,56 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMAggregatesListParams creates a new IPAMAggregatesListParams object +// NewIpamAggregatesListParams creates a new IpamAggregatesListParams object // with the default values initialized. -func NewIPAMAggregatesListParams() *IPAMAggregatesListParams { +func NewIpamAggregatesListParams() *IpamAggregatesListParams { var () - return &IPAMAggregatesListParams{ + return &IpamAggregatesListParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMAggregatesListParamsWithTimeout creates a new IPAMAggregatesListParams object +// NewIpamAggregatesListParamsWithTimeout creates a new IpamAggregatesListParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMAggregatesListParamsWithTimeout(timeout time.Duration) *IPAMAggregatesListParams { +func NewIpamAggregatesListParamsWithTimeout(timeout time.Duration) *IpamAggregatesListParams { var () - return &IPAMAggregatesListParams{ + return &IpamAggregatesListParams{ timeout: timeout, } } -// NewIPAMAggregatesListParamsWithContext creates a new IPAMAggregatesListParams object +// NewIpamAggregatesListParamsWithContext creates a new IpamAggregatesListParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMAggregatesListParamsWithContext(ctx context.Context) *IPAMAggregatesListParams { +func NewIpamAggregatesListParamsWithContext(ctx context.Context) *IpamAggregatesListParams { var () - return &IPAMAggregatesListParams{ + return &IpamAggregatesListParams{ Context: ctx, } } -// NewIPAMAggregatesListParamsWithHTTPClient creates a new IPAMAggregatesListParams object +// NewIpamAggregatesListParamsWithHTTPClient creates a new IpamAggregatesListParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMAggregatesListParamsWithHTTPClient(client *http.Client) *IPAMAggregatesListParams { +func NewIpamAggregatesListParamsWithHTTPClient(client *http.Client) *IpamAggregatesListParams { var () - return &IPAMAggregatesListParams{ + return &IpamAggregatesListParams{ HTTPClient: client, } } -/*IPAMAggregatesListParams contains all the parameters to send to the API endpoint +/*IpamAggregatesListParams contains all the parameters to send to the API endpoint for the ipam aggregates list operation typically these are written to a http.Request */ -type IPAMAggregatesListParams struct { - +type IpamAggregatesListParams struct { + + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*DateAdded*/ DateAdded *string /*Family*/ @@ -85,6 +92,12 @@ type IPAMAggregatesListParams struct { */ IDIn *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. @@ -112,156 +125,270 @@ type IPAMAggregatesListParams struct { } // WithTimeout adds the timeout to the ipam aggregates list params -func (o *IPAMAggregatesListParams) WithTimeout(timeout time.Duration) *IPAMAggregatesListParams { +func (o *IpamAggregatesListParams) WithTimeout(timeout time.Duration) *IpamAggregatesListParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam aggregates list params -func (o *IPAMAggregatesListParams) SetTimeout(timeout time.Duration) { +func (o *IpamAggregatesListParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam aggregates list params -func (o *IPAMAggregatesListParams) WithContext(ctx context.Context) *IPAMAggregatesListParams { +func (o *IpamAggregatesListParams) WithContext(ctx context.Context) *IpamAggregatesListParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam aggregates list params -func (o *IPAMAggregatesListParams) SetContext(ctx context.Context) { +func (o *IpamAggregatesListParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam aggregates list params -func (o *IPAMAggregatesListParams) WithHTTPClient(client *http.Client) *IPAMAggregatesListParams { +func (o *IpamAggregatesListParams) WithHTTPClient(client *http.Client) *IpamAggregatesListParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam aggregates list params -func (o *IPAMAggregatesListParams) SetHTTPClient(client *http.Client) { +func (o *IpamAggregatesListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithCreated adds the created to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithCreated(created *string) *IpamAggregatesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithCreatedGte(createdGte *string) *IpamAggregatesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithCreatedLte(createdLte *string) *IpamAggregatesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + // WithDateAdded adds the dateAdded to the ipam aggregates list params -func (o *IPAMAggregatesListParams) WithDateAdded(dateAdded *string) *IPAMAggregatesListParams { +func (o *IpamAggregatesListParams) WithDateAdded(dateAdded *string) *IpamAggregatesListParams { o.SetDateAdded(dateAdded) return o } // SetDateAdded adds the dateAdded to the ipam aggregates list params -func (o *IPAMAggregatesListParams) SetDateAdded(dateAdded *string) { +func (o *IpamAggregatesListParams) SetDateAdded(dateAdded *string) { o.DateAdded = dateAdded } // WithFamily adds the family to the ipam aggregates list params -func (o *IPAMAggregatesListParams) WithFamily(family *string) *IPAMAggregatesListParams { +func (o *IpamAggregatesListParams) WithFamily(family *string) *IpamAggregatesListParams { o.SetFamily(family) return o } // SetFamily adds the family to the ipam aggregates list params -func (o *IPAMAggregatesListParams) SetFamily(family *string) { +func (o *IpamAggregatesListParams) SetFamily(family *string) { o.Family = family } // WithIDIn adds the iDIn to the ipam aggregates list params -func (o *IPAMAggregatesListParams) WithIDIn(iDIn *string) *IPAMAggregatesListParams { +func (o *IpamAggregatesListParams) WithIDIn(iDIn *string) *IpamAggregatesListParams { o.SetIDIn(iDIn) return o } // SetIDIn adds the idIn to the ipam aggregates list params -func (o *IPAMAggregatesListParams) SetIDIn(iDIn *string) { +func (o *IpamAggregatesListParams) SetIDIn(iDIn *string) { o.IDIn = iDIn } +// WithLastUpdated adds the lastUpdated to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithLastUpdated(lastUpdated *string) *IpamAggregatesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamAggregatesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamAggregatesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the ipam aggregates list params -func (o *IPAMAggregatesListParams) WithLimit(limit *int64) *IPAMAggregatesListParams { +func (o *IpamAggregatesListParams) WithLimit(limit *int64) *IpamAggregatesListParams { o.SetLimit(limit) return o } // SetLimit adds the limit to the ipam aggregates list params -func (o *IPAMAggregatesListParams) SetLimit(limit *int64) { +func (o *IpamAggregatesListParams) SetLimit(limit *int64) { o.Limit = limit } // WithOffset adds the offset to the ipam aggregates list params -func (o *IPAMAggregatesListParams) WithOffset(offset *int64) *IPAMAggregatesListParams { +func (o *IpamAggregatesListParams) WithOffset(offset *int64) *IpamAggregatesListParams { o.SetOffset(offset) return o } // SetOffset adds the offset to the ipam aggregates list params -func (o *IPAMAggregatesListParams) SetOffset(offset *int64) { +func (o *IpamAggregatesListParams) SetOffset(offset *int64) { o.Offset = offset } // WithPrefix adds the prefix to the ipam aggregates list params -func (o *IPAMAggregatesListParams) WithPrefix(prefix *string) *IPAMAggregatesListParams { +func (o *IpamAggregatesListParams) WithPrefix(prefix *string) *IpamAggregatesListParams { o.SetPrefix(prefix) return o } // SetPrefix adds the prefix to the ipam aggregates list params -func (o *IPAMAggregatesListParams) SetPrefix(prefix *string) { +func (o *IpamAggregatesListParams) SetPrefix(prefix *string) { o.Prefix = prefix } // WithQ adds the q to the ipam aggregates list params -func (o *IPAMAggregatesListParams) WithQ(q *string) *IPAMAggregatesListParams { +func (o *IpamAggregatesListParams) WithQ(q *string) *IpamAggregatesListParams { o.SetQ(q) return o } // SetQ adds the q to the ipam aggregates list params -func (o *IPAMAggregatesListParams) SetQ(q *string) { +func (o *IpamAggregatesListParams) SetQ(q *string) { o.Q = q } // WithRir adds the rir to the ipam aggregates list params -func (o *IPAMAggregatesListParams) WithRir(rir *string) *IPAMAggregatesListParams { +func (o *IpamAggregatesListParams) WithRir(rir *string) *IpamAggregatesListParams { o.SetRir(rir) return o } // SetRir adds the rir to the ipam aggregates list params -func (o *IPAMAggregatesListParams) SetRir(rir *string) { +func (o *IpamAggregatesListParams) SetRir(rir *string) { o.Rir = rir } // WithRirID adds the rirID to the ipam aggregates list params -func (o *IPAMAggregatesListParams) WithRirID(rirID *string) *IPAMAggregatesListParams { +func (o *IpamAggregatesListParams) WithRirID(rirID *string) *IpamAggregatesListParams { o.SetRirID(rirID) return o } // SetRirID adds the rirId to the ipam aggregates list params -func (o *IPAMAggregatesListParams) SetRirID(rirID *string) { +func (o *IpamAggregatesListParams) SetRirID(rirID *string) { o.RirID = rirID } // WithTag adds the tag to the ipam aggregates list params -func (o *IPAMAggregatesListParams) WithTag(tag *string) *IPAMAggregatesListParams { +func (o *IpamAggregatesListParams) WithTag(tag *string) *IpamAggregatesListParams { o.SetTag(tag) return o } // SetTag adds the tag to the ipam aggregates list params -func (o *IPAMAggregatesListParams) SetTag(tag *string) { +func (o *IpamAggregatesListParams) SetTag(tag *string) { o.Tag = tag } // WriteToRequest writes these params to a swagger request -func (o *IPAMAggregatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamAggregatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error + if o.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.DateAdded != nil { // query param date_added @@ -310,6 +437,54 @@ func (o *IPAMAggregatesListParams) WriteToRequest(r runtime.ClientRequest, reg s } + 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 diff --git a/netbox/client/ipam/ip_a_m_aggregates_list_responses.go b/netbox/client/ipam/ipam_aggregates_list_responses.go similarity index 71% rename from netbox/client/ipam/ip_a_m_aggregates_list_responses.go rename to netbox/client/ipam/ipam_aggregates_list_responses.go index 0880fa81c558bcee676300e287fc61a2428c8d3a..8a93350452878780daba0c22ca6adb87ca051770 100644 --- a/netbox/client/ipam/ip_a_m_aggregates_list_responses.go +++ b/netbox/client/ipam/ipam_aggregates_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,20 +32,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMAggregatesListReader is a Reader for the IPAMAggregatesList structure. -type IPAMAggregatesListReader struct { +// IpamAggregatesListReader is a Reader for the IpamAggregatesList structure. +type IpamAggregatesListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMAggregatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamAggregatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMAggregatesListOK() + result := NewIpamAggregatesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -55,26 +55,30 @@ func (o *IPAMAggregatesListReader) ReadResponse(response runtime.ClientResponse, } } -// NewIPAMAggregatesListOK creates a IPAMAggregatesListOK with default headers values -func NewIPAMAggregatesListOK() *IPAMAggregatesListOK { - return &IPAMAggregatesListOK{} +// NewIpamAggregatesListOK creates a IpamAggregatesListOK with default headers values +func NewIpamAggregatesListOK() *IpamAggregatesListOK { + return &IpamAggregatesListOK{} } -/*IPAMAggregatesListOK handles this case with default header values. +/*IpamAggregatesListOK handles this case with default header values. -IPAMAggregatesListOK ipam aggregates list o k +IpamAggregatesListOK ipam aggregates list o k */ -type IPAMAggregatesListOK struct { - Payload *IPAMAggregatesListOKBody +type IpamAggregatesListOK struct { + Payload *IpamAggregatesListOKBody } -func (o *IPAMAggregatesListOK) Error() string { +func (o *IpamAggregatesListOK) Error() string { return fmt.Sprintf("[GET /ipam/aggregates/][%d] ipamAggregatesListOK %+v", 200, o.Payload) } -func (o *IPAMAggregatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamAggregatesListOK) GetPayload() *IpamAggregatesListOKBody { + return o.Payload +} + +func (o *IpamAggregatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(IPAMAggregatesListOKBody) + o.Payload = new(IpamAggregatesListOKBody) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -84,10 +88,10 @@ func (o *IPAMAggregatesListOK) readResponse(response runtime.ClientResponse, con return nil } -/*IPAMAggregatesListOKBody IP a m aggregates list o k body -swagger:model IPAMAggregatesListOKBody +/*IpamAggregatesListOKBody ipam aggregates list o k body +swagger:model IpamAggregatesListOKBody */ -type IPAMAggregatesListOKBody struct { +type IpamAggregatesListOKBody struct { // count // Required: true @@ -106,8 +110,8 @@ type IPAMAggregatesListOKBody struct { Results []*models.Aggregate `json:"results"` } -// Validate validates this IP a m aggregates list o k body -func (o *IPAMAggregatesListOKBody) Validate(formats strfmt.Registry) error { +// Validate validates this ipam aggregates list o k body +func (o *IpamAggregatesListOKBody) Validate(formats strfmt.Registry) error { var res []error if err := o.validateCount(formats); err != nil { @@ -132,7 +136,7 @@ func (o *IPAMAggregatesListOKBody) Validate(formats strfmt.Registry) error { return nil } -func (o *IPAMAggregatesListOKBody) validateCount(formats strfmt.Registry) error { +func (o *IpamAggregatesListOKBody) validateCount(formats strfmt.Registry) error { if err := validate.Required("ipamAggregatesListOK"+"."+"count", "body", o.Count); err != nil { return err @@ -141,7 +145,7 @@ func (o *IPAMAggregatesListOKBody) validateCount(formats strfmt.Registry) error return nil } -func (o *IPAMAggregatesListOKBody) validateNext(formats strfmt.Registry) error { +func (o *IpamAggregatesListOKBody) validateNext(formats strfmt.Registry) error { if swag.IsZero(o.Next) { // not required return nil @@ -154,7 +158,7 @@ func (o *IPAMAggregatesListOKBody) validateNext(formats strfmt.Registry) error { return nil } -func (o *IPAMAggregatesListOKBody) validatePrevious(formats strfmt.Registry) error { +func (o *IpamAggregatesListOKBody) validatePrevious(formats strfmt.Registry) error { if swag.IsZero(o.Previous) { // not required return nil @@ -167,7 +171,7 @@ func (o *IPAMAggregatesListOKBody) validatePrevious(formats strfmt.Registry) err return nil } -func (o *IPAMAggregatesListOKBody) validateResults(formats strfmt.Registry) error { +func (o *IpamAggregatesListOKBody) validateResults(formats strfmt.Registry) error { if err := validate.Required("ipamAggregatesListOK"+"."+"results", "body", o.Results); err != nil { return err @@ -193,7 +197,7 @@ func (o *IPAMAggregatesListOKBody) validateResults(formats strfmt.Registry) erro } // MarshalBinary interface implementation -func (o *IPAMAggregatesListOKBody) MarshalBinary() ([]byte, error) { +func (o *IpamAggregatesListOKBody) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -201,8 +205,8 @@ func (o *IPAMAggregatesListOKBody) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *IPAMAggregatesListOKBody) UnmarshalBinary(b []byte) error { - var res IPAMAggregatesListOKBody +func (o *IpamAggregatesListOKBody) UnmarshalBinary(b []byte) error { + var res IpamAggregatesListOKBody if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/netbox/client/ipam/ip_a_m_aggregates_partial_update_parameters.go b/netbox/client/ipam/ipam_aggregates_partial_update_parameters.go similarity index 61% rename from netbox/client/ipam/ip_a_m_aggregates_partial_update_parameters.go rename to netbox/client/ipam/ipam_aggregates_partial_update_parameters.go index d40b462bcf09e24eba0c076a18932706e04ba4eb..490efc21b81c903f05b3cd8abb42ea67dc505e4c 100644 --- a/netbox/client/ipam/ip_a_m_aggregates_partial_update_parameters.go +++ b/netbox/client/ipam/ipam_aggregates_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMAggregatesPartialUpdateParams creates a new IPAMAggregatesPartialUpdateParams object +// NewIpamAggregatesPartialUpdateParams creates a new IpamAggregatesPartialUpdateParams object // with the default values initialized. -func NewIPAMAggregatesPartialUpdateParams() *IPAMAggregatesPartialUpdateParams { +func NewIpamAggregatesPartialUpdateParams() *IpamAggregatesPartialUpdateParams { var () - return &IPAMAggregatesPartialUpdateParams{ + return &IpamAggregatesPartialUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMAggregatesPartialUpdateParamsWithTimeout creates a new IPAMAggregatesPartialUpdateParams object +// NewIpamAggregatesPartialUpdateParamsWithTimeout creates a new IpamAggregatesPartialUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMAggregatesPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMAggregatesPartialUpdateParams { +func NewIpamAggregatesPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamAggregatesPartialUpdateParams { var () - return &IPAMAggregatesPartialUpdateParams{ + return &IpamAggregatesPartialUpdateParams{ timeout: timeout, } } -// NewIPAMAggregatesPartialUpdateParamsWithContext creates a new IPAMAggregatesPartialUpdateParams object +// NewIpamAggregatesPartialUpdateParamsWithContext creates a new IpamAggregatesPartialUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMAggregatesPartialUpdateParamsWithContext(ctx context.Context) *IPAMAggregatesPartialUpdateParams { +func NewIpamAggregatesPartialUpdateParamsWithContext(ctx context.Context) *IpamAggregatesPartialUpdateParams { var () - return &IPAMAggregatesPartialUpdateParams{ + return &IpamAggregatesPartialUpdateParams{ Context: ctx, } } -// NewIPAMAggregatesPartialUpdateParamsWithHTTPClient creates a new IPAMAggregatesPartialUpdateParams object +// NewIpamAggregatesPartialUpdateParamsWithHTTPClient creates a new IpamAggregatesPartialUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMAggregatesPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMAggregatesPartialUpdateParams { +func NewIpamAggregatesPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamAggregatesPartialUpdateParams { var () - return &IPAMAggregatesPartialUpdateParams{ + return &IpamAggregatesPartialUpdateParams{ HTTPClient: client, } } -/*IPAMAggregatesPartialUpdateParams contains all the parameters to send to the API endpoint +/*IpamAggregatesPartialUpdateParams contains all the parameters to send to the API endpoint for the ipam aggregates partial update operation typically these are written to a http.Request */ -type IPAMAggregatesPartialUpdateParams struct { +type IpamAggregatesPartialUpdateParams struct { /*Data*/ Data *models.WritableAggregate @@ -92,62 +93,62 @@ type IPAMAggregatesPartialUpdateParams struct { } // WithTimeout adds the timeout to the ipam aggregates partial update params -func (o *IPAMAggregatesPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMAggregatesPartialUpdateParams { +func (o *IpamAggregatesPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamAggregatesPartialUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam aggregates partial update params -func (o *IPAMAggregatesPartialUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamAggregatesPartialUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam aggregates partial update params -func (o *IPAMAggregatesPartialUpdateParams) WithContext(ctx context.Context) *IPAMAggregatesPartialUpdateParams { +func (o *IpamAggregatesPartialUpdateParams) WithContext(ctx context.Context) *IpamAggregatesPartialUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam aggregates partial update params -func (o *IPAMAggregatesPartialUpdateParams) SetContext(ctx context.Context) { +func (o *IpamAggregatesPartialUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam aggregates partial update params -func (o *IPAMAggregatesPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMAggregatesPartialUpdateParams { +func (o *IpamAggregatesPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamAggregatesPartialUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam aggregates partial update params -func (o *IPAMAggregatesPartialUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamAggregatesPartialUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam aggregates partial update params -func (o *IPAMAggregatesPartialUpdateParams) WithData(data *models.WritableAggregate) *IPAMAggregatesPartialUpdateParams { +func (o *IpamAggregatesPartialUpdateParams) WithData(data *models.WritableAggregate) *IpamAggregatesPartialUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam aggregates partial update params -func (o *IPAMAggregatesPartialUpdateParams) SetData(data *models.WritableAggregate) { +func (o *IpamAggregatesPartialUpdateParams) SetData(data *models.WritableAggregate) { o.Data = data } // WithID adds the id to the ipam aggregates partial update params -func (o *IPAMAggregatesPartialUpdateParams) WithID(id int64) *IPAMAggregatesPartialUpdateParams { +func (o *IpamAggregatesPartialUpdateParams) WithID(id int64) *IpamAggregatesPartialUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam aggregates partial update params -func (o *IPAMAggregatesPartialUpdateParams) SetID(id int64) { +func (o *IpamAggregatesPartialUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMAggregatesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamAggregatesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_aggregates_partial_update_responses.go b/netbox/client/ipam/ipam_aggregates_partial_update_responses.go similarity index 68% rename from netbox/client/ipam/ip_a_m_aggregates_partial_update_responses.go rename to netbox/client/ipam/ipam_aggregates_partial_update_responses.go index 8dfc2addcc9d39201a41d18c6787b95522794769..ffd7a6a19b07f846aa2ffe2c5937eea0aef0b113 100644 --- a/netbox/client/ipam/ip_a_m_aggregates_partial_update_responses.go +++ b/netbox/client/ipam/ipam_aggregates_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMAggregatesPartialUpdateReader is a Reader for the IPAMAggregatesPartialUpdate structure. -type IPAMAggregatesPartialUpdateReader struct { +// IpamAggregatesPartialUpdateReader is a Reader for the IpamAggregatesPartialUpdate structure. +type IpamAggregatesPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMAggregatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamAggregatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMAggregatesPartialUpdateOK() + result := NewIpamAggregatesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMAggregatesPartialUpdateReader) ReadResponse(response runtime.Client } } -// NewIPAMAggregatesPartialUpdateOK creates a IPAMAggregatesPartialUpdateOK with default headers values -func NewIPAMAggregatesPartialUpdateOK() *IPAMAggregatesPartialUpdateOK { - return &IPAMAggregatesPartialUpdateOK{} +// NewIpamAggregatesPartialUpdateOK creates a IpamAggregatesPartialUpdateOK with default headers values +func NewIpamAggregatesPartialUpdateOK() *IpamAggregatesPartialUpdateOK { + return &IpamAggregatesPartialUpdateOK{} } -/*IPAMAggregatesPartialUpdateOK handles this case with default header values. +/*IpamAggregatesPartialUpdateOK handles this case with default header values. -IPAMAggregatesPartialUpdateOK ipam aggregates partial update o k +IpamAggregatesPartialUpdateOK ipam aggregates partial update o k */ -type IPAMAggregatesPartialUpdateOK struct { +type IpamAggregatesPartialUpdateOK struct { Payload *models.Aggregate } -func (o *IPAMAggregatesPartialUpdateOK) Error() string { +func (o *IpamAggregatesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /ipam/aggregates/{id}/][%d] ipamAggregatesPartialUpdateOK %+v", 200, o.Payload) } -func (o *IPAMAggregatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamAggregatesPartialUpdateOK) GetPayload() *models.Aggregate { + return o.Payload +} + +func (o *IpamAggregatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Aggregate) diff --git a/netbox/client/ipam/ip_a_m_aggregates_read_parameters.go b/netbox/client/ipam/ipam_aggregates_read_parameters.go similarity index 66% rename from netbox/client/ipam/ip_a_m_aggregates_read_parameters.go rename to netbox/client/ipam/ipam_aggregates_read_parameters.go index a344f443087b34b0e06f7907b0eea8f95121a87c..7e982becbea2cac9e8113f5535457e21b4d31565 100644 --- a/netbox/client/ipam/ip_a_m_aggregates_read_parameters.go +++ b/netbox/client/ipam/ipam_aggregates_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMAggregatesReadParams creates a new IPAMAggregatesReadParams object +// NewIpamAggregatesReadParams creates a new IpamAggregatesReadParams object // with the default values initialized. -func NewIPAMAggregatesReadParams() *IPAMAggregatesReadParams { +func NewIpamAggregatesReadParams() *IpamAggregatesReadParams { var () - return &IPAMAggregatesReadParams{ + return &IpamAggregatesReadParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMAggregatesReadParamsWithTimeout creates a new IPAMAggregatesReadParams object +// NewIpamAggregatesReadParamsWithTimeout creates a new IpamAggregatesReadParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMAggregatesReadParamsWithTimeout(timeout time.Duration) *IPAMAggregatesReadParams { +func NewIpamAggregatesReadParamsWithTimeout(timeout time.Duration) *IpamAggregatesReadParams { var () - return &IPAMAggregatesReadParams{ + return &IpamAggregatesReadParams{ timeout: timeout, } } -// NewIPAMAggregatesReadParamsWithContext creates a new IPAMAggregatesReadParams object +// NewIpamAggregatesReadParamsWithContext creates a new IpamAggregatesReadParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMAggregatesReadParamsWithContext(ctx context.Context) *IPAMAggregatesReadParams { +func NewIpamAggregatesReadParamsWithContext(ctx context.Context) *IpamAggregatesReadParams { var () - return &IPAMAggregatesReadParams{ + return &IpamAggregatesReadParams{ Context: ctx, } } -// NewIPAMAggregatesReadParamsWithHTTPClient creates a new IPAMAggregatesReadParams object +// NewIpamAggregatesReadParamsWithHTTPClient creates a new IpamAggregatesReadParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMAggregatesReadParamsWithHTTPClient(client *http.Client) *IPAMAggregatesReadParams { +func NewIpamAggregatesReadParamsWithHTTPClient(client *http.Client) *IpamAggregatesReadParams { var () - return &IPAMAggregatesReadParams{ + return &IpamAggregatesReadParams{ HTTPClient: client, } } -/*IPAMAggregatesReadParams contains all the parameters to send to the API endpoint +/*IpamAggregatesReadParams contains all the parameters to send to the API endpoint for the ipam aggregates read operation typically these are written to a http.Request */ -type IPAMAggregatesReadParams struct { +type IpamAggregatesReadParams struct { /*ID A unique integer value identifying this aggregate. @@ -88,51 +89,51 @@ type IPAMAggregatesReadParams struct { } // WithTimeout adds the timeout to the ipam aggregates read params -func (o *IPAMAggregatesReadParams) WithTimeout(timeout time.Duration) *IPAMAggregatesReadParams { +func (o *IpamAggregatesReadParams) WithTimeout(timeout time.Duration) *IpamAggregatesReadParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam aggregates read params -func (o *IPAMAggregatesReadParams) SetTimeout(timeout time.Duration) { +func (o *IpamAggregatesReadParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam aggregates read params -func (o *IPAMAggregatesReadParams) WithContext(ctx context.Context) *IPAMAggregatesReadParams { +func (o *IpamAggregatesReadParams) WithContext(ctx context.Context) *IpamAggregatesReadParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam aggregates read params -func (o *IPAMAggregatesReadParams) SetContext(ctx context.Context) { +func (o *IpamAggregatesReadParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam aggregates read params -func (o *IPAMAggregatesReadParams) WithHTTPClient(client *http.Client) *IPAMAggregatesReadParams { +func (o *IpamAggregatesReadParams) WithHTTPClient(client *http.Client) *IpamAggregatesReadParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam aggregates read params -func (o *IPAMAggregatesReadParams) SetHTTPClient(client *http.Client) { +func (o *IpamAggregatesReadParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam aggregates read params -func (o *IPAMAggregatesReadParams) WithID(id int64) *IPAMAggregatesReadParams { +func (o *IpamAggregatesReadParams) WithID(id int64) *IpamAggregatesReadParams { o.SetID(id) return o } // SetID adds the id to the ipam aggregates read params -func (o *IPAMAggregatesReadParams) SetID(id int64) { +func (o *IpamAggregatesReadParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMAggregatesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamAggregatesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_aggregates_read_responses.go b/netbox/client/ipam/ipam_aggregates_read_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_aggregates_read_responses.go rename to netbox/client/ipam/ipam_aggregates_read_responses.go index 94cb7a988a8b874de067a14f97ad30e16bd423c4..9731a12249d63ada302fc9fb197a8891568c63da 100644 --- a/netbox/client/ipam/ip_a_m_aggregates_read_responses.go +++ b/netbox/client/ipam/ipam_aggregates_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMAggregatesReadReader is a Reader for the IPAMAggregatesRead structure. -type IPAMAggregatesReadReader struct { +// IpamAggregatesReadReader is a Reader for the IpamAggregatesRead structure. +type IpamAggregatesReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMAggregatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamAggregatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMAggregatesReadOK() + result := NewIpamAggregatesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMAggregatesReadReader) ReadResponse(response runtime.ClientResponse, } } -// NewIPAMAggregatesReadOK creates a IPAMAggregatesReadOK with default headers values -func NewIPAMAggregatesReadOK() *IPAMAggregatesReadOK { - return &IPAMAggregatesReadOK{} +// NewIpamAggregatesReadOK creates a IpamAggregatesReadOK with default headers values +func NewIpamAggregatesReadOK() *IpamAggregatesReadOK { + return &IpamAggregatesReadOK{} } -/*IPAMAggregatesReadOK handles this case with default header values. +/*IpamAggregatesReadOK handles this case with default header values. -IPAMAggregatesReadOK ipam aggregates read o k +IpamAggregatesReadOK ipam aggregates read o k */ -type IPAMAggregatesReadOK struct { +type IpamAggregatesReadOK struct { Payload *models.Aggregate } -func (o *IPAMAggregatesReadOK) Error() string { +func (o *IpamAggregatesReadOK) Error() string { return fmt.Sprintf("[GET /ipam/aggregates/{id}/][%d] ipamAggregatesReadOK %+v", 200, o.Payload) } -func (o *IPAMAggregatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamAggregatesReadOK) GetPayload() *models.Aggregate { + return o.Payload +} + +func (o *IpamAggregatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Aggregate) diff --git a/netbox/client/ipam/ip_a_m_aggregates_update_parameters.go b/netbox/client/ipam/ipam_aggregates_update_parameters.go similarity index 64% rename from netbox/client/ipam/ip_a_m_aggregates_update_parameters.go rename to netbox/client/ipam/ipam_aggregates_update_parameters.go index c597fd6a33f73ed8345204f66c6a1bfb438032d6..5a3c5cdaef08bcdec3dd15b01ce58f8456c507db 100644 --- a/netbox/client/ipam/ip_a_m_aggregates_update_parameters.go +++ b/netbox/client/ipam/ipam_aggregates_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMAggregatesUpdateParams creates a new IPAMAggregatesUpdateParams object +// NewIpamAggregatesUpdateParams creates a new IpamAggregatesUpdateParams object // with the default values initialized. -func NewIPAMAggregatesUpdateParams() *IPAMAggregatesUpdateParams { +func NewIpamAggregatesUpdateParams() *IpamAggregatesUpdateParams { var () - return &IPAMAggregatesUpdateParams{ + return &IpamAggregatesUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMAggregatesUpdateParamsWithTimeout creates a new IPAMAggregatesUpdateParams object +// NewIpamAggregatesUpdateParamsWithTimeout creates a new IpamAggregatesUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMAggregatesUpdateParamsWithTimeout(timeout time.Duration) *IPAMAggregatesUpdateParams { +func NewIpamAggregatesUpdateParamsWithTimeout(timeout time.Duration) *IpamAggregatesUpdateParams { var () - return &IPAMAggregatesUpdateParams{ + return &IpamAggregatesUpdateParams{ timeout: timeout, } } -// NewIPAMAggregatesUpdateParamsWithContext creates a new IPAMAggregatesUpdateParams object +// NewIpamAggregatesUpdateParamsWithContext creates a new IpamAggregatesUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMAggregatesUpdateParamsWithContext(ctx context.Context) *IPAMAggregatesUpdateParams { +func NewIpamAggregatesUpdateParamsWithContext(ctx context.Context) *IpamAggregatesUpdateParams { var () - return &IPAMAggregatesUpdateParams{ + return &IpamAggregatesUpdateParams{ Context: ctx, } } -// NewIPAMAggregatesUpdateParamsWithHTTPClient creates a new IPAMAggregatesUpdateParams object +// NewIpamAggregatesUpdateParamsWithHTTPClient creates a new IpamAggregatesUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMAggregatesUpdateParamsWithHTTPClient(client *http.Client) *IPAMAggregatesUpdateParams { +func NewIpamAggregatesUpdateParamsWithHTTPClient(client *http.Client) *IpamAggregatesUpdateParams { var () - return &IPAMAggregatesUpdateParams{ + return &IpamAggregatesUpdateParams{ HTTPClient: client, } } -/*IPAMAggregatesUpdateParams contains all the parameters to send to the API endpoint +/*IpamAggregatesUpdateParams contains all the parameters to send to the API endpoint for the ipam aggregates update operation typically these are written to a http.Request */ -type IPAMAggregatesUpdateParams struct { +type IpamAggregatesUpdateParams struct { /*Data*/ Data *models.WritableAggregate @@ -92,62 +93,62 @@ type IPAMAggregatesUpdateParams struct { } // WithTimeout adds the timeout to the ipam aggregates update params -func (o *IPAMAggregatesUpdateParams) WithTimeout(timeout time.Duration) *IPAMAggregatesUpdateParams { +func (o *IpamAggregatesUpdateParams) WithTimeout(timeout time.Duration) *IpamAggregatesUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam aggregates update params -func (o *IPAMAggregatesUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamAggregatesUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam aggregates update params -func (o *IPAMAggregatesUpdateParams) WithContext(ctx context.Context) *IPAMAggregatesUpdateParams { +func (o *IpamAggregatesUpdateParams) WithContext(ctx context.Context) *IpamAggregatesUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam aggregates update params -func (o *IPAMAggregatesUpdateParams) SetContext(ctx context.Context) { +func (o *IpamAggregatesUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam aggregates update params -func (o *IPAMAggregatesUpdateParams) WithHTTPClient(client *http.Client) *IPAMAggregatesUpdateParams { +func (o *IpamAggregatesUpdateParams) WithHTTPClient(client *http.Client) *IpamAggregatesUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam aggregates update params -func (o *IPAMAggregatesUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamAggregatesUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam aggregates update params -func (o *IPAMAggregatesUpdateParams) WithData(data *models.WritableAggregate) *IPAMAggregatesUpdateParams { +func (o *IpamAggregatesUpdateParams) WithData(data *models.WritableAggregate) *IpamAggregatesUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam aggregates update params -func (o *IPAMAggregatesUpdateParams) SetData(data *models.WritableAggregate) { +func (o *IpamAggregatesUpdateParams) SetData(data *models.WritableAggregate) { o.Data = data } // WithID adds the id to the ipam aggregates update params -func (o *IPAMAggregatesUpdateParams) WithID(id int64) *IPAMAggregatesUpdateParams { +func (o *IpamAggregatesUpdateParams) WithID(id int64) *IpamAggregatesUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam aggregates update params -func (o *IPAMAggregatesUpdateParams) SetID(id int64) { +func (o *IpamAggregatesUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMAggregatesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamAggregatesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_aggregates_update_responses.go b/netbox/client/ipam/ipam_aggregates_update_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_aggregates_update_responses.go rename to netbox/client/ipam/ipam_aggregates_update_responses.go index 3a18e76cca66fc151a37d704074e896f63132303..56f664b7198f7f788084d186eaca137fe37b3c63 100644 --- a/netbox/client/ipam/ip_a_m_aggregates_update_responses.go +++ b/netbox/client/ipam/ipam_aggregates_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMAggregatesUpdateReader is a Reader for the IPAMAggregatesUpdate structure. -type IPAMAggregatesUpdateReader struct { +// IpamAggregatesUpdateReader is a Reader for the IpamAggregatesUpdate structure. +type IpamAggregatesUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMAggregatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamAggregatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMAggregatesUpdateOK() + result := NewIpamAggregatesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMAggregatesUpdateReader) ReadResponse(response runtime.ClientRespons } } -// NewIPAMAggregatesUpdateOK creates a IPAMAggregatesUpdateOK with default headers values -func NewIPAMAggregatesUpdateOK() *IPAMAggregatesUpdateOK { - return &IPAMAggregatesUpdateOK{} +// NewIpamAggregatesUpdateOK creates a IpamAggregatesUpdateOK with default headers values +func NewIpamAggregatesUpdateOK() *IpamAggregatesUpdateOK { + return &IpamAggregatesUpdateOK{} } -/*IPAMAggregatesUpdateOK handles this case with default header values. +/*IpamAggregatesUpdateOK handles this case with default header values. -IPAMAggregatesUpdateOK ipam aggregates update o k +IpamAggregatesUpdateOK ipam aggregates update o k */ -type IPAMAggregatesUpdateOK struct { +type IpamAggregatesUpdateOK struct { Payload *models.Aggregate } -func (o *IPAMAggregatesUpdateOK) Error() string { +func (o *IpamAggregatesUpdateOK) Error() string { return fmt.Sprintf("[PUT /ipam/aggregates/{id}/][%d] ipamAggregatesUpdateOK %+v", 200, o.Payload) } -func (o *IPAMAggregatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamAggregatesUpdateOK) GetPayload() *models.Aggregate { + return o.Payload +} + +func (o *IpamAggregatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Aggregate) diff --git a/netbox/client/ipam/ip_a_m_choices_list_parameters.go b/netbox/client/ipam/ipam_choices_list_parameters.go similarity index 65% rename from netbox/client/ipam/ip_a_m_choices_list_parameters.go rename to netbox/client/ipam/ipam_choices_list_parameters.go index 5587b7c53b2816ca9612db980b82b8a7060b8418..840694487f8679bbdfb30dfed192be874cb97eae 100644 --- a/netbox/client/ipam/ip_a_m_choices_list_parameters.go +++ b/netbox/client/ipam/ipam_choices_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,89 +32,89 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMChoicesListParams creates a new IPAMChoicesListParams object +// NewIpamChoicesListParams creates a new IpamChoicesListParams object // with the default values initialized. -func NewIPAMChoicesListParams() *IPAMChoicesListParams { +func NewIpamChoicesListParams() *IpamChoicesListParams { - return &IPAMChoicesListParams{ + return &IpamChoicesListParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMChoicesListParamsWithTimeout creates a new IPAMChoicesListParams object +// NewIpamChoicesListParamsWithTimeout creates a new IpamChoicesListParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMChoicesListParamsWithTimeout(timeout time.Duration) *IPAMChoicesListParams { +func NewIpamChoicesListParamsWithTimeout(timeout time.Duration) *IpamChoicesListParams { - return &IPAMChoicesListParams{ + return &IpamChoicesListParams{ timeout: timeout, } } -// NewIPAMChoicesListParamsWithContext creates a new IPAMChoicesListParams object +// NewIpamChoicesListParamsWithContext creates a new IpamChoicesListParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMChoicesListParamsWithContext(ctx context.Context) *IPAMChoicesListParams { +func NewIpamChoicesListParamsWithContext(ctx context.Context) *IpamChoicesListParams { - return &IPAMChoicesListParams{ + return &IpamChoicesListParams{ Context: ctx, } } -// NewIPAMChoicesListParamsWithHTTPClient creates a new IPAMChoicesListParams object +// NewIpamChoicesListParamsWithHTTPClient creates a new IpamChoicesListParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMChoicesListParamsWithHTTPClient(client *http.Client) *IPAMChoicesListParams { +func NewIpamChoicesListParamsWithHTTPClient(client *http.Client) *IpamChoicesListParams { - return &IPAMChoicesListParams{ + return &IpamChoicesListParams{ HTTPClient: client, } } -/*IPAMChoicesListParams contains all the parameters to send to the API endpoint +/*IpamChoicesListParams contains all the parameters to send to the API endpoint for the ipam choices list operation typically these are written to a http.Request */ -type IPAMChoicesListParams struct { +type IpamChoicesListParams struct { timeout time.Duration Context context.Context HTTPClient *http.Client } // WithTimeout adds the timeout to the ipam choices list params -func (o *IPAMChoicesListParams) WithTimeout(timeout time.Duration) *IPAMChoicesListParams { +func (o *IpamChoicesListParams) WithTimeout(timeout time.Duration) *IpamChoicesListParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam choices list params -func (o *IPAMChoicesListParams) SetTimeout(timeout time.Duration) { +func (o *IpamChoicesListParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam choices list params -func (o *IPAMChoicesListParams) WithContext(ctx context.Context) *IPAMChoicesListParams { +func (o *IpamChoicesListParams) WithContext(ctx context.Context) *IpamChoicesListParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam choices list params -func (o *IPAMChoicesListParams) SetContext(ctx context.Context) { +func (o *IpamChoicesListParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam choices list params -func (o *IPAMChoicesListParams) WithHTTPClient(client *http.Client) *IPAMChoicesListParams { +func (o *IpamChoicesListParams) WithHTTPClient(client *http.Client) *IpamChoicesListParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam choices list params -func (o *IPAMChoicesListParams) SetHTTPClient(client *http.Client) { +func (o *IpamChoicesListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WriteToRequest writes these params to a swagger request -func (o *IPAMChoicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamChoicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_choices_list_responses.go b/netbox/client/ipam/ipam_choices_list_responses.go similarity index 71% rename from netbox/client/ipam/ip_a_m_choices_list_responses.go rename to netbox/client/ipam/ipam_choices_list_responses.go index e3a500a50a200ba3ba01fd8cac2f80e0bbc3740f..e4a0aed59b8958d51db2b7c9073b2f2810768266 100644 --- a/netbox/client/ipam/ip_a_m_choices_list_responses.go +++ b/netbox/client/ipam/ipam_choices_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,17 +28,16 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// IPAMChoicesListReader is a Reader for the IPAMChoicesList structure. -type IPAMChoicesListReader struct { +// IpamChoicesListReader is a Reader for the IpamChoicesList structure. +type IpamChoicesListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMChoicesListOK() + result := NewIpamChoicesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -48,23 +48,23 @@ func (o *IPAMChoicesListReader) ReadResponse(response runtime.ClientResponse, co } } -// NewIPAMChoicesListOK creates a IPAMChoicesListOK with default headers values -func NewIPAMChoicesListOK() *IPAMChoicesListOK { - return &IPAMChoicesListOK{} +// NewIpamChoicesListOK creates a IpamChoicesListOK with default headers values +func NewIpamChoicesListOK() *IpamChoicesListOK { + return &IpamChoicesListOK{} } -/*IPAMChoicesListOK handles this case with default header values. +/*IpamChoicesListOK handles this case with default header values. -IPAMChoicesListOK ipam choices list o k +IpamChoicesListOK ipam choices list o k */ -type IPAMChoicesListOK struct { +type IpamChoicesListOK struct { } -func (o *IPAMChoicesListOK) Error() string { +func (o *IpamChoicesListOK) Error() string { return fmt.Sprintf("[GET /ipam/_choices/][%d] ipamChoicesListOK ", 200) } -func (o *IPAMChoicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamChoicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/ipam/ip_a_m_choices_read_parameters.go b/netbox/client/ipam/ipam_choices_read_parameters.go similarity index 65% rename from netbox/client/ipam/ip_a_m_choices_read_parameters.go rename to netbox/client/ipam/ipam_choices_read_parameters.go index fb1703211d1f2ba84ce60e5e28e2451da9dbff83..f3eda161136c75170bf6d9b89e39e75da9c4221a 100644 --- a/netbox/client/ipam/ip_a_m_choices_read_parameters.go +++ b/netbox/client/ipam/ipam_choices_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,49 +32,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMChoicesReadParams creates a new IPAMChoicesReadParams object +// NewIpamChoicesReadParams creates a new IpamChoicesReadParams object // with the default values initialized. -func NewIPAMChoicesReadParams() *IPAMChoicesReadParams { +func NewIpamChoicesReadParams() *IpamChoicesReadParams { var () - return &IPAMChoicesReadParams{ + return &IpamChoicesReadParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMChoicesReadParamsWithTimeout creates a new IPAMChoicesReadParams object +// NewIpamChoicesReadParamsWithTimeout creates a new IpamChoicesReadParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMChoicesReadParamsWithTimeout(timeout time.Duration) *IPAMChoicesReadParams { +func NewIpamChoicesReadParamsWithTimeout(timeout time.Duration) *IpamChoicesReadParams { var () - return &IPAMChoicesReadParams{ + return &IpamChoicesReadParams{ timeout: timeout, } } -// NewIPAMChoicesReadParamsWithContext creates a new IPAMChoicesReadParams object +// NewIpamChoicesReadParamsWithContext creates a new IpamChoicesReadParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMChoicesReadParamsWithContext(ctx context.Context) *IPAMChoicesReadParams { +func NewIpamChoicesReadParamsWithContext(ctx context.Context) *IpamChoicesReadParams { var () - return &IPAMChoicesReadParams{ + return &IpamChoicesReadParams{ Context: ctx, } } -// NewIPAMChoicesReadParamsWithHTTPClient creates a new IPAMChoicesReadParams object +// NewIpamChoicesReadParamsWithHTTPClient creates a new IpamChoicesReadParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMChoicesReadParamsWithHTTPClient(client *http.Client) *IPAMChoicesReadParams { +func NewIpamChoicesReadParamsWithHTTPClient(client *http.Client) *IpamChoicesReadParams { var () - return &IPAMChoicesReadParams{ + return &IpamChoicesReadParams{ HTTPClient: client, } } -/*IPAMChoicesReadParams contains all the parameters to send to the API endpoint +/*IpamChoicesReadParams contains all the parameters to send to the API endpoint for the ipam choices read operation typically these are written to a http.Request */ -type IPAMChoicesReadParams struct { +type IpamChoicesReadParams struct { /*ID*/ ID string @@ -84,51 +85,51 @@ type IPAMChoicesReadParams struct { } // WithTimeout adds the timeout to the ipam choices read params -func (o *IPAMChoicesReadParams) WithTimeout(timeout time.Duration) *IPAMChoicesReadParams { +func (o *IpamChoicesReadParams) WithTimeout(timeout time.Duration) *IpamChoicesReadParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam choices read params -func (o *IPAMChoicesReadParams) SetTimeout(timeout time.Duration) { +func (o *IpamChoicesReadParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam choices read params -func (o *IPAMChoicesReadParams) WithContext(ctx context.Context) *IPAMChoicesReadParams { +func (o *IpamChoicesReadParams) WithContext(ctx context.Context) *IpamChoicesReadParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam choices read params -func (o *IPAMChoicesReadParams) SetContext(ctx context.Context) { +func (o *IpamChoicesReadParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam choices read params -func (o *IPAMChoicesReadParams) WithHTTPClient(client *http.Client) *IPAMChoicesReadParams { +func (o *IpamChoicesReadParams) WithHTTPClient(client *http.Client) *IpamChoicesReadParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam choices read params -func (o *IPAMChoicesReadParams) SetHTTPClient(client *http.Client) { +func (o *IpamChoicesReadParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam choices read params -func (o *IPAMChoicesReadParams) WithID(id string) *IPAMChoicesReadParams { +func (o *IpamChoicesReadParams) WithID(id string) *IpamChoicesReadParams { o.SetID(id) return o } // SetID adds the id to the ipam choices read params -func (o *IPAMChoicesReadParams) SetID(id string) { +func (o *IpamChoicesReadParams) SetID(id string) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMChoicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamChoicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_choices_read_responses.go b/netbox/client/ipam/ipam_choices_read_responses.go similarity index 71% rename from netbox/client/ipam/ip_a_m_choices_read_responses.go rename to netbox/client/ipam/ipam_choices_read_responses.go index bee4187d903978fef5195b52b648a73fd7ddd432..af14ab2601f16f728834833a7cb1ea63ac69a889 100644 --- a/netbox/client/ipam/ip_a_m_choices_read_responses.go +++ b/netbox/client/ipam/ipam_choices_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,17 +28,16 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// IPAMChoicesReadReader is a Reader for the IPAMChoicesRead structure. -type IPAMChoicesReadReader struct { +// IpamChoicesReadReader is a Reader for the IpamChoicesRead structure. +type IpamChoicesReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMChoicesReadOK() + result := NewIpamChoicesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -48,23 +48,23 @@ func (o *IPAMChoicesReadReader) ReadResponse(response runtime.ClientResponse, co } } -// NewIPAMChoicesReadOK creates a IPAMChoicesReadOK with default headers values -func NewIPAMChoicesReadOK() *IPAMChoicesReadOK { - return &IPAMChoicesReadOK{} +// NewIpamChoicesReadOK creates a IpamChoicesReadOK with default headers values +func NewIpamChoicesReadOK() *IpamChoicesReadOK { + return &IpamChoicesReadOK{} } -/*IPAMChoicesReadOK handles this case with default header values. +/*IpamChoicesReadOK handles this case with default header values. -IPAMChoicesReadOK ipam choices read o k +IpamChoicesReadOK ipam choices read o k */ -type IPAMChoicesReadOK struct { +type IpamChoicesReadOK struct { } -func (o *IPAMChoicesReadOK) Error() string { +func (o *IpamChoicesReadOK) Error() string { return fmt.Sprintf("[GET /ipam/_choices/{id}/][%d] ipamChoicesReadOK ", 200) } -func (o *IPAMChoicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamChoicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/ipam/ipam_client.go b/netbox/client/ipam/ipam_client.go new file mode 100644 index 0000000000000000000000000000000000000000..03218c3e98bcbf9f437b3d17a81380136b57e522 --- /dev/null +++ b/netbox/client/ipam/ipam_client.go @@ -0,0 +1,2275 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2018 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new ipam API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for ipam API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + IpamChoicesList(params *IpamChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamChoicesListOK, error) + + IpamChoicesRead(params *IpamChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamChoicesReadOK, error) + + IpamAggregatesCreate(params *IpamAggregatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamAggregatesCreateCreated, error) + + IpamAggregatesDelete(params *IpamAggregatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamAggregatesDeleteNoContent, error) + + IpamAggregatesList(params *IpamAggregatesListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamAggregatesListOK, error) + + IpamAggregatesPartialUpdate(params *IpamAggregatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamAggregatesPartialUpdateOK, error) + + IpamAggregatesRead(params *IpamAggregatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamAggregatesReadOK, error) + + IpamAggregatesUpdate(params *IpamAggregatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamAggregatesUpdateOK, error) + + IpamIPAddressesCreate(params *IpamIPAddressesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamIPAddressesCreateCreated, error) + + IpamIPAddressesDelete(params *IpamIPAddressesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamIPAddressesDeleteNoContent, error) + + IpamIPAddressesList(params *IpamIPAddressesListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamIPAddressesListOK, error) + + IpamIPAddressesPartialUpdate(params *IpamIPAddressesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamIPAddressesPartialUpdateOK, error) + + IpamIPAddressesRead(params *IpamIPAddressesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamIPAddressesReadOK, error) + + IpamIPAddressesUpdate(params *IpamIPAddressesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamIPAddressesUpdateOK, error) + + IpamPrefixesAvailableIpsCreate(params *IpamPrefixesAvailableIpsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesAvailableIpsCreateCreated, error) + + IpamPrefixesAvailableIpsRead(params *IpamPrefixesAvailableIpsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesAvailableIpsReadOK, error) + + IpamPrefixesAvailablePrefixesCreate(params *IpamPrefixesAvailablePrefixesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesAvailablePrefixesCreateCreated, error) + + IpamPrefixesAvailablePrefixesRead(params *IpamPrefixesAvailablePrefixesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesAvailablePrefixesReadOK, error) + + IpamPrefixesCreate(params *IpamPrefixesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesCreateCreated, error) + + IpamPrefixesDelete(params *IpamPrefixesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesDeleteNoContent, error) + + IpamPrefixesList(params *IpamPrefixesListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesListOK, error) + + IpamPrefixesPartialUpdate(params *IpamPrefixesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesPartialUpdateOK, error) + + IpamPrefixesRead(params *IpamPrefixesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesReadOK, error) + + IpamPrefixesUpdate(params *IpamPrefixesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesUpdateOK, error) + + IpamRirsCreate(params *IpamRirsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRirsCreateCreated, error) + + IpamRirsDelete(params *IpamRirsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRirsDeleteNoContent, error) + + IpamRirsList(params *IpamRirsListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRirsListOK, error) + + IpamRirsPartialUpdate(params *IpamRirsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRirsPartialUpdateOK, error) + + IpamRirsRead(params *IpamRirsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRirsReadOK, error) + + IpamRirsUpdate(params *IpamRirsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRirsUpdateOK, error) + + IpamRolesCreate(params *IpamRolesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRolesCreateCreated, error) + + IpamRolesDelete(params *IpamRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRolesDeleteNoContent, error) + + IpamRolesList(params *IpamRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRolesListOK, error) + + IpamRolesPartialUpdate(params *IpamRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRolesPartialUpdateOK, error) + + IpamRolesRead(params *IpamRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRolesReadOK, error) + + IpamRolesUpdate(params *IpamRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRolesUpdateOK, error) + + IpamServicesCreate(params *IpamServicesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamServicesCreateCreated, error) + + IpamServicesDelete(params *IpamServicesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamServicesDeleteNoContent, error) + + IpamServicesList(params *IpamServicesListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamServicesListOK, error) + + IpamServicesPartialUpdate(params *IpamServicesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamServicesPartialUpdateOK, error) + + IpamServicesRead(params *IpamServicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamServicesReadOK, error) + + IpamServicesUpdate(params *IpamServicesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamServicesUpdateOK, error) + + IpamVlanGroupsCreate(params *IpamVlanGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlanGroupsCreateCreated, error) + + IpamVlanGroupsDelete(params *IpamVlanGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlanGroupsDeleteNoContent, error) + + IpamVlanGroupsList(params *IpamVlanGroupsListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlanGroupsListOK, error) + + IpamVlanGroupsPartialUpdate(params *IpamVlanGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlanGroupsPartialUpdateOK, error) + + IpamVlanGroupsRead(params *IpamVlanGroupsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlanGroupsReadOK, error) + + IpamVlanGroupsUpdate(params *IpamVlanGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlanGroupsUpdateOK, error) + + IpamVlansCreate(params *IpamVlansCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlansCreateCreated, error) + + IpamVlansDelete(params *IpamVlansDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlansDeleteNoContent, error) + + IpamVlansList(params *IpamVlansListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlansListOK, error) + + IpamVlansPartialUpdate(params *IpamVlansPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlansPartialUpdateOK, error) + + IpamVlansRead(params *IpamVlansReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlansReadOK, error) + + IpamVlansUpdate(params *IpamVlansUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlansUpdateOK, error) + + IpamVrfsCreate(params *IpamVrfsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVrfsCreateCreated, error) + + IpamVrfsDelete(params *IpamVrfsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVrfsDeleteNoContent, error) + + IpamVrfsList(params *IpamVrfsListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVrfsListOK, error) + + IpamVrfsPartialUpdate(params *IpamVrfsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVrfsPartialUpdateOK, error) + + IpamVrfsRead(params *IpamVrfsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVrfsReadOK, error) + + IpamVrfsUpdate(params *IpamVrfsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVrfsUpdateOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + IpamChoicesList ipam choices list API +*/ +func (a *Client) IpamChoicesList(params *IpamChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamChoicesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamChoicesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam__choices_list", + Method: "GET", + PathPattern: "/ipam/_choices/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamChoicesListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamChoicesListOK) + 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__choices_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamChoicesRead ipam choices read API +*/ +func (a *Client) IpamChoicesRead(params *IpamChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamChoicesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamChoicesReadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam__choices_read", + Method: "GET", + PathPattern: "/ipam/_choices/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamChoicesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamChoicesReadOK) + 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__choices_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamAggregatesCreate ipam aggregates create API +*/ +func (a *Client) IpamAggregatesCreate(params *IpamAggregatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamAggregatesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamAggregatesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_aggregates_create", + Method: "POST", + PathPattern: "/ipam/aggregates/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamAggregatesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamAggregatesCreateCreated) + 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_aggregates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamAggregatesDelete ipam aggregates delete API +*/ +func (a *Client) IpamAggregatesDelete(params *IpamAggregatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamAggregatesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamAggregatesDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_aggregates_delete", + Method: "DELETE", + PathPattern: "/ipam/aggregates/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamAggregatesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamAggregatesDeleteNoContent) + 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_aggregates_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamAggregatesList Call to super to allow for caching +*/ +func (a *Client) IpamAggregatesList(params *IpamAggregatesListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamAggregatesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamAggregatesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_aggregates_list", + Method: "GET", + PathPattern: "/ipam/aggregates/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamAggregatesListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamAggregatesListOK) + 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_aggregates_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamAggregatesPartialUpdate ipam aggregates partial update API +*/ +func (a *Client) IpamAggregatesPartialUpdate(params *IpamAggregatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamAggregatesPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamAggregatesPartialUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_aggregates_partial_update", + Method: "PATCH", + PathPattern: "/ipam/aggregates/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamAggregatesPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamAggregatesPartialUpdateOK) + 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_aggregates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamAggregatesRead Call to super to allow for caching +*/ +func (a *Client) IpamAggregatesRead(params *IpamAggregatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamAggregatesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamAggregatesReadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_aggregates_read", + Method: "GET", + PathPattern: "/ipam/aggregates/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamAggregatesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamAggregatesReadOK) + 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_aggregates_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamAggregatesUpdate ipam aggregates update API +*/ +func (a *Client) IpamAggregatesUpdate(params *IpamAggregatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamAggregatesUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamAggregatesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_aggregates_update", + Method: "PUT", + PathPattern: "/ipam/aggregates/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamAggregatesUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamAggregatesUpdateOK) + 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_aggregates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesCreate ipam ip addresses create API +*/ +func (a *Client) IpamIPAddressesCreate(params *IpamIPAddressesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamIPAddressesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_ip-addresses_create", + Method: "POST", + PathPattern: "/ipam/ip-addresses/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesCreateCreated) + 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-addresses_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesDelete ipam ip addresses delete API +*/ +func (a *Client) IpamIPAddressesDelete(params *IpamIPAddressesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamIPAddressesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_ip-addresses_delete", + Method: "DELETE", + PathPattern: "/ipam/ip-addresses/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesDeleteNoContent) + 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-addresses_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesList Call to super to allow for caching +*/ +func (a *Client) IpamIPAddressesList(params *IpamIPAddressesListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamIPAddressesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_ip-addresses_list", + Method: "GET", + PathPattern: "/ipam/ip-addresses/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesListOK) + 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-addresses_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesPartialUpdate ipam ip addresses partial update API +*/ +func (a *Client) IpamIPAddressesPartialUpdate(params *IpamIPAddressesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamIPAddressesPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesPartialUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_ip-addresses_partial_update", + Method: "PATCH", + PathPattern: "/ipam/ip-addresses/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesPartialUpdateOK) + 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-addresses_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesRead Call to super to allow for caching +*/ +func (a *Client) IpamIPAddressesRead(params *IpamIPAddressesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamIPAddressesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesReadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_ip-addresses_read", + Method: "GET", + PathPattern: "/ipam/ip-addresses/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesReadOK) + 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-addresses_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesUpdate ipam ip addresses update API +*/ +func (a *Client) IpamIPAddressesUpdate(params *IpamIPAddressesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamIPAddressesUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_ip-addresses_update", + Method: "PUT", + PathPattern: "/ipam/ip-addresses/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesUpdateOK) + 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-addresses_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. By default, the number of IPs +returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be passed, +however results will not be paginated. +*/ +func (a *Client) IpamPrefixesAvailableIpsCreate(params *IpamPrefixesAvailableIpsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesAvailableIpsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesAvailableIpsCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_prefixes_available-ips_create", + Method: "POST", + PathPattern: "/ipam/prefixes/{id}/available-ips/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesAvailableIpsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesAvailableIpsCreateCreated) + 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_prefixes_available-ips_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesAvailableIpsRead A convenience method for returning available IP addresses within a prefix. By default, the number of IPs +returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be passed, +however results will not be paginated. +*/ +func (a *Client) IpamPrefixesAvailableIpsRead(params *IpamPrefixesAvailableIpsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesAvailableIpsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesAvailableIpsReadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_prefixes_available-ips_read", + Method: "GET", + PathPattern: "/ipam/prefixes/{id}/available-ips/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesAvailableIpsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesAvailableIpsReadOK) + 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_prefixes_available-ips_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesAvailablePrefixesCreate A convenience method for returning available child prefixes within a parent. +*/ +func (a *Client) IpamPrefixesAvailablePrefixesCreate(params *IpamPrefixesAvailablePrefixesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesAvailablePrefixesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesAvailablePrefixesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_prefixes_available-prefixes_create", + Method: "POST", + PathPattern: "/ipam/prefixes/{id}/available-prefixes/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesAvailablePrefixesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesAvailablePrefixesCreateCreated) + 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_prefixes_available-prefixes_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesAvailablePrefixesRead A convenience method for returning available child prefixes within a parent. +*/ +func (a *Client) IpamPrefixesAvailablePrefixesRead(params *IpamPrefixesAvailablePrefixesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesAvailablePrefixesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesAvailablePrefixesReadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_prefixes_available-prefixes_read", + Method: "GET", + PathPattern: "/ipam/prefixes/{id}/available-prefixes/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesAvailablePrefixesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesAvailablePrefixesReadOK) + 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_prefixes_available-prefixes_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesCreate ipam prefixes create API +*/ +func (a *Client) IpamPrefixesCreate(params *IpamPrefixesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_prefixes_create", + Method: "POST", + PathPattern: "/ipam/prefixes/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesCreateCreated) + 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_prefixes_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesDelete ipam prefixes delete API +*/ +func (a *Client) IpamPrefixesDelete(params *IpamPrefixesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_prefixes_delete", + Method: "DELETE", + PathPattern: "/ipam/prefixes/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesDeleteNoContent) + 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_prefixes_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesList Call to super to allow for caching +*/ +func (a *Client) IpamPrefixesList(params *IpamPrefixesListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_prefixes_list", + Method: "GET", + PathPattern: "/ipam/prefixes/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesListOK) + 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_prefixes_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesPartialUpdate ipam prefixes partial update API +*/ +func (a *Client) IpamPrefixesPartialUpdate(params *IpamPrefixesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesPartialUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_prefixes_partial_update", + Method: "PATCH", + PathPattern: "/ipam/prefixes/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesPartialUpdateOK) + 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_prefixes_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesRead Call to super to allow for caching +*/ +func (a *Client) IpamPrefixesRead(params *IpamPrefixesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesReadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_prefixes_read", + Method: "GET", + PathPattern: "/ipam/prefixes/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesReadOK) + 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_prefixes_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesUpdate ipam prefixes update API +*/ +func (a *Client) IpamPrefixesUpdate(params *IpamPrefixesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamPrefixesUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_prefixes_update", + Method: "PUT", + PathPattern: "/ipam/prefixes/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesUpdateOK) + 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_prefixes_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRirsCreate ipam rirs create API +*/ +func (a *Client) IpamRirsCreate(params *IpamRirsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRirsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRirsCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_rirs_create", + Method: "POST", + PathPattern: "/ipam/rirs/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRirsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRirsCreateCreated) + 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_rirs_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRirsDelete ipam rirs delete API +*/ +func (a *Client) IpamRirsDelete(params *IpamRirsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRirsDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRirsDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_rirs_delete", + Method: "DELETE", + PathPattern: "/ipam/rirs/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRirsDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRirsDeleteNoContent) + 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_rirs_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRirsList Call to super to allow for caching +*/ +func (a *Client) IpamRirsList(params *IpamRirsListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRirsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRirsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_rirs_list", + Method: "GET", + PathPattern: "/ipam/rirs/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRirsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRirsListOK) + 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_rirs_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRirsPartialUpdate ipam rirs partial update API +*/ +func (a *Client) IpamRirsPartialUpdate(params *IpamRirsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRirsPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRirsPartialUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_rirs_partial_update", + Method: "PATCH", + PathPattern: "/ipam/rirs/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRirsPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRirsPartialUpdateOK) + 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_rirs_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRirsRead Call to super to allow for caching +*/ +func (a *Client) IpamRirsRead(params *IpamRirsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRirsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRirsReadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_rirs_read", + Method: "GET", + PathPattern: "/ipam/rirs/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRirsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRirsReadOK) + 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_rirs_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRirsUpdate ipam rirs update API +*/ +func (a *Client) IpamRirsUpdate(params *IpamRirsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRirsUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRirsUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_rirs_update", + Method: "PUT", + PathPattern: "/ipam/rirs/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRirsUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRirsUpdateOK) + 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_rirs_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRolesCreate ipam roles create API +*/ +func (a *Client) IpamRolesCreate(params *IpamRolesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRolesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRolesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_roles_create", + Method: "POST", + PathPattern: "/ipam/roles/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRolesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRolesCreateCreated) + 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_roles_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRolesDelete ipam roles delete API +*/ +func (a *Client) IpamRolesDelete(params *IpamRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRolesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRolesDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_roles_delete", + Method: "DELETE", + PathPattern: "/ipam/roles/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRolesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRolesDeleteNoContent) + 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_roles_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRolesList Call to super to allow for caching +*/ +func (a *Client) IpamRolesList(params *IpamRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRolesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRolesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_roles_list", + Method: "GET", + PathPattern: "/ipam/roles/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRolesListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRolesListOK) + 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_roles_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRolesPartialUpdate ipam roles partial update API +*/ +func (a *Client) IpamRolesPartialUpdate(params *IpamRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRolesPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRolesPartialUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_roles_partial_update", + Method: "PATCH", + PathPattern: "/ipam/roles/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRolesPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRolesPartialUpdateOK) + 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_roles_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRolesRead Call to super to allow for caching +*/ +func (a *Client) IpamRolesRead(params *IpamRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRolesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRolesReadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_roles_read", + Method: "GET", + PathPattern: "/ipam/roles/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRolesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRolesReadOK) + 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_roles_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRolesUpdate ipam roles update API +*/ +func (a *Client) IpamRolesUpdate(params *IpamRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamRolesUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRolesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_roles_update", + Method: "PUT", + PathPattern: "/ipam/roles/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRolesUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRolesUpdateOK) + 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_roles_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamServicesCreate ipam services create API +*/ +func (a *Client) IpamServicesCreate(params *IpamServicesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamServicesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamServicesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_services_create", + Method: "POST", + PathPattern: "/ipam/services/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamServicesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamServicesCreateCreated) + 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_services_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamServicesDelete ipam services delete API +*/ +func (a *Client) IpamServicesDelete(params *IpamServicesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamServicesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamServicesDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_services_delete", + Method: "DELETE", + PathPattern: "/ipam/services/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamServicesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamServicesDeleteNoContent) + 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_services_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamServicesList Call to super to allow for caching +*/ +func (a *Client) IpamServicesList(params *IpamServicesListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamServicesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamServicesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_services_list", + Method: "GET", + PathPattern: "/ipam/services/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamServicesListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamServicesListOK) + 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_services_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamServicesPartialUpdate ipam services partial update API +*/ +func (a *Client) IpamServicesPartialUpdate(params *IpamServicesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamServicesPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamServicesPartialUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_services_partial_update", + Method: "PATCH", + PathPattern: "/ipam/services/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamServicesPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamServicesPartialUpdateOK) + 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_services_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamServicesRead Call to super to allow for caching +*/ +func (a *Client) IpamServicesRead(params *IpamServicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamServicesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamServicesReadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_services_read", + Method: "GET", + PathPattern: "/ipam/services/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamServicesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamServicesReadOK) + 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_services_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamServicesUpdate ipam services update API +*/ +func (a *Client) IpamServicesUpdate(params *IpamServicesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamServicesUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamServicesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_services_update", + Method: "PUT", + PathPattern: "/ipam/services/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamServicesUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamServicesUpdateOK) + 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_services_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVlanGroupsCreate ipam vlan groups create API +*/ +func (a *Client) IpamVlanGroupsCreate(params *IpamVlanGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlanGroupsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVlanGroupsCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vlan-groups_create", + Method: "POST", + PathPattern: "/ipam/vlan-groups/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVlanGroupsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVlanGroupsCreateCreated) + 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_vlan-groups_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVlanGroupsDelete ipam vlan groups delete API +*/ +func (a *Client) IpamVlanGroupsDelete(params *IpamVlanGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlanGroupsDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVlanGroupsDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vlan-groups_delete", + Method: "DELETE", + PathPattern: "/ipam/vlan-groups/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVlanGroupsDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVlanGroupsDeleteNoContent) + 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_vlan-groups_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVlanGroupsList Call to super to allow for caching +*/ +func (a *Client) IpamVlanGroupsList(params *IpamVlanGroupsListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlanGroupsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVlanGroupsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vlan-groups_list", + Method: "GET", + PathPattern: "/ipam/vlan-groups/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVlanGroupsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVlanGroupsListOK) + 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_vlan-groups_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVlanGroupsPartialUpdate ipam vlan groups partial update API +*/ +func (a *Client) IpamVlanGroupsPartialUpdate(params *IpamVlanGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlanGroupsPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVlanGroupsPartialUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vlan-groups_partial_update", + Method: "PATCH", + PathPattern: "/ipam/vlan-groups/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVlanGroupsPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVlanGroupsPartialUpdateOK) + 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_vlan-groups_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVlanGroupsRead Call to super to allow for caching +*/ +func (a *Client) IpamVlanGroupsRead(params *IpamVlanGroupsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlanGroupsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVlanGroupsReadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vlan-groups_read", + Method: "GET", + PathPattern: "/ipam/vlan-groups/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVlanGroupsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVlanGroupsReadOK) + 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_vlan-groups_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVlanGroupsUpdate ipam vlan groups update API +*/ +func (a *Client) IpamVlanGroupsUpdate(params *IpamVlanGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlanGroupsUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVlanGroupsUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vlan-groups_update", + Method: "PUT", + PathPattern: "/ipam/vlan-groups/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVlanGroupsUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVlanGroupsUpdateOK) + 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_vlan-groups_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVlansCreate ipam vlans create API +*/ +func (a *Client) IpamVlansCreate(params *IpamVlansCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlansCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVlansCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vlans_create", + Method: "POST", + PathPattern: "/ipam/vlans/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVlansCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVlansCreateCreated) + 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_vlans_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVlansDelete ipam vlans delete API +*/ +func (a *Client) IpamVlansDelete(params *IpamVlansDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlansDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVlansDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vlans_delete", + Method: "DELETE", + PathPattern: "/ipam/vlans/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVlansDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVlansDeleteNoContent) + 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_vlans_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVlansList Call to super to allow for caching +*/ +func (a *Client) IpamVlansList(params *IpamVlansListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlansListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVlansListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vlans_list", + Method: "GET", + PathPattern: "/ipam/vlans/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVlansListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVlansListOK) + 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_vlans_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVlansPartialUpdate ipam vlans partial update API +*/ +func (a *Client) IpamVlansPartialUpdate(params *IpamVlansPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlansPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVlansPartialUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vlans_partial_update", + Method: "PATCH", + PathPattern: "/ipam/vlans/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVlansPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVlansPartialUpdateOK) + 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_vlans_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVlansRead Call to super to allow for caching +*/ +func (a *Client) IpamVlansRead(params *IpamVlansReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlansReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVlansReadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vlans_read", + Method: "GET", + PathPattern: "/ipam/vlans/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVlansReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVlansReadOK) + 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_vlans_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVlansUpdate ipam vlans update API +*/ +func (a *Client) IpamVlansUpdate(params *IpamVlansUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVlansUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVlansUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vlans_update", + Method: "PUT", + PathPattern: "/ipam/vlans/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVlansUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVlansUpdateOK) + 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_vlans_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVrfsCreate ipam vrfs create API +*/ +func (a *Client) IpamVrfsCreate(params *IpamVrfsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVrfsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVrfsCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vrfs_create", + Method: "POST", + PathPattern: "/ipam/vrfs/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVrfsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVrfsCreateCreated) + 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_vrfs_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVrfsDelete ipam vrfs delete API +*/ +func (a *Client) IpamVrfsDelete(params *IpamVrfsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVrfsDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVrfsDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vrfs_delete", + Method: "DELETE", + PathPattern: "/ipam/vrfs/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVrfsDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVrfsDeleteNoContent) + 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_vrfs_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVrfsList Call to super to allow for caching +*/ +func (a *Client) IpamVrfsList(params *IpamVrfsListParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVrfsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVrfsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vrfs_list", + Method: "GET", + PathPattern: "/ipam/vrfs/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVrfsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVrfsListOK) + 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_vrfs_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVrfsPartialUpdate ipam vrfs partial update API +*/ +func (a *Client) IpamVrfsPartialUpdate(params *IpamVrfsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVrfsPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVrfsPartialUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vrfs_partial_update", + Method: "PATCH", + PathPattern: "/ipam/vrfs/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVrfsPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVrfsPartialUpdateOK) + 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_vrfs_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVrfsRead Call to super to allow for caching +*/ +func (a *Client) IpamVrfsRead(params *IpamVrfsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVrfsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVrfsReadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vrfs_read", + Method: "GET", + PathPattern: "/ipam/vrfs/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVrfsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVrfsReadOK) + 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_vrfs_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVrfsUpdate ipam vrfs update API +*/ +func (a *Client) IpamVrfsUpdate(params *IpamVrfsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IpamVrfsUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVrfsUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ipam_vrfs_update", + Method: "PUT", + PathPattern: "/ipam/vrfs/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVrfsUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVrfsUpdateOK) + 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_vrfs_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/ipam/ip_a_m_ip_addresses_create_parameters.go b/netbox/client/ipam/ipam_ip_addresses_create_parameters.go similarity index 63% rename from netbox/client/ipam/ip_a_m_ip_addresses_create_parameters.go rename to netbox/client/ipam/ipam_ip_addresses_create_parameters.go index 37e246d85df6c7392963cfd85b4bbe5510f0c626..8525bd25f7af307962df93409e267469954ae898 100644 --- a/netbox/client/ipam/ip_a_m_ip_addresses_create_parameters.go +++ b/netbox/client/ipam/ipam_ip_addresses_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -30,52 +31,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMIPAddressesCreateParams creates a new IPAMIPAddressesCreateParams object +// NewIpamIPAddressesCreateParams creates a new IpamIPAddressesCreateParams object // with the default values initialized. -func NewIPAMIPAddressesCreateParams() *IPAMIPAddressesCreateParams { +func NewIpamIPAddressesCreateParams() *IpamIPAddressesCreateParams { var () - return &IPAMIPAddressesCreateParams{ + return &IpamIPAddressesCreateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMIPAddressesCreateParamsWithTimeout creates a new IPAMIPAddressesCreateParams object +// NewIpamIPAddressesCreateParamsWithTimeout creates a new IpamIPAddressesCreateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMIPAddressesCreateParamsWithTimeout(timeout time.Duration) *IPAMIPAddressesCreateParams { +func NewIpamIPAddressesCreateParamsWithTimeout(timeout time.Duration) *IpamIPAddressesCreateParams { var () - return &IPAMIPAddressesCreateParams{ + return &IpamIPAddressesCreateParams{ timeout: timeout, } } -// NewIPAMIPAddressesCreateParamsWithContext creates a new IPAMIPAddressesCreateParams object +// NewIpamIPAddressesCreateParamsWithContext creates a new IpamIPAddressesCreateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMIPAddressesCreateParamsWithContext(ctx context.Context) *IPAMIPAddressesCreateParams { +func NewIpamIPAddressesCreateParamsWithContext(ctx context.Context) *IpamIPAddressesCreateParams { var () - return &IPAMIPAddressesCreateParams{ + return &IpamIPAddressesCreateParams{ Context: ctx, } } -// NewIPAMIPAddressesCreateParamsWithHTTPClient creates a new IPAMIPAddressesCreateParams object +// NewIpamIPAddressesCreateParamsWithHTTPClient creates a new IpamIPAddressesCreateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMIPAddressesCreateParamsWithHTTPClient(client *http.Client) *IPAMIPAddressesCreateParams { +func NewIpamIPAddressesCreateParamsWithHTTPClient(client *http.Client) *IpamIPAddressesCreateParams { var () - return &IPAMIPAddressesCreateParams{ + return &IpamIPAddressesCreateParams{ HTTPClient: client, } } -/*IPAMIPAddressesCreateParams contains all the parameters to send to the API endpoint +/*IpamIPAddressesCreateParams contains all the parameters to send to the API endpoint for the ipam ip addresses create operation typically these are written to a http.Request */ -type IPAMIPAddressesCreateParams struct { +type IpamIPAddressesCreateParams struct { /*Data*/ Data *models.WritableIPAddress @@ -86,51 +87,51 @@ type IPAMIPAddressesCreateParams struct { } // WithTimeout adds the timeout to the ipam ip addresses create params -func (o *IPAMIPAddressesCreateParams) WithTimeout(timeout time.Duration) *IPAMIPAddressesCreateParams { +func (o *IpamIPAddressesCreateParams) WithTimeout(timeout time.Duration) *IpamIPAddressesCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam ip addresses create params -func (o *IPAMIPAddressesCreateParams) SetTimeout(timeout time.Duration) { +func (o *IpamIPAddressesCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam ip addresses create params -func (o *IPAMIPAddressesCreateParams) WithContext(ctx context.Context) *IPAMIPAddressesCreateParams { +func (o *IpamIPAddressesCreateParams) WithContext(ctx context.Context) *IpamIPAddressesCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam ip addresses create params -func (o *IPAMIPAddressesCreateParams) SetContext(ctx context.Context) { +func (o *IpamIPAddressesCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam ip addresses create params -func (o *IPAMIPAddressesCreateParams) WithHTTPClient(client *http.Client) *IPAMIPAddressesCreateParams { +func (o *IpamIPAddressesCreateParams) WithHTTPClient(client *http.Client) *IpamIPAddressesCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam ip addresses create params -func (o *IPAMIPAddressesCreateParams) SetHTTPClient(client *http.Client) { +func (o *IpamIPAddressesCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam ip addresses create params -func (o *IPAMIPAddressesCreateParams) WithData(data *models.WritableIPAddress) *IPAMIPAddressesCreateParams { +func (o *IpamIPAddressesCreateParams) WithData(data *models.WritableIPAddress) *IpamIPAddressesCreateParams { o.SetData(data) return o } // SetData adds the data to the ipam ip addresses create params -func (o *IPAMIPAddressesCreateParams) SetData(data *models.WritableIPAddress) { +func (o *IpamIPAddressesCreateParams) SetData(data *models.WritableIPAddress) { o.Data = data } // WriteToRequest writes these params to a swagger request -func (o *IPAMIPAddressesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamIPAddressesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_ip_addresses_create_responses.go b/netbox/client/ipam/ipam_ip_addresses_create_responses.go similarity index 68% rename from netbox/client/ipam/ip_a_m_ip_addresses_create_responses.go rename to netbox/client/ipam/ipam_ip_addresses_create_responses.go index 58b41e6cae47b9f8b6268cdc4ad51c0939def70e..8636108b6cfa5c7d727ffcc1ea9720800719f444 100644 --- a/netbox/client/ipam/ip_a_m_ip_addresses_create_responses.go +++ b/netbox/client/ipam/ipam_ip_addresses_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMIPAddressesCreateReader is a Reader for the IPAMIPAddressesCreate structure. -type IPAMIPAddressesCreateReader struct { +// IpamIPAddressesCreateReader is a Reader for the IpamIPAddressesCreate structure. +type IpamIPAddressesCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMIPAddressesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPAddressesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: - result := NewIPAMIPAddressesCreateCreated() + result := NewIpamIPAddressesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMIPAddressesCreateReader) ReadResponse(response runtime.ClientRespon } } -// NewIPAMIPAddressesCreateCreated creates a IPAMIPAddressesCreateCreated with default headers values -func NewIPAMIPAddressesCreateCreated() *IPAMIPAddressesCreateCreated { - return &IPAMIPAddressesCreateCreated{} +// NewIpamIPAddressesCreateCreated creates a IpamIPAddressesCreateCreated with default headers values +func NewIpamIPAddressesCreateCreated() *IpamIPAddressesCreateCreated { + return &IpamIPAddressesCreateCreated{} } -/*IPAMIPAddressesCreateCreated handles this case with default header values. +/*IpamIPAddressesCreateCreated handles this case with default header values. -IPAMIPAddressesCreateCreated ipam Ip addresses create created +IpamIPAddressesCreateCreated ipam Ip addresses create created */ -type IPAMIPAddressesCreateCreated struct { +type IpamIPAddressesCreateCreated struct { Payload *models.IPAddress } -func (o *IPAMIPAddressesCreateCreated) Error() string { +func (o *IpamIPAddressesCreateCreated) Error() string { return fmt.Sprintf("[POST /ipam/ip-addresses/][%d] ipamIpAddressesCreateCreated %+v", 201, o.Payload) } -func (o *IPAMIPAddressesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPAddressesCreateCreated) GetPayload() *models.IPAddress { + return o.Payload +} + +func (o *IpamIPAddressesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.IPAddress) diff --git a/netbox/client/ipam/ip_a_m_ip_addresses_delete_parameters.go b/netbox/client/ipam/ipam_ip_addresses_delete_parameters.go similarity index 65% rename from netbox/client/ipam/ip_a_m_ip_addresses_delete_parameters.go rename to netbox/client/ipam/ipam_ip_addresses_delete_parameters.go index cb81fc5ea95b89606e12b54f3236beca6040a046..7d8de4307dd6ff43a5019c99d6615f6e83200098 100644 --- a/netbox/client/ipam/ip_a_m_ip_addresses_delete_parameters.go +++ b/netbox/client/ipam/ipam_ip_addresses_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMIPAddressesDeleteParams creates a new IPAMIPAddressesDeleteParams object +// NewIpamIPAddressesDeleteParams creates a new IpamIPAddressesDeleteParams object // with the default values initialized. -func NewIPAMIPAddressesDeleteParams() *IPAMIPAddressesDeleteParams { +func NewIpamIPAddressesDeleteParams() *IpamIPAddressesDeleteParams { var () - return &IPAMIPAddressesDeleteParams{ + return &IpamIPAddressesDeleteParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMIPAddressesDeleteParamsWithTimeout creates a new IPAMIPAddressesDeleteParams object +// NewIpamIPAddressesDeleteParamsWithTimeout creates a new IpamIPAddressesDeleteParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMIPAddressesDeleteParamsWithTimeout(timeout time.Duration) *IPAMIPAddressesDeleteParams { +func NewIpamIPAddressesDeleteParamsWithTimeout(timeout time.Duration) *IpamIPAddressesDeleteParams { var () - return &IPAMIPAddressesDeleteParams{ + return &IpamIPAddressesDeleteParams{ timeout: timeout, } } -// NewIPAMIPAddressesDeleteParamsWithContext creates a new IPAMIPAddressesDeleteParams object +// NewIpamIPAddressesDeleteParamsWithContext creates a new IpamIPAddressesDeleteParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMIPAddressesDeleteParamsWithContext(ctx context.Context) *IPAMIPAddressesDeleteParams { +func NewIpamIPAddressesDeleteParamsWithContext(ctx context.Context) *IpamIPAddressesDeleteParams { var () - return &IPAMIPAddressesDeleteParams{ + return &IpamIPAddressesDeleteParams{ Context: ctx, } } -// NewIPAMIPAddressesDeleteParamsWithHTTPClient creates a new IPAMIPAddressesDeleteParams object +// NewIpamIPAddressesDeleteParamsWithHTTPClient creates a new IpamIPAddressesDeleteParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMIPAddressesDeleteParamsWithHTTPClient(client *http.Client) *IPAMIPAddressesDeleteParams { +func NewIpamIPAddressesDeleteParamsWithHTTPClient(client *http.Client) *IpamIPAddressesDeleteParams { var () - return &IPAMIPAddressesDeleteParams{ + return &IpamIPAddressesDeleteParams{ HTTPClient: client, } } -/*IPAMIPAddressesDeleteParams contains all the parameters to send to the API endpoint +/*IpamIPAddressesDeleteParams contains all the parameters to send to the API endpoint for the ipam ip addresses delete operation typically these are written to a http.Request */ -type IPAMIPAddressesDeleteParams struct { +type IpamIPAddressesDeleteParams struct { /*ID A unique integer value identifying this IP address. @@ -88,51 +89,51 @@ type IPAMIPAddressesDeleteParams struct { } // WithTimeout adds the timeout to the ipam ip addresses delete params -func (o *IPAMIPAddressesDeleteParams) WithTimeout(timeout time.Duration) *IPAMIPAddressesDeleteParams { +func (o *IpamIPAddressesDeleteParams) WithTimeout(timeout time.Duration) *IpamIPAddressesDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam ip addresses delete params -func (o *IPAMIPAddressesDeleteParams) SetTimeout(timeout time.Duration) { +func (o *IpamIPAddressesDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam ip addresses delete params -func (o *IPAMIPAddressesDeleteParams) WithContext(ctx context.Context) *IPAMIPAddressesDeleteParams { +func (o *IpamIPAddressesDeleteParams) WithContext(ctx context.Context) *IpamIPAddressesDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam ip addresses delete params -func (o *IPAMIPAddressesDeleteParams) SetContext(ctx context.Context) { +func (o *IpamIPAddressesDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam ip addresses delete params -func (o *IPAMIPAddressesDeleteParams) WithHTTPClient(client *http.Client) *IPAMIPAddressesDeleteParams { +func (o *IpamIPAddressesDeleteParams) WithHTTPClient(client *http.Client) *IpamIPAddressesDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam ip addresses delete params -func (o *IPAMIPAddressesDeleteParams) SetHTTPClient(client *http.Client) { +func (o *IpamIPAddressesDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam ip addresses delete params -func (o *IPAMIPAddressesDeleteParams) WithID(id int64) *IPAMIPAddressesDeleteParams { +func (o *IpamIPAddressesDeleteParams) WithID(id int64) *IpamIPAddressesDeleteParams { o.SetID(id) return o } // SetID adds the id to the ipam ip addresses delete params -func (o *IPAMIPAddressesDeleteParams) SetID(id int64) { +func (o *IpamIPAddressesDeleteParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMIPAddressesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamIPAddressesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_ip_addresses_delete_responses.go b/netbox/client/ipam/ipam_ip_addresses_delete_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_ip_addresses_delete_responses.go rename to netbox/client/ipam/ipam_ip_addresses_delete_responses.go index b05cb8c3275449b83bc56b4e53019a59bde6be13..3ebd4799534abadd79bbf28d8170a4aad1f3b691 100644 --- a/netbox/client/ipam/ip_a_m_ip_addresses_delete_responses.go +++ b/netbox/client/ipam/ipam_ip_addresses_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,17 +28,16 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// IPAMIPAddressesDeleteReader is a Reader for the IPAMIPAddressesDelete structure. -type IPAMIPAddressesDeleteReader struct { +// IpamIPAddressesDeleteReader is a Reader for the IpamIPAddressesDelete structure. +type IpamIPAddressesDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMIPAddressesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPAddressesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: - result := NewIPAMIPAddressesDeleteNoContent() + result := NewIpamIPAddressesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -48,23 +48,23 @@ func (o *IPAMIPAddressesDeleteReader) ReadResponse(response runtime.ClientRespon } } -// NewIPAMIPAddressesDeleteNoContent creates a IPAMIPAddressesDeleteNoContent with default headers values -func NewIPAMIPAddressesDeleteNoContent() *IPAMIPAddressesDeleteNoContent { - return &IPAMIPAddressesDeleteNoContent{} +// NewIpamIPAddressesDeleteNoContent creates a IpamIPAddressesDeleteNoContent with default headers values +func NewIpamIPAddressesDeleteNoContent() *IpamIPAddressesDeleteNoContent { + return &IpamIPAddressesDeleteNoContent{} } -/*IPAMIPAddressesDeleteNoContent handles this case with default header values. +/*IpamIPAddressesDeleteNoContent handles this case with default header values. -IPAMIPAddressesDeleteNoContent ipam Ip addresses delete no content +IpamIPAddressesDeleteNoContent ipam Ip addresses delete no content */ -type IPAMIPAddressesDeleteNoContent struct { +type IpamIPAddressesDeleteNoContent struct { } -func (o *IPAMIPAddressesDeleteNoContent) Error() string { +func (o *IpamIPAddressesDeleteNoContent) Error() string { return fmt.Sprintf("[DELETE /ipam/ip-addresses/{id}/][%d] ipamIpAddressesDeleteNoContent ", 204) } -func (o *IPAMIPAddressesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPAddressesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/ipam/ip_a_m_ip_addresses_list_parameters.go b/netbox/client/ipam/ipam_ip_addresses_list_parameters.go similarity index 59% rename from netbox/client/ipam/ip_a_m_ip_addresses_list_parameters.go rename to netbox/client/ipam/ipam_ip_addresses_list_parameters.go index 06b9cf2a6227fc2384084cabd4cfa41733473576..da115998ec0b601ba2ff9418c616cf755c3a5c1a 100644 --- a/netbox/client/ipam/ip_a_m_ip_addresses_list_parameters.go +++ b/netbox/client/ipam/ipam_ip_addresses_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,52 +33,60 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMIPAddressesListParams creates a new IPAMIPAddressesListParams object +// NewIpamIPAddressesListParams creates a new IpamIPAddressesListParams object // with the default values initialized. -func NewIPAMIPAddressesListParams() *IPAMIPAddressesListParams { +func NewIpamIPAddressesListParams() *IpamIPAddressesListParams { var () - return &IPAMIPAddressesListParams{ + return &IpamIPAddressesListParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMIPAddressesListParamsWithTimeout creates a new IPAMIPAddressesListParams object +// NewIpamIPAddressesListParamsWithTimeout creates a new IpamIPAddressesListParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMIPAddressesListParamsWithTimeout(timeout time.Duration) *IPAMIPAddressesListParams { +func NewIpamIPAddressesListParamsWithTimeout(timeout time.Duration) *IpamIPAddressesListParams { var () - return &IPAMIPAddressesListParams{ + return &IpamIPAddressesListParams{ timeout: timeout, } } -// NewIPAMIPAddressesListParamsWithContext creates a new IPAMIPAddressesListParams object +// NewIpamIPAddressesListParamsWithContext creates a new IpamIPAddressesListParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMIPAddressesListParamsWithContext(ctx context.Context) *IPAMIPAddressesListParams { +func NewIpamIPAddressesListParamsWithContext(ctx context.Context) *IpamIPAddressesListParams { var () - return &IPAMIPAddressesListParams{ + return &IpamIPAddressesListParams{ Context: ctx, } } -// NewIPAMIPAddressesListParamsWithHTTPClient creates a new IPAMIPAddressesListParams object +// NewIpamIPAddressesListParamsWithHTTPClient creates a new IpamIPAddressesListParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMIPAddressesListParamsWithHTTPClient(client *http.Client) *IPAMIPAddressesListParams { +func NewIpamIPAddressesListParamsWithHTTPClient(client *http.Client) *IpamIPAddressesListParams { var () - return &IPAMIPAddressesListParams{ + return &IpamIPAddressesListParams{ HTTPClient: client, } } -/*IPAMIPAddressesListParams contains all the parameters to send to the API endpoint +/*IpamIPAddressesListParams contains all the parameters to send to the API endpoint for the ipam ip addresses list operation typically these are written to a http.Request */ -type IPAMIPAddressesListParams struct { +type IpamIPAddressesListParams struct { /*Address*/ Address *string + /*AssignedToInterface*/ + AssignedToInterface *string + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*Device*/ Device *string /*DeviceID*/ @@ -95,6 +104,12 @@ type IPAMIPAddressesListParams struct { Interface *string /*InterfaceID*/ InterfaceID *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. @@ -140,304 +155,381 @@ type IPAMIPAddressesListParams struct { } // WithTimeout adds the timeout to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithTimeout(timeout time.Duration) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithTimeout(timeout time.Duration) *IpamIPAddressesListParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetTimeout(timeout time.Duration) { +func (o *IpamIPAddressesListParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithContext(ctx context.Context) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithContext(ctx context.Context) *IpamIPAddressesListParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetContext(ctx context.Context) { +func (o *IpamIPAddressesListParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithHTTPClient(client *http.Client) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithHTTPClient(client *http.Client) *IpamIPAddressesListParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetHTTPClient(client *http.Client) { +func (o *IpamIPAddressesListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithAddress adds the address to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithAddress(address *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithAddress(address *string) *IpamIPAddressesListParams { o.SetAddress(address) return o } // SetAddress adds the address to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetAddress(address *string) { +func (o *IpamIPAddressesListParams) SetAddress(address *string) { o.Address = address } +// WithAssignedToInterface adds the assignedToInterface to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithAssignedToInterface(assignedToInterface *string) *IpamIPAddressesListParams { + o.SetAssignedToInterface(assignedToInterface) + return o +} + +// SetAssignedToInterface adds the assignedToInterface to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetAssignedToInterface(assignedToInterface *string) { + o.AssignedToInterface = assignedToInterface +} + +// WithCreated adds the created to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithCreated(created *string) *IpamIPAddressesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithCreatedGte(createdGte *string) *IpamIPAddressesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithCreatedLte(createdLte *string) *IpamIPAddressesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + // WithDevice adds the device to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithDevice(device *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithDevice(device *string) *IpamIPAddressesListParams { o.SetDevice(device) return o } // SetDevice adds the device to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetDevice(device *string) { +func (o *IpamIPAddressesListParams) SetDevice(device *string) { o.Device = device } // WithDeviceID adds the deviceID to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithDeviceID(deviceID *float64) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithDeviceID(deviceID *float64) *IpamIPAddressesListParams { o.SetDeviceID(deviceID) return o } // SetDeviceID adds the deviceId to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetDeviceID(deviceID *float64) { +func (o *IpamIPAddressesListParams) SetDeviceID(deviceID *float64) { o.DeviceID = deviceID } // WithDNSName adds the dNSName to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithDNSName(dNSName *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithDNSName(dNSName *string) *IpamIPAddressesListParams { o.SetDNSName(dNSName) return o } // SetDNSName adds the dnsName to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetDNSName(dNSName *string) { +func (o *IpamIPAddressesListParams) SetDNSName(dNSName *string) { o.DNSName = dNSName } // WithFamily adds the family to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithFamily(family *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithFamily(family *string) *IpamIPAddressesListParams { o.SetFamily(family) return o } // SetFamily adds the family to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetFamily(family *string) { +func (o *IpamIPAddressesListParams) SetFamily(family *string) { o.Family = family } // WithIDIn adds the iDIn to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithIDIn(iDIn *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithIDIn(iDIn *string) *IpamIPAddressesListParams { o.SetIDIn(iDIn) return o } // SetIDIn adds the idIn to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetIDIn(iDIn *string) { +func (o *IpamIPAddressesListParams) SetIDIn(iDIn *string) { o.IDIn = iDIn } // WithInterface adds the interfaceVar to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithInterface(interfaceVar *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithInterface(interfaceVar *string) *IpamIPAddressesListParams { o.SetInterface(interfaceVar) return o } // SetInterface adds the interface to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetInterface(interfaceVar *string) { +func (o *IpamIPAddressesListParams) SetInterface(interfaceVar *string) { o.Interface = interfaceVar } // WithInterfaceID adds the interfaceID to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithInterfaceID(interfaceID *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithInterfaceID(interfaceID *string) *IpamIPAddressesListParams { o.SetInterfaceID(interfaceID) return o } // SetInterfaceID adds the interfaceId to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetInterfaceID(interfaceID *string) { +func (o *IpamIPAddressesListParams) SetInterfaceID(interfaceID *string) { o.InterfaceID = interfaceID } +// WithLastUpdated adds the lastUpdated to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithLastUpdated(lastUpdated *string) *IpamIPAddressesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamIPAddressesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamIPAddressesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithLimit(limit *int64) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithLimit(limit *int64) *IpamIPAddressesListParams { o.SetLimit(limit) return o } // SetLimit adds the limit to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetLimit(limit *int64) { +func (o *IpamIPAddressesListParams) SetLimit(limit *int64) { o.Limit = limit } // WithMaskLength adds the maskLength to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithMaskLength(maskLength *float64) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithMaskLength(maskLength *float64) *IpamIPAddressesListParams { o.SetMaskLength(maskLength) return o } // SetMaskLength adds the maskLength to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetMaskLength(maskLength *float64) { +func (o *IpamIPAddressesListParams) SetMaskLength(maskLength *float64) { o.MaskLength = maskLength } // WithOffset adds the offset to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithOffset(offset *int64) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithOffset(offset *int64) *IpamIPAddressesListParams { o.SetOffset(offset) return o } // SetOffset adds the offset to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetOffset(offset *int64) { +func (o *IpamIPAddressesListParams) SetOffset(offset *int64) { o.Offset = offset } // WithParent adds the parent to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithParent(parent *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithParent(parent *string) *IpamIPAddressesListParams { o.SetParent(parent) return o } // SetParent adds the parent to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetParent(parent *string) { +func (o *IpamIPAddressesListParams) SetParent(parent *string) { o.Parent = parent } // WithQ adds the q to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithQ(q *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithQ(q *string) *IpamIPAddressesListParams { o.SetQ(q) return o } // SetQ adds the q to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetQ(q *string) { +func (o *IpamIPAddressesListParams) SetQ(q *string) { o.Q = q } // WithRole adds the role to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithRole(role *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithRole(role *string) *IpamIPAddressesListParams { o.SetRole(role) return o } // SetRole adds the role to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetRole(role *string) { +func (o *IpamIPAddressesListParams) SetRole(role *string) { o.Role = role } // WithStatus adds the status to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithStatus(status *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithStatus(status *string) *IpamIPAddressesListParams { o.SetStatus(status) return o } // SetStatus adds the status to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetStatus(status *string) { +func (o *IpamIPAddressesListParams) SetStatus(status *string) { o.Status = status } // WithTag adds the tag to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithTag(tag *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithTag(tag *string) *IpamIPAddressesListParams { o.SetTag(tag) return o } // SetTag adds the tag to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetTag(tag *string) { +func (o *IpamIPAddressesListParams) SetTag(tag *string) { o.Tag = tag } // WithTenant adds the tenant to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithTenant(tenant *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithTenant(tenant *string) *IpamIPAddressesListParams { o.SetTenant(tenant) return o } // SetTenant adds the tenant to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetTenant(tenant *string) { +func (o *IpamIPAddressesListParams) SetTenant(tenant *string) { o.Tenant = tenant } // WithTenantGroup adds the tenantGroup to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithTenantGroup(tenantGroup *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithTenantGroup(tenantGroup *string) *IpamIPAddressesListParams { o.SetTenantGroup(tenantGroup) return o } // SetTenantGroup adds the tenantGroup to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetTenantGroup(tenantGroup *string) { +func (o *IpamIPAddressesListParams) SetTenantGroup(tenantGroup *string) { o.TenantGroup = tenantGroup } // WithTenantGroupID adds the tenantGroupID to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithTenantGroupID(tenantGroupID *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithTenantGroupID(tenantGroupID *string) *IpamIPAddressesListParams { o.SetTenantGroupID(tenantGroupID) return o } // SetTenantGroupID adds the tenantGroupId to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetTenantGroupID(tenantGroupID *string) { +func (o *IpamIPAddressesListParams) SetTenantGroupID(tenantGroupID *string) { o.TenantGroupID = tenantGroupID } // WithTenantID adds the tenantID to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithTenantID(tenantID *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithTenantID(tenantID *string) *IpamIPAddressesListParams { o.SetTenantID(tenantID) return o } // SetTenantID adds the tenantId to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetTenantID(tenantID *string) { +func (o *IpamIPAddressesListParams) SetTenantID(tenantID *string) { o.TenantID = tenantID } // WithVirtualMachine adds the virtualMachine to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithVirtualMachine(virtualMachine *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithVirtualMachine(virtualMachine *string) *IpamIPAddressesListParams { o.SetVirtualMachine(virtualMachine) return o } // SetVirtualMachine adds the virtualMachine to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetVirtualMachine(virtualMachine *string) { +func (o *IpamIPAddressesListParams) SetVirtualMachine(virtualMachine *string) { o.VirtualMachine = virtualMachine } // WithVirtualMachineID adds the virtualMachineID to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithVirtualMachineID(virtualMachineID *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithVirtualMachineID(virtualMachineID *string) *IpamIPAddressesListParams { o.SetVirtualMachineID(virtualMachineID) return o } // SetVirtualMachineID adds the virtualMachineId to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetVirtualMachineID(virtualMachineID *string) { +func (o *IpamIPAddressesListParams) SetVirtualMachineID(virtualMachineID *string) { o.VirtualMachineID = virtualMachineID } // WithVrf adds the vrf to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithVrf(vrf *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithVrf(vrf *string) *IpamIPAddressesListParams { o.SetVrf(vrf) return o } // SetVrf adds the vrf to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetVrf(vrf *string) { +func (o *IpamIPAddressesListParams) SetVrf(vrf *string) { o.Vrf = vrf } // WithVrfID adds the vrfID to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) WithVrfID(vrfID *string) *IPAMIPAddressesListParams { +func (o *IpamIPAddressesListParams) WithVrfID(vrfID *string) *IpamIPAddressesListParams { o.SetVrfID(vrfID) return o } // SetVrfID adds the vrfId to the ipam ip addresses list params -func (o *IPAMIPAddressesListParams) SetVrfID(vrfID *string) { +func (o *IpamIPAddressesListParams) SetVrfID(vrfID *string) { o.VrfID = vrfID } // WriteToRequest writes these params to a swagger request -func (o *IPAMIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err @@ -460,6 +552,70 @@ func (o *IPAMIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg } + if o.AssignedToInterface != nil { + + // query param assigned_to_interface + var qrAssignedToInterface string + if o.AssignedToInterface != nil { + qrAssignedToInterface = *o.AssignedToInterface + } + qAssignedToInterface := qrAssignedToInterface + if qAssignedToInterface != "" { + if err := r.SetQueryParam("assigned_to_interface", qAssignedToInterface); 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.Device != nil { // query param device @@ -572,6 +728,54 @@ func (o *IPAMIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg } + 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 diff --git a/netbox/client/ipam/ip_a_m_ip_addresses_list_responses.go b/netbox/client/ipam/ipam_ip_addresses_list_responses.go similarity index 71% rename from netbox/client/ipam/ip_a_m_ip_addresses_list_responses.go rename to netbox/client/ipam/ipam_ip_addresses_list_responses.go index 7500bb51954370fc9b98d3a6345dec720181b774..2b6fd4bc666ee84e80c9d5bfbc290745adb0bcb6 100644 --- a/netbox/client/ipam/ip_a_m_ip_addresses_list_responses.go +++ b/netbox/client/ipam/ipam_ip_addresses_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,20 +32,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMIPAddressesListReader is a Reader for the IPAMIPAddressesList structure. -type IPAMIPAddressesListReader struct { +// IpamIPAddressesListReader is a Reader for the IpamIPAddressesList structure. +type IpamIPAddressesListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMIPAddressesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPAddressesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMIPAddressesListOK() + result := NewIpamIPAddressesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -55,26 +55,30 @@ func (o *IPAMIPAddressesListReader) ReadResponse(response runtime.ClientResponse } } -// NewIPAMIPAddressesListOK creates a IPAMIPAddressesListOK with default headers values -func NewIPAMIPAddressesListOK() *IPAMIPAddressesListOK { - return &IPAMIPAddressesListOK{} +// NewIpamIPAddressesListOK creates a IpamIPAddressesListOK with default headers values +func NewIpamIPAddressesListOK() *IpamIPAddressesListOK { + return &IpamIPAddressesListOK{} } -/*IPAMIPAddressesListOK handles this case with default header values. +/*IpamIPAddressesListOK handles this case with default header values. -IPAMIPAddressesListOK ipam Ip addresses list o k +IpamIPAddressesListOK ipam Ip addresses list o k */ -type IPAMIPAddressesListOK struct { - Payload *IPAMIPAddressesListOKBody +type IpamIPAddressesListOK struct { + Payload *IpamIPAddressesListOKBody } -func (o *IPAMIPAddressesListOK) Error() string { +func (o *IpamIPAddressesListOK) Error() string { return fmt.Sprintf("[GET /ipam/ip-addresses/][%d] ipamIpAddressesListOK %+v", 200, o.Payload) } -func (o *IPAMIPAddressesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPAddressesListOK) GetPayload() *IpamIPAddressesListOKBody { + return o.Payload +} + +func (o *IpamIPAddressesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(IPAMIPAddressesListOKBody) + o.Payload = new(IpamIPAddressesListOKBody) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -84,10 +88,10 @@ func (o *IPAMIPAddressesListOK) readResponse(response runtime.ClientResponse, co return nil } -/*IPAMIPAddressesListOKBody IP a m IP addresses list o k body -swagger:model IPAMIPAddressesListOKBody +/*IpamIPAddressesListOKBody ipam IP addresses list o k body +swagger:model IpamIPAddressesListOKBody */ -type IPAMIPAddressesListOKBody struct { +type IpamIPAddressesListOKBody struct { // count // Required: true @@ -106,8 +110,8 @@ type IPAMIPAddressesListOKBody struct { Results []*models.IPAddress `json:"results"` } -// Validate validates this IP a m IP addresses list o k body -func (o *IPAMIPAddressesListOKBody) Validate(formats strfmt.Registry) error { +// Validate validates this ipam IP addresses list o k body +func (o *IpamIPAddressesListOKBody) Validate(formats strfmt.Registry) error { var res []error if err := o.validateCount(formats); err != nil { @@ -132,7 +136,7 @@ func (o *IPAMIPAddressesListOKBody) Validate(formats strfmt.Registry) error { return nil } -func (o *IPAMIPAddressesListOKBody) validateCount(formats strfmt.Registry) error { +func (o *IpamIPAddressesListOKBody) validateCount(formats strfmt.Registry) error { if err := validate.Required("ipamIpAddressesListOK"+"."+"count", "body", o.Count); err != nil { return err @@ -141,7 +145,7 @@ func (o *IPAMIPAddressesListOKBody) validateCount(formats strfmt.Registry) error return nil } -func (o *IPAMIPAddressesListOKBody) validateNext(formats strfmt.Registry) error { +func (o *IpamIPAddressesListOKBody) validateNext(formats strfmt.Registry) error { if swag.IsZero(o.Next) { // not required return nil @@ -154,7 +158,7 @@ func (o *IPAMIPAddressesListOKBody) validateNext(formats strfmt.Registry) error return nil } -func (o *IPAMIPAddressesListOKBody) validatePrevious(formats strfmt.Registry) error { +func (o *IpamIPAddressesListOKBody) validatePrevious(formats strfmt.Registry) error { if swag.IsZero(o.Previous) { // not required return nil @@ -167,7 +171,7 @@ func (o *IPAMIPAddressesListOKBody) validatePrevious(formats strfmt.Registry) er return nil } -func (o *IPAMIPAddressesListOKBody) validateResults(formats strfmt.Registry) error { +func (o *IpamIPAddressesListOKBody) validateResults(formats strfmt.Registry) error { if err := validate.Required("ipamIpAddressesListOK"+"."+"results", "body", o.Results); err != nil { return err @@ -193,7 +197,7 @@ func (o *IPAMIPAddressesListOKBody) validateResults(formats strfmt.Registry) err } // MarshalBinary interface implementation -func (o *IPAMIPAddressesListOKBody) MarshalBinary() ([]byte, error) { +func (o *IpamIPAddressesListOKBody) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -201,8 +205,8 @@ func (o *IPAMIPAddressesListOKBody) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *IPAMIPAddressesListOKBody) UnmarshalBinary(b []byte) error { - var res IPAMIPAddressesListOKBody +func (o *IpamIPAddressesListOKBody) UnmarshalBinary(b []byte) error { + var res IpamIPAddressesListOKBody if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/netbox/client/ipam/ip_a_m_ip_addresses_partial_update_parameters.go b/netbox/client/ipam/ipam_ip_addresses_partial_update_parameters.go similarity index 61% rename from netbox/client/ipam/ip_a_m_ip_addresses_partial_update_parameters.go rename to netbox/client/ipam/ipam_ip_addresses_partial_update_parameters.go index cac3bf4943811ab0e65e02b341fe4bd04a60073d..21c3523205fccdc4c2e12a3dbcf336606c5102ae 100644 --- a/netbox/client/ipam/ip_a_m_ip_addresses_partial_update_parameters.go +++ b/netbox/client/ipam/ipam_ip_addresses_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMIPAddressesPartialUpdateParams creates a new IPAMIPAddressesPartialUpdateParams object +// NewIpamIPAddressesPartialUpdateParams creates a new IpamIPAddressesPartialUpdateParams object // with the default values initialized. -func NewIPAMIPAddressesPartialUpdateParams() *IPAMIPAddressesPartialUpdateParams { +func NewIpamIPAddressesPartialUpdateParams() *IpamIPAddressesPartialUpdateParams { var () - return &IPAMIPAddressesPartialUpdateParams{ + return &IpamIPAddressesPartialUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMIPAddressesPartialUpdateParamsWithTimeout creates a new IPAMIPAddressesPartialUpdateParams object +// NewIpamIPAddressesPartialUpdateParamsWithTimeout creates a new IpamIPAddressesPartialUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMIPAddressesPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMIPAddressesPartialUpdateParams { +func NewIpamIPAddressesPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamIPAddressesPartialUpdateParams { var () - return &IPAMIPAddressesPartialUpdateParams{ + return &IpamIPAddressesPartialUpdateParams{ timeout: timeout, } } -// NewIPAMIPAddressesPartialUpdateParamsWithContext creates a new IPAMIPAddressesPartialUpdateParams object +// NewIpamIPAddressesPartialUpdateParamsWithContext creates a new IpamIPAddressesPartialUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMIPAddressesPartialUpdateParamsWithContext(ctx context.Context) *IPAMIPAddressesPartialUpdateParams { +func NewIpamIPAddressesPartialUpdateParamsWithContext(ctx context.Context) *IpamIPAddressesPartialUpdateParams { var () - return &IPAMIPAddressesPartialUpdateParams{ + return &IpamIPAddressesPartialUpdateParams{ Context: ctx, } } -// NewIPAMIPAddressesPartialUpdateParamsWithHTTPClient creates a new IPAMIPAddressesPartialUpdateParams object +// NewIpamIPAddressesPartialUpdateParamsWithHTTPClient creates a new IpamIPAddressesPartialUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMIPAddressesPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMIPAddressesPartialUpdateParams { +func NewIpamIPAddressesPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamIPAddressesPartialUpdateParams { var () - return &IPAMIPAddressesPartialUpdateParams{ + return &IpamIPAddressesPartialUpdateParams{ HTTPClient: client, } } -/*IPAMIPAddressesPartialUpdateParams contains all the parameters to send to the API endpoint +/*IpamIPAddressesPartialUpdateParams contains all the parameters to send to the API endpoint for the ipam ip addresses partial update operation typically these are written to a http.Request */ -type IPAMIPAddressesPartialUpdateParams struct { +type IpamIPAddressesPartialUpdateParams struct { /*Data*/ Data *models.WritableIPAddress @@ -92,62 +93,62 @@ type IPAMIPAddressesPartialUpdateParams struct { } // WithTimeout adds the timeout to the ipam ip addresses partial update params -func (o *IPAMIPAddressesPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMIPAddressesPartialUpdateParams { +func (o *IpamIPAddressesPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamIPAddressesPartialUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam ip addresses partial update params -func (o *IPAMIPAddressesPartialUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamIPAddressesPartialUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam ip addresses partial update params -func (o *IPAMIPAddressesPartialUpdateParams) WithContext(ctx context.Context) *IPAMIPAddressesPartialUpdateParams { +func (o *IpamIPAddressesPartialUpdateParams) WithContext(ctx context.Context) *IpamIPAddressesPartialUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam ip addresses partial update params -func (o *IPAMIPAddressesPartialUpdateParams) SetContext(ctx context.Context) { +func (o *IpamIPAddressesPartialUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam ip addresses partial update params -func (o *IPAMIPAddressesPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMIPAddressesPartialUpdateParams { +func (o *IpamIPAddressesPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamIPAddressesPartialUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam ip addresses partial update params -func (o *IPAMIPAddressesPartialUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamIPAddressesPartialUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam ip addresses partial update params -func (o *IPAMIPAddressesPartialUpdateParams) WithData(data *models.WritableIPAddress) *IPAMIPAddressesPartialUpdateParams { +func (o *IpamIPAddressesPartialUpdateParams) WithData(data *models.WritableIPAddress) *IpamIPAddressesPartialUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam ip addresses partial update params -func (o *IPAMIPAddressesPartialUpdateParams) SetData(data *models.WritableIPAddress) { +func (o *IpamIPAddressesPartialUpdateParams) SetData(data *models.WritableIPAddress) { o.Data = data } // WithID adds the id to the ipam ip addresses partial update params -func (o *IPAMIPAddressesPartialUpdateParams) WithID(id int64) *IPAMIPAddressesPartialUpdateParams { +func (o *IpamIPAddressesPartialUpdateParams) WithID(id int64) *IpamIPAddressesPartialUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam ip addresses partial update params -func (o *IPAMIPAddressesPartialUpdateParams) SetID(id int64) { +func (o *IpamIPAddressesPartialUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMIPAddressesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamIPAddressesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_ip_addresses_partial_update_responses.go b/netbox/client/ipam/ipam_ip_addresses_partial_update_responses.go similarity index 68% rename from netbox/client/ipam/ip_a_m_ip_addresses_partial_update_responses.go rename to netbox/client/ipam/ipam_ip_addresses_partial_update_responses.go index 0bf446735a7d8aa2bb561b7c80b929c15a635500..26a56cc2d7058a63f96e1662350fcbabd79e6fd8 100644 --- a/netbox/client/ipam/ip_a_m_ip_addresses_partial_update_responses.go +++ b/netbox/client/ipam/ipam_ip_addresses_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMIPAddressesPartialUpdateReader is a Reader for the IPAMIPAddressesPartialUpdate structure. -type IPAMIPAddressesPartialUpdateReader struct { +// IpamIPAddressesPartialUpdateReader is a Reader for the IpamIPAddressesPartialUpdate structure. +type IpamIPAddressesPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMIPAddressesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPAddressesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMIPAddressesPartialUpdateOK() + result := NewIpamIPAddressesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMIPAddressesPartialUpdateReader) ReadResponse(response runtime.Clien } } -// NewIPAMIPAddressesPartialUpdateOK creates a IPAMIPAddressesPartialUpdateOK with default headers values -func NewIPAMIPAddressesPartialUpdateOK() *IPAMIPAddressesPartialUpdateOK { - return &IPAMIPAddressesPartialUpdateOK{} +// NewIpamIPAddressesPartialUpdateOK creates a IpamIPAddressesPartialUpdateOK with default headers values +func NewIpamIPAddressesPartialUpdateOK() *IpamIPAddressesPartialUpdateOK { + return &IpamIPAddressesPartialUpdateOK{} } -/*IPAMIPAddressesPartialUpdateOK handles this case with default header values. +/*IpamIPAddressesPartialUpdateOK handles this case with default header values. -IPAMIPAddressesPartialUpdateOK ipam Ip addresses partial update o k +IpamIPAddressesPartialUpdateOK ipam Ip addresses partial update o k */ -type IPAMIPAddressesPartialUpdateOK struct { +type IpamIPAddressesPartialUpdateOK struct { Payload *models.IPAddress } -func (o *IPAMIPAddressesPartialUpdateOK) Error() string { +func (o *IpamIPAddressesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /ipam/ip-addresses/{id}/][%d] ipamIpAddressesPartialUpdateOK %+v", 200, o.Payload) } -func (o *IPAMIPAddressesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPAddressesPartialUpdateOK) GetPayload() *models.IPAddress { + return o.Payload +} + +func (o *IpamIPAddressesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.IPAddress) diff --git a/netbox/client/ipam/ip_a_m_ip_addresses_read_parameters.go b/netbox/client/ipam/ipam_ip_addresses_read_parameters.go similarity index 66% rename from netbox/client/ipam/ip_a_m_ip_addresses_read_parameters.go rename to netbox/client/ipam/ipam_ip_addresses_read_parameters.go index 62374c2177d9c0a022f1659b5251356e4e1b4387..1697af0ef2f70fc4fe294a8badc64973155fb781 100644 --- a/netbox/client/ipam/ip_a_m_ip_addresses_read_parameters.go +++ b/netbox/client/ipam/ipam_ip_addresses_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMIPAddressesReadParams creates a new IPAMIPAddressesReadParams object +// NewIpamIPAddressesReadParams creates a new IpamIPAddressesReadParams object // with the default values initialized. -func NewIPAMIPAddressesReadParams() *IPAMIPAddressesReadParams { +func NewIpamIPAddressesReadParams() *IpamIPAddressesReadParams { var () - return &IPAMIPAddressesReadParams{ + return &IpamIPAddressesReadParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMIPAddressesReadParamsWithTimeout creates a new IPAMIPAddressesReadParams object +// NewIpamIPAddressesReadParamsWithTimeout creates a new IpamIPAddressesReadParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMIPAddressesReadParamsWithTimeout(timeout time.Duration) *IPAMIPAddressesReadParams { +func NewIpamIPAddressesReadParamsWithTimeout(timeout time.Duration) *IpamIPAddressesReadParams { var () - return &IPAMIPAddressesReadParams{ + return &IpamIPAddressesReadParams{ timeout: timeout, } } -// NewIPAMIPAddressesReadParamsWithContext creates a new IPAMIPAddressesReadParams object +// NewIpamIPAddressesReadParamsWithContext creates a new IpamIPAddressesReadParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMIPAddressesReadParamsWithContext(ctx context.Context) *IPAMIPAddressesReadParams { +func NewIpamIPAddressesReadParamsWithContext(ctx context.Context) *IpamIPAddressesReadParams { var () - return &IPAMIPAddressesReadParams{ + return &IpamIPAddressesReadParams{ Context: ctx, } } -// NewIPAMIPAddressesReadParamsWithHTTPClient creates a new IPAMIPAddressesReadParams object +// NewIpamIPAddressesReadParamsWithHTTPClient creates a new IpamIPAddressesReadParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMIPAddressesReadParamsWithHTTPClient(client *http.Client) *IPAMIPAddressesReadParams { +func NewIpamIPAddressesReadParamsWithHTTPClient(client *http.Client) *IpamIPAddressesReadParams { var () - return &IPAMIPAddressesReadParams{ + return &IpamIPAddressesReadParams{ HTTPClient: client, } } -/*IPAMIPAddressesReadParams contains all the parameters to send to the API endpoint +/*IpamIPAddressesReadParams contains all the parameters to send to the API endpoint for the ipam ip addresses read operation typically these are written to a http.Request */ -type IPAMIPAddressesReadParams struct { +type IpamIPAddressesReadParams struct { /*ID A unique integer value identifying this IP address. @@ -88,51 +89,51 @@ type IPAMIPAddressesReadParams struct { } // WithTimeout adds the timeout to the ipam ip addresses read params -func (o *IPAMIPAddressesReadParams) WithTimeout(timeout time.Duration) *IPAMIPAddressesReadParams { +func (o *IpamIPAddressesReadParams) WithTimeout(timeout time.Duration) *IpamIPAddressesReadParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam ip addresses read params -func (o *IPAMIPAddressesReadParams) SetTimeout(timeout time.Duration) { +func (o *IpamIPAddressesReadParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam ip addresses read params -func (o *IPAMIPAddressesReadParams) WithContext(ctx context.Context) *IPAMIPAddressesReadParams { +func (o *IpamIPAddressesReadParams) WithContext(ctx context.Context) *IpamIPAddressesReadParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam ip addresses read params -func (o *IPAMIPAddressesReadParams) SetContext(ctx context.Context) { +func (o *IpamIPAddressesReadParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam ip addresses read params -func (o *IPAMIPAddressesReadParams) WithHTTPClient(client *http.Client) *IPAMIPAddressesReadParams { +func (o *IpamIPAddressesReadParams) WithHTTPClient(client *http.Client) *IpamIPAddressesReadParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam ip addresses read params -func (o *IPAMIPAddressesReadParams) SetHTTPClient(client *http.Client) { +func (o *IpamIPAddressesReadParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam ip addresses read params -func (o *IPAMIPAddressesReadParams) WithID(id int64) *IPAMIPAddressesReadParams { +func (o *IpamIPAddressesReadParams) WithID(id int64) *IpamIPAddressesReadParams { o.SetID(id) return o } // SetID adds the id to the ipam ip addresses read params -func (o *IPAMIPAddressesReadParams) SetID(id int64) { +func (o *IpamIPAddressesReadParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMIPAddressesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamIPAddressesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_ip_addresses_read_responses.go b/netbox/client/ipam/ipam_ip_addresses_read_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_ip_addresses_read_responses.go rename to netbox/client/ipam/ipam_ip_addresses_read_responses.go index 7b41addc1bc1ef65bf8f1c02f14b7d16a246e15b..31dd621b83be87e993933aeac5ea0a6a29852711 100644 --- a/netbox/client/ipam/ip_a_m_ip_addresses_read_responses.go +++ b/netbox/client/ipam/ipam_ip_addresses_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMIPAddressesReadReader is a Reader for the IPAMIPAddressesRead structure. -type IPAMIPAddressesReadReader struct { +// IpamIPAddressesReadReader is a Reader for the IpamIPAddressesRead structure. +type IpamIPAddressesReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMIPAddressesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPAddressesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMIPAddressesReadOK() + result := NewIpamIPAddressesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMIPAddressesReadReader) ReadResponse(response runtime.ClientResponse } } -// NewIPAMIPAddressesReadOK creates a IPAMIPAddressesReadOK with default headers values -func NewIPAMIPAddressesReadOK() *IPAMIPAddressesReadOK { - return &IPAMIPAddressesReadOK{} +// NewIpamIPAddressesReadOK creates a IpamIPAddressesReadOK with default headers values +func NewIpamIPAddressesReadOK() *IpamIPAddressesReadOK { + return &IpamIPAddressesReadOK{} } -/*IPAMIPAddressesReadOK handles this case with default header values. +/*IpamIPAddressesReadOK handles this case with default header values. -IPAMIPAddressesReadOK ipam Ip addresses read o k +IpamIPAddressesReadOK ipam Ip addresses read o k */ -type IPAMIPAddressesReadOK struct { +type IpamIPAddressesReadOK struct { Payload *models.IPAddress } -func (o *IPAMIPAddressesReadOK) Error() string { +func (o *IpamIPAddressesReadOK) Error() string { return fmt.Sprintf("[GET /ipam/ip-addresses/{id}/][%d] ipamIpAddressesReadOK %+v", 200, o.Payload) } -func (o *IPAMIPAddressesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPAddressesReadOK) GetPayload() *models.IPAddress { + return o.Payload +} + +func (o *IpamIPAddressesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.IPAddress) diff --git a/netbox/client/ipam/ip_a_m_ip_addresses_update_parameters.go b/netbox/client/ipam/ipam_ip_addresses_update_parameters.go similarity index 64% rename from netbox/client/ipam/ip_a_m_ip_addresses_update_parameters.go rename to netbox/client/ipam/ipam_ip_addresses_update_parameters.go index 21168b44722f2b4beb79e08c1e678932f65f99fe..5714989d58d8273ada26ef650065b1aebe5d6ef4 100644 --- a/netbox/client/ipam/ip_a_m_ip_addresses_update_parameters.go +++ b/netbox/client/ipam/ipam_ip_addresses_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMIPAddressesUpdateParams creates a new IPAMIPAddressesUpdateParams object +// NewIpamIPAddressesUpdateParams creates a new IpamIPAddressesUpdateParams object // with the default values initialized. -func NewIPAMIPAddressesUpdateParams() *IPAMIPAddressesUpdateParams { +func NewIpamIPAddressesUpdateParams() *IpamIPAddressesUpdateParams { var () - return &IPAMIPAddressesUpdateParams{ + return &IpamIPAddressesUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMIPAddressesUpdateParamsWithTimeout creates a new IPAMIPAddressesUpdateParams object +// NewIpamIPAddressesUpdateParamsWithTimeout creates a new IpamIPAddressesUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMIPAddressesUpdateParamsWithTimeout(timeout time.Duration) *IPAMIPAddressesUpdateParams { +func NewIpamIPAddressesUpdateParamsWithTimeout(timeout time.Duration) *IpamIPAddressesUpdateParams { var () - return &IPAMIPAddressesUpdateParams{ + return &IpamIPAddressesUpdateParams{ timeout: timeout, } } -// NewIPAMIPAddressesUpdateParamsWithContext creates a new IPAMIPAddressesUpdateParams object +// NewIpamIPAddressesUpdateParamsWithContext creates a new IpamIPAddressesUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMIPAddressesUpdateParamsWithContext(ctx context.Context) *IPAMIPAddressesUpdateParams { +func NewIpamIPAddressesUpdateParamsWithContext(ctx context.Context) *IpamIPAddressesUpdateParams { var () - return &IPAMIPAddressesUpdateParams{ + return &IpamIPAddressesUpdateParams{ Context: ctx, } } -// NewIPAMIPAddressesUpdateParamsWithHTTPClient creates a new IPAMIPAddressesUpdateParams object +// NewIpamIPAddressesUpdateParamsWithHTTPClient creates a new IpamIPAddressesUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMIPAddressesUpdateParamsWithHTTPClient(client *http.Client) *IPAMIPAddressesUpdateParams { +func NewIpamIPAddressesUpdateParamsWithHTTPClient(client *http.Client) *IpamIPAddressesUpdateParams { var () - return &IPAMIPAddressesUpdateParams{ + return &IpamIPAddressesUpdateParams{ HTTPClient: client, } } -/*IPAMIPAddressesUpdateParams contains all the parameters to send to the API endpoint +/*IpamIPAddressesUpdateParams contains all the parameters to send to the API endpoint for the ipam ip addresses update operation typically these are written to a http.Request */ -type IPAMIPAddressesUpdateParams struct { +type IpamIPAddressesUpdateParams struct { /*Data*/ Data *models.WritableIPAddress @@ -92,62 +93,62 @@ type IPAMIPAddressesUpdateParams struct { } // WithTimeout adds the timeout to the ipam ip addresses update params -func (o *IPAMIPAddressesUpdateParams) WithTimeout(timeout time.Duration) *IPAMIPAddressesUpdateParams { +func (o *IpamIPAddressesUpdateParams) WithTimeout(timeout time.Duration) *IpamIPAddressesUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam ip addresses update params -func (o *IPAMIPAddressesUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamIPAddressesUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam ip addresses update params -func (o *IPAMIPAddressesUpdateParams) WithContext(ctx context.Context) *IPAMIPAddressesUpdateParams { +func (o *IpamIPAddressesUpdateParams) WithContext(ctx context.Context) *IpamIPAddressesUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam ip addresses update params -func (o *IPAMIPAddressesUpdateParams) SetContext(ctx context.Context) { +func (o *IpamIPAddressesUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam ip addresses update params -func (o *IPAMIPAddressesUpdateParams) WithHTTPClient(client *http.Client) *IPAMIPAddressesUpdateParams { +func (o *IpamIPAddressesUpdateParams) WithHTTPClient(client *http.Client) *IpamIPAddressesUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam ip addresses update params -func (o *IPAMIPAddressesUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamIPAddressesUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam ip addresses update params -func (o *IPAMIPAddressesUpdateParams) WithData(data *models.WritableIPAddress) *IPAMIPAddressesUpdateParams { +func (o *IpamIPAddressesUpdateParams) WithData(data *models.WritableIPAddress) *IpamIPAddressesUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam ip addresses update params -func (o *IPAMIPAddressesUpdateParams) SetData(data *models.WritableIPAddress) { +func (o *IpamIPAddressesUpdateParams) SetData(data *models.WritableIPAddress) { o.Data = data } // WithID adds the id to the ipam ip addresses update params -func (o *IPAMIPAddressesUpdateParams) WithID(id int64) *IPAMIPAddressesUpdateParams { +func (o *IpamIPAddressesUpdateParams) WithID(id int64) *IpamIPAddressesUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam ip addresses update params -func (o *IPAMIPAddressesUpdateParams) SetID(id int64) { +func (o *IpamIPAddressesUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMIPAddressesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamIPAddressesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_ip_addresses_update_responses.go b/netbox/client/ipam/ipam_ip_addresses_update_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_ip_addresses_update_responses.go rename to netbox/client/ipam/ipam_ip_addresses_update_responses.go index 7685ef5041e408099153bb0d58caa14ab663c0ee..d1b9cdb349d61f4d9eeb94b84016f31563fe2c3a 100644 --- a/netbox/client/ipam/ip_a_m_ip_addresses_update_responses.go +++ b/netbox/client/ipam/ipam_ip_addresses_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMIPAddressesUpdateReader is a Reader for the IPAMIPAddressesUpdate structure. -type IPAMIPAddressesUpdateReader struct { +// IpamIPAddressesUpdateReader is a Reader for the IpamIPAddressesUpdate structure. +type IpamIPAddressesUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMIPAddressesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPAddressesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMIPAddressesUpdateOK() + result := NewIpamIPAddressesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMIPAddressesUpdateReader) ReadResponse(response runtime.ClientRespon } } -// NewIPAMIPAddressesUpdateOK creates a IPAMIPAddressesUpdateOK with default headers values -func NewIPAMIPAddressesUpdateOK() *IPAMIPAddressesUpdateOK { - return &IPAMIPAddressesUpdateOK{} +// NewIpamIPAddressesUpdateOK creates a IpamIPAddressesUpdateOK with default headers values +func NewIpamIPAddressesUpdateOK() *IpamIPAddressesUpdateOK { + return &IpamIPAddressesUpdateOK{} } -/*IPAMIPAddressesUpdateOK handles this case with default header values. +/*IpamIPAddressesUpdateOK handles this case with default header values. -IPAMIPAddressesUpdateOK ipam Ip addresses update o k +IpamIPAddressesUpdateOK ipam Ip addresses update o k */ -type IPAMIPAddressesUpdateOK struct { +type IpamIPAddressesUpdateOK struct { Payload *models.IPAddress } -func (o *IPAMIPAddressesUpdateOK) Error() string { +func (o *IpamIPAddressesUpdateOK) Error() string { return fmt.Sprintf("[PUT /ipam/ip-addresses/{id}/][%d] ipamIpAddressesUpdateOK %+v", 200, o.Payload) } -func (o *IPAMIPAddressesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPAddressesUpdateOK) GetPayload() *models.IPAddress { + return o.Payload +} + +func (o *IpamIPAddressesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.IPAddress) diff --git a/netbox/client/ipam/ip_a_m_prefixes_available_ips_create_parameters.go b/netbox/client/ipam/ipam_prefixes_available_ips_create_parameters.go similarity index 61% rename from netbox/client/ipam/ip_a_m_prefixes_available_ips_create_parameters.go rename to netbox/client/ipam/ipam_prefixes_available_ips_create_parameters.go index 9998d4df08c57c903d1708d8e7e228f5e66734c8..9859c30f1832318afcb7c8584ab4421c36a7ad9c 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_available_ips_create_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_available_ips_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMPrefixesAvailableIpsCreateParams creates a new IPAMPrefixesAvailableIpsCreateParams object +// NewIpamPrefixesAvailableIpsCreateParams creates a new IpamPrefixesAvailableIpsCreateParams object // with the default values initialized. -func NewIPAMPrefixesAvailableIpsCreateParams() *IPAMPrefixesAvailableIpsCreateParams { +func NewIpamPrefixesAvailableIpsCreateParams() *IpamPrefixesAvailableIpsCreateParams { var () - return &IPAMPrefixesAvailableIpsCreateParams{ + return &IpamPrefixesAvailableIpsCreateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMPrefixesAvailableIpsCreateParamsWithTimeout creates a new IPAMPrefixesAvailableIpsCreateParams object +// NewIpamPrefixesAvailableIpsCreateParamsWithTimeout creates a new IpamPrefixesAvailableIpsCreateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMPrefixesAvailableIpsCreateParamsWithTimeout(timeout time.Duration) *IPAMPrefixesAvailableIpsCreateParams { +func NewIpamPrefixesAvailableIpsCreateParamsWithTimeout(timeout time.Duration) *IpamPrefixesAvailableIpsCreateParams { var () - return &IPAMPrefixesAvailableIpsCreateParams{ + return &IpamPrefixesAvailableIpsCreateParams{ timeout: timeout, } } -// NewIPAMPrefixesAvailableIpsCreateParamsWithContext creates a new IPAMPrefixesAvailableIpsCreateParams object +// NewIpamPrefixesAvailableIpsCreateParamsWithContext creates a new IpamPrefixesAvailableIpsCreateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMPrefixesAvailableIpsCreateParamsWithContext(ctx context.Context) *IPAMPrefixesAvailableIpsCreateParams { +func NewIpamPrefixesAvailableIpsCreateParamsWithContext(ctx context.Context) *IpamPrefixesAvailableIpsCreateParams { var () - return &IPAMPrefixesAvailableIpsCreateParams{ + return &IpamPrefixesAvailableIpsCreateParams{ Context: ctx, } } -// NewIPAMPrefixesAvailableIpsCreateParamsWithHTTPClient creates a new IPAMPrefixesAvailableIpsCreateParams object +// NewIpamPrefixesAvailableIpsCreateParamsWithHTTPClient creates a new IpamPrefixesAvailableIpsCreateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMPrefixesAvailableIpsCreateParamsWithHTTPClient(client *http.Client) *IPAMPrefixesAvailableIpsCreateParams { +func NewIpamPrefixesAvailableIpsCreateParamsWithHTTPClient(client *http.Client) *IpamPrefixesAvailableIpsCreateParams { var () - return &IPAMPrefixesAvailableIpsCreateParams{ + return &IpamPrefixesAvailableIpsCreateParams{ HTTPClient: client, } } -/*IPAMPrefixesAvailableIpsCreateParams contains all the parameters to send to the API endpoint +/*IpamPrefixesAvailableIpsCreateParams contains all the parameters to send to the API endpoint for the ipam prefixes available ips create operation typically these are written to a http.Request */ -type IPAMPrefixesAvailableIpsCreateParams struct { +type IpamPrefixesAvailableIpsCreateParams struct { /*Data*/ Data *models.WritablePrefix @@ -92,62 +93,62 @@ type IPAMPrefixesAvailableIpsCreateParams struct { } // WithTimeout adds the timeout to the ipam prefixes available ips create params -func (o *IPAMPrefixesAvailableIpsCreateParams) WithTimeout(timeout time.Duration) *IPAMPrefixesAvailableIpsCreateParams { +func (o *IpamPrefixesAvailableIpsCreateParams) WithTimeout(timeout time.Duration) *IpamPrefixesAvailableIpsCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam prefixes available ips create params -func (o *IPAMPrefixesAvailableIpsCreateParams) SetTimeout(timeout time.Duration) { +func (o *IpamPrefixesAvailableIpsCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam prefixes available ips create params -func (o *IPAMPrefixesAvailableIpsCreateParams) WithContext(ctx context.Context) *IPAMPrefixesAvailableIpsCreateParams { +func (o *IpamPrefixesAvailableIpsCreateParams) WithContext(ctx context.Context) *IpamPrefixesAvailableIpsCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam prefixes available ips create params -func (o *IPAMPrefixesAvailableIpsCreateParams) SetContext(ctx context.Context) { +func (o *IpamPrefixesAvailableIpsCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam prefixes available ips create params -func (o *IPAMPrefixesAvailableIpsCreateParams) WithHTTPClient(client *http.Client) *IPAMPrefixesAvailableIpsCreateParams { +func (o *IpamPrefixesAvailableIpsCreateParams) WithHTTPClient(client *http.Client) *IpamPrefixesAvailableIpsCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam prefixes available ips create params -func (o *IPAMPrefixesAvailableIpsCreateParams) SetHTTPClient(client *http.Client) { +func (o *IpamPrefixesAvailableIpsCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam prefixes available ips create params -func (o *IPAMPrefixesAvailableIpsCreateParams) WithData(data *models.WritablePrefix) *IPAMPrefixesAvailableIpsCreateParams { +func (o *IpamPrefixesAvailableIpsCreateParams) WithData(data *models.WritablePrefix) *IpamPrefixesAvailableIpsCreateParams { o.SetData(data) return o } // SetData adds the data to the ipam prefixes available ips create params -func (o *IPAMPrefixesAvailableIpsCreateParams) SetData(data *models.WritablePrefix) { +func (o *IpamPrefixesAvailableIpsCreateParams) SetData(data *models.WritablePrefix) { o.Data = data } // WithID adds the id to the ipam prefixes available ips create params -func (o *IPAMPrefixesAvailableIpsCreateParams) WithID(id int64) *IPAMPrefixesAvailableIpsCreateParams { +func (o *IpamPrefixesAvailableIpsCreateParams) WithID(id int64) *IpamPrefixesAvailableIpsCreateParams { o.SetID(id) return o } // SetID adds the id to the ipam prefixes available ips create params -func (o *IPAMPrefixesAvailableIpsCreateParams) SetID(id int64) { +func (o *IpamPrefixesAvailableIpsCreateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMPrefixesAvailableIpsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamPrefixesAvailableIpsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_prefixes_available_ips_create_responses.go b/netbox/client/ipam/ipam_prefixes_available_ips_create_responses.go similarity index 68% rename from netbox/client/ipam/ip_a_m_prefixes_available_ips_create_responses.go rename to netbox/client/ipam/ipam_prefixes_available_ips_create_responses.go index 70c7c2644ac60a3f5b148a5b6955f2fc72e243e5..168cdc22422bcb93fc0fd937156a8439c9256758 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_available_ips_create_responses.go +++ b/netbox/client/ipam/ipam_prefixes_available_ips_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMPrefixesAvailableIpsCreateReader is a Reader for the IPAMPrefixesAvailableIpsCreate structure. -type IPAMPrefixesAvailableIpsCreateReader struct { +// IpamPrefixesAvailableIpsCreateReader is a Reader for the IpamPrefixesAvailableIpsCreate structure. +type IpamPrefixesAvailableIpsCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMPrefixesAvailableIpsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamPrefixesAvailableIpsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: - result := NewIPAMPrefixesAvailableIpsCreateCreated() + result := NewIpamPrefixesAvailableIpsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMPrefixesAvailableIpsCreateReader) ReadResponse(response runtime.Cli } } -// NewIPAMPrefixesAvailableIpsCreateCreated creates a IPAMPrefixesAvailableIpsCreateCreated with default headers values -func NewIPAMPrefixesAvailableIpsCreateCreated() *IPAMPrefixesAvailableIpsCreateCreated { - return &IPAMPrefixesAvailableIpsCreateCreated{} +// NewIpamPrefixesAvailableIpsCreateCreated creates a IpamPrefixesAvailableIpsCreateCreated with default headers values +func NewIpamPrefixesAvailableIpsCreateCreated() *IpamPrefixesAvailableIpsCreateCreated { + return &IpamPrefixesAvailableIpsCreateCreated{} } -/*IPAMPrefixesAvailableIpsCreateCreated handles this case with default header values. +/*IpamPrefixesAvailableIpsCreateCreated handles this case with default header values. -IPAMPrefixesAvailableIpsCreateCreated ipam prefixes available ips create created +IpamPrefixesAvailableIpsCreateCreated ipam prefixes available ips create created */ -type IPAMPrefixesAvailableIpsCreateCreated struct { +type IpamPrefixesAvailableIpsCreateCreated struct { Payload *models.Prefix } -func (o *IPAMPrefixesAvailableIpsCreateCreated) Error() string { +func (o *IpamPrefixesAvailableIpsCreateCreated) Error() string { return fmt.Sprintf("[POST /ipam/prefixes/{id}/available-ips/][%d] ipamPrefixesAvailableIpsCreateCreated %+v", 201, o.Payload) } -func (o *IPAMPrefixesAvailableIpsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamPrefixesAvailableIpsCreateCreated) GetPayload() *models.Prefix { + return o.Payload +} + +func (o *IpamPrefixesAvailableIpsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Prefix) diff --git a/netbox/client/ipam/ip_a_m_prefixes_available_ips_read_parameters.go b/netbox/client/ipam/ipam_prefixes_available_ips_read_parameters.go similarity index 62% rename from netbox/client/ipam/ip_a_m_prefixes_available_ips_read_parameters.go rename to netbox/client/ipam/ipam_prefixes_available_ips_read_parameters.go index dddcfad0c75bba767687a76539bfa92313e9c9dd..192c41fc053492005c9137b992284c2abd9b6886 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_available_ips_read_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_available_ips_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMPrefixesAvailableIpsReadParams creates a new IPAMPrefixesAvailableIpsReadParams object +// NewIpamPrefixesAvailableIpsReadParams creates a new IpamPrefixesAvailableIpsReadParams object // with the default values initialized. -func NewIPAMPrefixesAvailableIpsReadParams() *IPAMPrefixesAvailableIpsReadParams { +func NewIpamPrefixesAvailableIpsReadParams() *IpamPrefixesAvailableIpsReadParams { var () - return &IPAMPrefixesAvailableIpsReadParams{ + return &IpamPrefixesAvailableIpsReadParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMPrefixesAvailableIpsReadParamsWithTimeout creates a new IPAMPrefixesAvailableIpsReadParams object +// NewIpamPrefixesAvailableIpsReadParamsWithTimeout creates a new IpamPrefixesAvailableIpsReadParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMPrefixesAvailableIpsReadParamsWithTimeout(timeout time.Duration) *IPAMPrefixesAvailableIpsReadParams { +func NewIpamPrefixesAvailableIpsReadParamsWithTimeout(timeout time.Duration) *IpamPrefixesAvailableIpsReadParams { var () - return &IPAMPrefixesAvailableIpsReadParams{ + return &IpamPrefixesAvailableIpsReadParams{ timeout: timeout, } } -// NewIPAMPrefixesAvailableIpsReadParamsWithContext creates a new IPAMPrefixesAvailableIpsReadParams object +// NewIpamPrefixesAvailableIpsReadParamsWithContext creates a new IpamPrefixesAvailableIpsReadParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMPrefixesAvailableIpsReadParamsWithContext(ctx context.Context) *IPAMPrefixesAvailableIpsReadParams { +func NewIpamPrefixesAvailableIpsReadParamsWithContext(ctx context.Context) *IpamPrefixesAvailableIpsReadParams { var () - return &IPAMPrefixesAvailableIpsReadParams{ + return &IpamPrefixesAvailableIpsReadParams{ Context: ctx, } } -// NewIPAMPrefixesAvailableIpsReadParamsWithHTTPClient creates a new IPAMPrefixesAvailableIpsReadParams object +// NewIpamPrefixesAvailableIpsReadParamsWithHTTPClient creates a new IpamPrefixesAvailableIpsReadParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMPrefixesAvailableIpsReadParamsWithHTTPClient(client *http.Client) *IPAMPrefixesAvailableIpsReadParams { +func NewIpamPrefixesAvailableIpsReadParamsWithHTTPClient(client *http.Client) *IpamPrefixesAvailableIpsReadParams { var () - return &IPAMPrefixesAvailableIpsReadParams{ + return &IpamPrefixesAvailableIpsReadParams{ HTTPClient: client, } } -/*IPAMPrefixesAvailableIpsReadParams contains all the parameters to send to the API endpoint +/*IpamPrefixesAvailableIpsReadParams contains all the parameters to send to the API endpoint for the ipam prefixes available ips read operation typically these are written to a http.Request */ -type IPAMPrefixesAvailableIpsReadParams struct { +type IpamPrefixesAvailableIpsReadParams struct { /*ID A unique integer value identifying this prefix. @@ -88,51 +89,51 @@ type IPAMPrefixesAvailableIpsReadParams struct { } // WithTimeout adds the timeout to the ipam prefixes available ips read params -func (o *IPAMPrefixesAvailableIpsReadParams) WithTimeout(timeout time.Duration) *IPAMPrefixesAvailableIpsReadParams { +func (o *IpamPrefixesAvailableIpsReadParams) WithTimeout(timeout time.Duration) *IpamPrefixesAvailableIpsReadParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam prefixes available ips read params -func (o *IPAMPrefixesAvailableIpsReadParams) SetTimeout(timeout time.Duration) { +func (o *IpamPrefixesAvailableIpsReadParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam prefixes available ips read params -func (o *IPAMPrefixesAvailableIpsReadParams) WithContext(ctx context.Context) *IPAMPrefixesAvailableIpsReadParams { +func (o *IpamPrefixesAvailableIpsReadParams) WithContext(ctx context.Context) *IpamPrefixesAvailableIpsReadParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam prefixes available ips read params -func (o *IPAMPrefixesAvailableIpsReadParams) SetContext(ctx context.Context) { +func (o *IpamPrefixesAvailableIpsReadParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam prefixes available ips read params -func (o *IPAMPrefixesAvailableIpsReadParams) WithHTTPClient(client *http.Client) *IPAMPrefixesAvailableIpsReadParams { +func (o *IpamPrefixesAvailableIpsReadParams) WithHTTPClient(client *http.Client) *IpamPrefixesAvailableIpsReadParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam prefixes available ips read params -func (o *IPAMPrefixesAvailableIpsReadParams) SetHTTPClient(client *http.Client) { +func (o *IpamPrefixesAvailableIpsReadParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam prefixes available ips read params -func (o *IPAMPrefixesAvailableIpsReadParams) WithID(id int64) *IPAMPrefixesAvailableIpsReadParams { +func (o *IpamPrefixesAvailableIpsReadParams) WithID(id int64) *IpamPrefixesAvailableIpsReadParams { o.SetID(id) return o } // SetID adds the id to the ipam prefixes available ips read params -func (o *IPAMPrefixesAvailableIpsReadParams) SetID(id int64) { +func (o *IpamPrefixesAvailableIpsReadParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMPrefixesAvailableIpsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamPrefixesAvailableIpsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_prefixes_available_ips_read_responses.go b/netbox/client/ipam/ipam_prefixes_available_ips_read_responses.go similarity index 68% rename from netbox/client/ipam/ip_a_m_prefixes_available_ips_read_responses.go rename to netbox/client/ipam/ipam_prefixes_available_ips_read_responses.go index 57491339df958170a50b70d53985751a39a2f0cc..9802daea773073390f40dd7c28d6c847907eb0fb 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_available_ips_read_responses.go +++ b/netbox/client/ipam/ipam_prefixes_available_ips_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMPrefixesAvailableIpsReadReader is a Reader for the IPAMPrefixesAvailableIpsRead structure. -type IPAMPrefixesAvailableIpsReadReader struct { +// IpamPrefixesAvailableIpsReadReader is a Reader for the IpamPrefixesAvailableIpsRead structure. +type IpamPrefixesAvailableIpsReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMPrefixesAvailableIpsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamPrefixesAvailableIpsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMPrefixesAvailableIpsReadOK() + result := NewIpamPrefixesAvailableIpsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMPrefixesAvailableIpsReadReader) ReadResponse(response runtime.Clien } } -// NewIPAMPrefixesAvailableIpsReadOK creates a IPAMPrefixesAvailableIpsReadOK with default headers values -func NewIPAMPrefixesAvailableIpsReadOK() *IPAMPrefixesAvailableIpsReadOK { - return &IPAMPrefixesAvailableIpsReadOK{} +// NewIpamPrefixesAvailableIpsReadOK creates a IpamPrefixesAvailableIpsReadOK with default headers values +func NewIpamPrefixesAvailableIpsReadOK() *IpamPrefixesAvailableIpsReadOK { + return &IpamPrefixesAvailableIpsReadOK{} } -/*IPAMPrefixesAvailableIpsReadOK handles this case with default header values. +/*IpamPrefixesAvailableIpsReadOK handles this case with default header values. -IPAMPrefixesAvailableIpsReadOK ipam prefixes available ips read o k +IpamPrefixesAvailableIpsReadOK ipam prefixes available ips read o k */ -type IPAMPrefixesAvailableIpsReadOK struct { +type IpamPrefixesAvailableIpsReadOK struct { Payload *models.Prefix } -func (o *IPAMPrefixesAvailableIpsReadOK) Error() string { +func (o *IpamPrefixesAvailableIpsReadOK) Error() string { return fmt.Sprintf("[GET /ipam/prefixes/{id}/available-ips/][%d] ipamPrefixesAvailableIpsReadOK %+v", 200, o.Payload) } -func (o *IPAMPrefixesAvailableIpsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamPrefixesAvailableIpsReadOK) GetPayload() *models.Prefix { + return o.Payload +} + +func (o *IpamPrefixesAvailableIpsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Prefix) diff --git a/netbox/client/ipam/ip_a_m_prefixes_available_prefixes_create_parameters.go b/netbox/client/ipam/ipam_prefixes_available_prefixes_create_parameters.go similarity index 60% rename from netbox/client/ipam/ip_a_m_prefixes_available_prefixes_create_parameters.go rename to netbox/client/ipam/ipam_prefixes_available_prefixes_create_parameters.go index 315a09bf8a230bdfffab947de9fa2b7ed8ce33a0..d82729ac21920413cca961a87729ef5206e3124b 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_available_prefixes_create_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_available_prefixes_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMPrefixesAvailablePrefixesCreateParams creates a new IPAMPrefixesAvailablePrefixesCreateParams object +// NewIpamPrefixesAvailablePrefixesCreateParams creates a new IpamPrefixesAvailablePrefixesCreateParams object // with the default values initialized. -func NewIPAMPrefixesAvailablePrefixesCreateParams() *IPAMPrefixesAvailablePrefixesCreateParams { +func NewIpamPrefixesAvailablePrefixesCreateParams() *IpamPrefixesAvailablePrefixesCreateParams { var () - return &IPAMPrefixesAvailablePrefixesCreateParams{ + return &IpamPrefixesAvailablePrefixesCreateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMPrefixesAvailablePrefixesCreateParamsWithTimeout creates a new IPAMPrefixesAvailablePrefixesCreateParams object +// NewIpamPrefixesAvailablePrefixesCreateParamsWithTimeout creates a new IpamPrefixesAvailablePrefixesCreateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMPrefixesAvailablePrefixesCreateParamsWithTimeout(timeout time.Duration) *IPAMPrefixesAvailablePrefixesCreateParams { +func NewIpamPrefixesAvailablePrefixesCreateParamsWithTimeout(timeout time.Duration) *IpamPrefixesAvailablePrefixesCreateParams { var () - return &IPAMPrefixesAvailablePrefixesCreateParams{ + return &IpamPrefixesAvailablePrefixesCreateParams{ timeout: timeout, } } -// NewIPAMPrefixesAvailablePrefixesCreateParamsWithContext creates a new IPAMPrefixesAvailablePrefixesCreateParams object +// NewIpamPrefixesAvailablePrefixesCreateParamsWithContext creates a new IpamPrefixesAvailablePrefixesCreateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMPrefixesAvailablePrefixesCreateParamsWithContext(ctx context.Context) *IPAMPrefixesAvailablePrefixesCreateParams { +func NewIpamPrefixesAvailablePrefixesCreateParamsWithContext(ctx context.Context) *IpamPrefixesAvailablePrefixesCreateParams { var () - return &IPAMPrefixesAvailablePrefixesCreateParams{ + return &IpamPrefixesAvailablePrefixesCreateParams{ Context: ctx, } } -// NewIPAMPrefixesAvailablePrefixesCreateParamsWithHTTPClient creates a new IPAMPrefixesAvailablePrefixesCreateParams object +// NewIpamPrefixesAvailablePrefixesCreateParamsWithHTTPClient creates a new IpamPrefixesAvailablePrefixesCreateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMPrefixesAvailablePrefixesCreateParamsWithHTTPClient(client *http.Client) *IPAMPrefixesAvailablePrefixesCreateParams { +func NewIpamPrefixesAvailablePrefixesCreateParamsWithHTTPClient(client *http.Client) *IpamPrefixesAvailablePrefixesCreateParams { var () - return &IPAMPrefixesAvailablePrefixesCreateParams{ + return &IpamPrefixesAvailablePrefixesCreateParams{ HTTPClient: client, } } -/*IPAMPrefixesAvailablePrefixesCreateParams contains all the parameters to send to the API endpoint +/*IpamPrefixesAvailablePrefixesCreateParams contains all the parameters to send to the API endpoint for the ipam prefixes available prefixes create operation typically these are written to a http.Request */ -type IPAMPrefixesAvailablePrefixesCreateParams struct { +type IpamPrefixesAvailablePrefixesCreateParams struct { /*Data*/ Data *models.WritablePrefix @@ -92,62 +93,62 @@ type IPAMPrefixesAvailablePrefixesCreateParams struct { } // WithTimeout adds the timeout to the ipam prefixes available prefixes create params -func (o *IPAMPrefixesAvailablePrefixesCreateParams) WithTimeout(timeout time.Duration) *IPAMPrefixesAvailablePrefixesCreateParams { +func (o *IpamPrefixesAvailablePrefixesCreateParams) WithTimeout(timeout time.Duration) *IpamPrefixesAvailablePrefixesCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam prefixes available prefixes create params -func (o *IPAMPrefixesAvailablePrefixesCreateParams) SetTimeout(timeout time.Duration) { +func (o *IpamPrefixesAvailablePrefixesCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam prefixes available prefixes create params -func (o *IPAMPrefixesAvailablePrefixesCreateParams) WithContext(ctx context.Context) *IPAMPrefixesAvailablePrefixesCreateParams { +func (o *IpamPrefixesAvailablePrefixesCreateParams) WithContext(ctx context.Context) *IpamPrefixesAvailablePrefixesCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam prefixes available prefixes create params -func (o *IPAMPrefixesAvailablePrefixesCreateParams) SetContext(ctx context.Context) { +func (o *IpamPrefixesAvailablePrefixesCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam prefixes available prefixes create params -func (o *IPAMPrefixesAvailablePrefixesCreateParams) WithHTTPClient(client *http.Client) *IPAMPrefixesAvailablePrefixesCreateParams { +func (o *IpamPrefixesAvailablePrefixesCreateParams) WithHTTPClient(client *http.Client) *IpamPrefixesAvailablePrefixesCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam prefixes available prefixes create params -func (o *IPAMPrefixesAvailablePrefixesCreateParams) SetHTTPClient(client *http.Client) { +func (o *IpamPrefixesAvailablePrefixesCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam prefixes available prefixes create params -func (o *IPAMPrefixesAvailablePrefixesCreateParams) WithData(data *models.WritablePrefix) *IPAMPrefixesAvailablePrefixesCreateParams { +func (o *IpamPrefixesAvailablePrefixesCreateParams) WithData(data *models.WritablePrefix) *IpamPrefixesAvailablePrefixesCreateParams { o.SetData(data) return o } // SetData adds the data to the ipam prefixes available prefixes create params -func (o *IPAMPrefixesAvailablePrefixesCreateParams) SetData(data *models.WritablePrefix) { +func (o *IpamPrefixesAvailablePrefixesCreateParams) SetData(data *models.WritablePrefix) { o.Data = data } // WithID adds the id to the ipam prefixes available prefixes create params -func (o *IPAMPrefixesAvailablePrefixesCreateParams) WithID(id int64) *IPAMPrefixesAvailablePrefixesCreateParams { +func (o *IpamPrefixesAvailablePrefixesCreateParams) WithID(id int64) *IpamPrefixesAvailablePrefixesCreateParams { o.SetID(id) return o } // SetID adds the id to the ipam prefixes available prefixes create params -func (o *IPAMPrefixesAvailablePrefixesCreateParams) SetID(id int64) { +func (o *IpamPrefixesAvailablePrefixesCreateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMPrefixesAvailablePrefixesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamPrefixesAvailablePrefixesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_prefixes_available_prefixes_create_responses.go b/netbox/client/ipam/ipam_prefixes_available_prefixes_create_responses.go similarity index 66% rename from netbox/client/ipam/ip_a_m_prefixes_available_prefixes_create_responses.go rename to netbox/client/ipam/ipam_prefixes_available_prefixes_create_responses.go index 859a36357924625276735f89b5b883d4281a0082..e5e85fc2a4454d2637fb30e5af99e17b2a958898 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_available_prefixes_create_responses.go +++ b/netbox/client/ipam/ipam_prefixes_available_prefixes_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMPrefixesAvailablePrefixesCreateReader is a Reader for the IPAMPrefixesAvailablePrefixesCreate structure. -type IPAMPrefixesAvailablePrefixesCreateReader struct { +// IpamPrefixesAvailablePrefixesCreateReader is a Reader for the IpamPrefixesAvailablePrefixesCreate structure. +type IpamPrefixesAvailablePrefixesCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMPrefixesAvailablePrefixesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamPrefixesAvailablePrefixesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: - result := NewIPAMPrefixesAvailablePrefixesCreateCreated() + result := NewIpamPrefixesAvailablePrefixesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMPrefixesAvailablePrefixesCreateReader) ReadResponse(response runtim } } -// NewIPAMPrefixesAvailablePrefixesCreateCreated creates a IPAMPrefixesAvailablePrefixesCreateCreated with default headers values -func NewIPAMPrefixesAvailablePrefixesCreateCreated() *IPAMPrefixesAvailablePrefixesCreateCreated { - return &IPAMPrefixesAvailablePrefixesCreateCreated{} +// NewIpamPrefixesAvailablePrefixesCreateCreated creates a IpamPrefixesAvailablePrefixesCreateCreated with default headers values +func NewIpamPrefixesAvailablePrefixesCreateCreated() *IpamPrefixesAvailablePrefixesCreateCreated { + return &IpamPrefixesAvailablePrefixesCreateCreated{} } -/*IPAMPrefixesAvailablePrefixesCreateCreated handles this case with default header values. +/*IpamPrefixesAvailablePrefixesCreateCreated handles this case with default header values. -IPAMPrefixesAvailablePrefixesCreateCreated ipam prefixes available prefixes create created +IpamPrefixesAvailablePrefixesCreateCreated ipam prefixes available prefixes create created */ -type IPAMPrefixesAvailablePrefixesCreateCreated struct { +type IpamPrefixesAvailablePrefixesCreateCreated struct { Payload *models.Prefix } -func (o *IPAMPrefixesAvailablePrefixesCreateCreated) Error() string { +func (o *IpamPrefixesAvailablePrefixesCreateCreated) Error() string { return fmt.Sprintf("[POST /ipam/prefixes/{id}/available-prefixes/][%d] ipamPrefixesAvailablePrefixesCreateCreated %+v", 201, o.Payload) } -func (o *IPAMPrefixesAvailablePrefixesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamPrefixesAvailablePrefixesCreateCreated) GetPayload() *models.Prefix { + return o.Payload +} + +func (o *IpamPrefixesAvailablePrefixesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Prefix) diff --git a/netbox/client/ipam/ip_a_m_prefixes_available_prefixes_read_parameters.go b/netbox/client/ipam/ipam_prefixes_available_prefixes_read_parameters.go similarity index 61% rename from netbox/client/ipam/ip_a_m_prefixes_available_prefixes_read_parameters.go rename to netbox/client/ipam/ipam_prefixes_available_prefixes_read_parameters.go index 80249eb30cc643400b4c1deebd3014925f68a9d8..9b175283534c397768a19ae48f373ff8b14b11f5 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_available_prefixes_read_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_available_prefixes_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMPrefixesAvailablePrefixesReadParams creates a new IPAMPrefixesAvailablePrefixesReadParams object +// NewIpamPrefixesAvailablePrefixesReadParams creates a new IpamPrefixesAvailablePrefixesReadParams object // with the default values initialized. -func NewIPAMPrefixesAvailablePrefixesReadParams() *IPAMPrefixesAvailablePrefixesReadParams { +func NewIpamPrefixesAvailablePrefixesReadParams() *IpamPrefixesAvailablePrefixesReadParams { var () - return &IPAMPrefixesAvailablePrefixesReadParams{ + return &IpamPrefixesAvailablePrefixesReadParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMPrefixesAvailablePrefixesReadParamsWithTimeout creates a new IPAMPrefixesAvailablePrefixesReadParams object +// NewIpamPrefixesAvailablePrefixesReadParamsWithTimeout creates a new IpamPrefixesAvailablePrefixesReadParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMPrefixesAvailablePrefixesReadParamsWithTimeout(timeout time.Duration) *IPAMPrefixesAvailablePrefixesReadParams { +func NewIpamPrefixesAvailablePrefixesReadParamsWithTimeout(timeout time.Duration) *IpamPrefixesAvailablePrefixesReadParams { var () - return &IPAMPrefixesAvailablePrefixesReadParams{ + return &IpamPrefixesAvailablePrefixesReadParams{ timeout: timeout, } } -// NewIPAMPrefixesAvailablePrefixesReadParamsWithContext creates a new IPAMPrefixesAvailablePrefixesReadParams object +// NewIpamPrefixesAvailablePrefixesReadParamsWithContext creates a new IpamPrefixesAvailablePrefixesReadParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMPrefixesAvailablePrefixesReadParamsWithContext(ctx context.Context) *IPAMPrefixesAvailablePrefixesReadParams { +func NewIpamPrefixesAvailablePrefixesReadParamsWithContext(ctx context.Context) *IpamPrefixesAvailablePrefixesReadParams { var () - return &IPAMPrefixesAvailablePrefixesReadParams{ + return &IpamPrefixesAvailablePrefixesReadParams{ Context: ctx, } } -// NewIPAMPrefixesAvailablePrefixesReadParamsWithHTTPClient creates a new IPAMPrefixesAvailablePrefixesReadParams object +// NewIpamPrefixesAvailablePrefixesReadParamsWithHTTPClient creates a new IpamPrefixesAvailablePrefixesReadParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMPrefixesAvailablePrefixesReadParamsWithHTTPClient(client *http.Client) *IPAMPrefixesAvailablePrefixesReadParams { +func NewIpamPrefixesAvailablePrefixesReadParamsWithHTTPClient(client *http.Client) *IpamPrefixesAvailablePrefixesReadParams { var () - return &IPAMPrefixesAvailablePrefixesReadParams{ + return &IpamPrefixesAvailablePrefixesReadParams{ HTTPClient: client, } } -/*IPAMPrefixesAvailablePrefixesReadParams contains all the parameters to send to the API endpoint +/*IpamPrefixesAvailablePrefixesReadParams contains all the parameters to send to the API endpoint for the ipam prefixes available prefixes read operation typically these are written to a http.Request */ -type IPAMPrefixesAvailablePrefixesReadParams struct { +type IpamPrefixesAvailablePrefixesReadParams struct { /*ID A unique integer value identifying this prefix. @@ -88,51 +89,51 @@ type IPAMPrefixesAvailablePrefixesReadParams struct { } // WithTimeout adds the timeout to the ipam prefixes available prefixes read params -func (o *IPAMPrefixesAvailablePrefixesReadParams) WithTimeout(timeout time.Duration) *IPAMPrefixesAvailablePrefixesReadParams { +func (o *IpamPrefixesAvailablePrefixesReadParams) WithTimeout(timeout time.Duration) *IpamPrefixesAvailablePrefixesReadParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam prefixes available prefixes read params -func (o *IPAMPrefixesAvailablePrefixesReadParams) SetTimeout(timeout time.Duration) { +func (o *IpamPrefixesAvailablePrefixesReadParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam prefixes available prefixes read params -func (o *IPAMPrefixesAvailablePrefixesReadParams) WithContext(ctx context.Context) *IPAMPrefixesAvailablePrefixesReadParams { +func (o *IpamPrefixesAvailablePrefixesReadParams) WithContext(ctx context.Context) *IpamPrefixesAvailablePrefixesReadParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam prefixes available prefixes read params -func (o *IPAMPrefixesAvailablePrefixesReadParams) SetContext(ctx context.Context) { +func (o *IpamPrefixesAvailablePrefixesReadParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam prefixes available prefixes read params -func (o *IPAMPrefixesAvailablePrefixesReadParams) WithHTTPClient(client *http.Client) *IPAMPrefixesAvailablePrefixesReadParams { +func (o *IpamPrefixesAvailablePrefixesReadParams) WithHTTPClient(client *http.Client) *IpamPrefixesAvailablePrefixesReadParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam prefixes available prefixes read params -func (o *IPAMPrefixesAvailablePrefixesReadParams) SetHTTPClient(client *http.Client) { +func (o *IpamPrefixesAvailablePrefixesReadParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam prefixes available prefixes read params -func (o *IPAMPrefixesAvailablePrefixesReadParams) WithID(id int64) *IPAMPrefixesAvailablePrefixesReadParams { +func (o *IpamPrefixesAvailablePrefixesReadParams) WithID(id int64) *IpamPrefixesAvailablePrefixesReadParams { o.SetID(id) return o } // SetID adds the id to the ipam prefixes available prefixes read params -func (o *IPAMPrefixesAvailablePrefixesReadParams) SetID(id int64) { +func (o *IpamPrefixesAvailablePrefixesReadParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMPrefixesAvailablePrefixesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamPrefixesAvailablePrefixesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_prefixes_available_prefixes_read_responses.go b/netbox/client/ipam/ipam_prefixes_available_prefixes_read_responses.go similarity index 66% rename from netbox/client/ipam/ip_a_m_prefixes_available_prefixes_read_responses.go rename to netbox/client/ipam/ipam_prefixes_available_prefixes_read_responses.go index 33ab4a7a636e2912b3102485410b1aa7ca0b7a49..9436cb567e6871992990ef78af73d225dcf5bca7 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_available_prefixes_read_responses.go +++ b/netbox/client/ipam/ipam_prefixes_available_prefixes_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMPrefixesAvailablePrefixesReadReader is a Reader for the IPAMPrefixesAvailablePrefixesRead structure. -type IPAMPrefixesAvailablePrefixesReadReader struct { +// IpamPrefixesAvailablePrefixesReadReader is a Reader for the IpamPrefixesAvailablePrefixesRead structure. +type IpamPrefixesAvailablePrefixesReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMPrefixesAvailablePrefixesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamPrefixesAvailablePrefixesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMPrefixesAvailablePrefixesReadOK() + result := NewIpamPrefixesAvailablePrefixesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMPrefixesAvailablePrefixesReadReader) ReadResponse(response runtime. } } -// NewIPAMPrefixesAvailablePrefixesReadOK creates a IPAMPrefixesAvailablePrefixesReadOK with default headers values -func NewIPAMPrefixesAvailablePrefixesReadOK() *IPAMPrefixesAvailablePrefixesReadOK { - return &IPAMPrefixesAvailablePrefixesReadOK{} +// NewIpamPrefixesAvailablePrefixesReadOK creates a IpamPrefixesAvailablePrefixesReadOK with default headers values +func NewIpamPrefixesAvailablePrefixesReadOK() *IpamPrefixesAvailablePrefixesReadOK { + return &IpamPrefixesAvailablePrefixesReadOK{} } -/*IPAMPrefixesAvailablePrefixesReadOK handles this case with default header values. +/*IpamPrefixesAvailablePrefixesReadOK handles this case with default header values. -IPAMPrefixesAvailablePrefixesReadOK ipam prefixes available prefixes read o k +IpamPrefixesAvailablePrefixesReadOK ipam prefixes available prefixes read o k */ -type IPAMPrefixesAvailablePrefixesReadOK struct { +type IpamPrefixesAvailablePrefixesReadOK struct { Payload *models.Prefix } -func (o *IPAMPrefixesAvailablePrefixesReadOK) Error() string { +func (o *IpamPrefixesAvailablePrefixesReadOK) Error() string { return fmt.Sprintf("[GET /ipam/prefixes/{id}/available-prefixes/][%d] ipamPrefixesAvailablePrefixesReadOK %+v", 200, o.Payload) } -func (o *IPAMPrefixesAvailablePrefixesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamPrefixesAvailablePrefixesReadOK) GetPayload() *models.Prefix { + return o.Payload +} + +func (o *IpamPrefixesAvailablePrefixesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Prefix) diff --git a/netbox/client/ipam/ip_a_m_prefixes_create_parameters.go b/netbox/client/ipam/ipam_prefixes_create_parameters.go similarity index 64% rename from netbox/client/ipam/ip_a_m_prefixes_create_parameters.go rename to netbox/client/ipam/ipam_prefixes_create_parameters.go index 3e3d9e97cbbbc04fd8f8744d68a796c1dd81c9f4..cc794646138d3ddd4409dcef89c9e6783474655a 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_create_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -30,52 +31,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMPrefixesCreateParams creates a new IPAMPrefixesCreateParams object +// NewIpamPrefixesCreateParams creates a new IpamPrefixesCreateParams object // with the default values initialized. -func NewIPAMPrefixesCreateParams() *IPAMPrefixesCreateParams { +func NewIpamPrefixesCreateParams() *IpamPrefixesCreateParams { var () - return &IPAMPrefixesCreateParams{ + return &IpamPrefixesCreateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMPrefixesCreateParamsWithTimeout creates a new IPAMPrefixesCreateParams object +// NewIpamPrefixesCreateParamsWithTimeout creates a new IpamPrefixesCreateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMPrefixesCreateParamsWithTimeout(timeout time.Duration) *IPAMPrefixesCreateParams { +func NewIpamPrefixesCreateParamsWithTimeout(timeout time.Duration) *IpamPrefixesCreateParams { var () - return &IPAMPrefixesCreateParams{ + return &IpamPrefixesCreateParams{ timeout: timeout, } } -// NewIPAMPrefixesCreateParamsWithContext creates a new IPAMPrefixesCreateParams object +// NewIpamPrefixesCreateParamsWithContext creates a new IpamPrefixesCreateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMPrefixesCreateParamsWithContext(ctx context.Context) *IPAMPrefixesCreateParams { +func NewIpamPrefixesCreateParamsWithContext(ctx context.Context) *IpamPrefixesCreateParams { var () - return &IPAMPrefixesCreateParams{ + return &IpamPrefixesCreateParams{ Context: ctx, } } -// NewIPAMPrefixesCreateParamsWithHTTPClient creates a new IPAMPrefixesCreateParams object +// NewIpamPrefixesCreateParamsWithHTTPClient creates a new IpamPrefixesCreateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMPrefixesCreateParamsWithHTTPClient(client *http.Client) *IPAMPrefixesCreateParams { +func NewIpamPrefixesCreateParamsWithHTTPClient(client *http.Client) *IpamPrefixesCreateParams { var () - return &IPAMPrefixesCreateParams{ + return &IpamPrefixesCreateParams{ HTTPClient: client, } } -/*IPAMPrefixesCreateParams contains all the parameters to send to the API endpoint +/*IpamPrefixesCreateParams contains all the parameters to send to the API endpoint for the ipam prefixes create operation typically these are written to a http.Request */ -type IPAMPrefixesCreateParams struct { +type IpamPrefixesCreateParams struct { /*Data*/ Data *models.WritablePrefix @@ -86,51 +87,51 @@ type IPAMPrefixesCreateParams struct { } // WithTimeout adds the timeout to the ipam prefixes create params -func (o *IPAMPrefixesCreateParams) WithTimeout(timeout time.Duration) *IPAMPrefixesCreateParams { +func (o *IpamPrefixesCreateParams) WithTimeout(timeout time.Duration) *IpamPrefixesCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam prefixes create params -func (o *IPAMPrefixesCreateParams) SetTimeout(timeout time.Duration) { +func (o *IpamPrefixesCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam prefixes create params -func (o *IPAMPrefixesCreateParams) WithContext(ctx context.Context) *IPAMPrefixesCreateParams { +func (o *IpamPrefixesCreateParams) WithContext(ctx context.Context) *IpamPrefixesCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam prefixes create params -func (o *IPAMPrefixesCreateParams) SetContext(ctx context.Context) { +func (o *IpamPrefixesCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam prefixes create params -func (o *IPAMPrefixesCreateParams) WithHTTPClient(client *http.Client) *IPAMPrefixesCreateParams { +func (o *IpamPrefixesCreateParams) WithHTTPClient(client *http.Client) *IpamPrefixesCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam prefixes create params -func (o *IPAMPrefixesCreateParams) SetHTTPClient(client *http.Client) { +func (o *IpamPrefixesCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam prefixes create params -func (o *IPAMPrefixesCreateParams) WithData(data *models.WritablePrefix) *IPAMPrefixesCreateParams { +func (o *IpamPrefixesCreateParams) WithData(data *models.WritablePrefix) *IpamPrefixesCreateParams { o.SetData(data) return o } // SetData adds the data to the ipam prefixes create params -func (o *IPAMPrefixesCreateParams) SetData(data *models.WritablePrefix) { +func (o *IpamPrefixesCreateParams) SetData(data *models.WritablePrefix) { o.Data = data } // WriteToRequest writes these params to a swagger request -func (o *IPAMPrefixesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamPrefixesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_prefixes_create_responses.go b/netbox/client/ipam/ipam_prefixes_create_responses.go similarity index 68% rename from netbox/client/ipam/ip_a_m_prefixes_create_responses.go rename to netbox/client/ipam/ipam_prefixes_create_responses.go index fd609fef83a2ee630278a3f78501243e490bd7cf..a3ea6189a79909f72e6ed1e3354b2b19119abf5a 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_create_responses.go +++ b/netbox/client/ipam/ipam_prefixes_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMPrefixesCreateReader is a Reader for the IPAMPrefixesCreate structure. -type IPAMPrefixesCreateReader struct { +// IpamPrefixesCreateReader is a Reader for the IpamPrefixesCreate structure. +type IpamPrefixesCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMPrefixesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamPrefixesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: - result := NewIPAMPrefixesCreateCreated() + result := NewIpamPrefixesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMPrefixesCreateReader) ReadResponse(response runtime.ClientResponse, } } -// NewIPAMPrefixesCreateCreated creates a IPAMPrefixesCreateCreated with default headers values -func NewIPAMPrefixesCreateCreated() *IPAMPrefixesCreateCreated { - return &IPAMPrefixesCreateCreated{} +// NewIpamPrefixesCreateCreated creates a IpamPrefixesCreateCreated with default headers values +func NewIpamPrefixesCreateCreated() *IpamPrefixesCreateCreated { + return &IpamPrefixesCreateCreated{} } -/*IPAMPrefixesCreateCreated handles this case with default header values. +/*IpamPrefixesCreateCreated handles this case with default header values. -IPAMPrefixesCreateCreated ipam prefixes create created +IpamPrefixesCreateCreated ipam prefixes create created */ -type IPAMPrefixesCreateCreated struct { +type IpamPrefixesCreateCreated struct { Payload *models.Prefix } -func (o *IPAMPrefixesCreateCreated) Error() string { +func (o *IpamPrefixesCreateCreated) Error() string { return fmt.Sprintf("[POST /ipam/prefixes/][%d] ipamPrefixesCreateCreated %+v", 201, o.Payload) } -func (o *IPAMPrefixesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamPrefixesCreateCreated) GetPayload() *models.Prefix { + return o.Payload +} + +func (o *IpamPrefixesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Prefix) diff --git a/netbox/client/ipam/ip_a_m_prefixes_delete_parameters.go b/netbox/client/ipam/ipam_prefixes_delete_parameters.go similarity index 66% rename from netbox/client/ipam/ip_a_m_prefixes_delete_parameters.go rename to netbox/client/ipam/ipam_prefixes_delete_parameters.go index 74e0bc7ed7028c607ec5629da829da7a437c41b1..e6942a63d4b5595a9b84f77ed5bcb270bb0e18db 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_delete_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMPrefixesDeleteParams creates a new IPAMPrefixesDeleteParams object +// NewIpamPrefixesDeleteParams creates a new IpamPrefixesDeleteParams object // with the default values initialized. -func NewIPAMPrefixesDeleteParams() *IPAMPrefixesDeleteParams { +func NewIpamPrefixesDeleteParams() *IpamPrefixesDeleteParams { var () - return &IPAMPrefixesDeleteParams{ + return &IpamPrefixesDeleteParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMPrefixesDeleteParamsWithTimeout creates a new IPAMPrefixesDeleteParams object +// NewIpamPrefixesDeleteParamsWithTimeout creates a new IpamPrefixesDeleteParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMPrefixesDeleteParamsWithTimeout(timeout time.Duration) *IPAMPrefixesDeleteParams { +func NewIpamPrefixesDeleteParamsWithTimeout(timeout time.Duration) *IpamPrefixesDeleteParams { var () - return &IPAMPrefixesDeleteParams{ + return &IpamPrefixesDeleteParams{ timeout: timeout, } } -// NewIPAMPrefixesDeleteParamsWithContext creates a new IPAMPrefixesDeleteParams object +// NewIpamPrefixesDeleteParamsWithContext creates a new IpamPrefixesDeleteParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMPrefixesDeleteParamsWithContext(ctx context.Context) *IPAMPrefixesDeleteParams { +func NewIpamPrefixesDeleteParamsWithContext(ctx context.Context) *IpamPrefixesDeleteParams { var () - return &IPAMPrefixesDeleteParams{ + return &IpamPrefixesDeleteParams{ Context: ctx, } } -// NewIPAMPrefixesDeleteParamsWithHTTPClient creates a new IPAMPrefixesDeleteParams object +// NewIpamPrefixesDeleteParamsWithHTTPClient creates a new IpamPrefixesDeleteParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMPrefixesDeleteParamsWithHTTPClient(client *http.Client) *IPAMPrefixesDeleteParams { +func NewIpamPrefixesDeleteParamsWithHTTPClient(client *http.Client) *IpamPrefixesDeleteParams { var () - return &IPAMPrefixesDeleteParams{ + return &IpamPrefixesDeleteParams{ HTTPClient: client, } } -/*IPAMPrefixesDeleteParams contains all the parameters to send to the API endpoint +/*IpamPrefixesDeleteParams contains all the parameters to send to the API endpoint for the ipam prefixes delete operation typically these are written to a http.Request */ -type IPAMPrefixesDeleteParams struct { +type IpamPrefixesDeleteParams struct { /*ID A unique integer value identifying this prefix. @@ -88,51 +89,51 @@ type IPAMPrefixesDeleteParams struct { } // WithTimeout adds the timeout to the ipam prefixes delete params -func (o *IPAMPrefixesDeleteParams) WithTimeout(timeout time.Duration) *IPAMPrefixesDeleteParams { +func (o *IpamPrefixesDeleteParams) WithTimeout(timeout time.Duration) *IpamPrefixesDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam prefixes delete params -func (o *IPAMPrefixesDeleteParams) SetTimeout(timeout time.Duration) { +func (o *IpamPrefixesDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam prefixes delete params -func (o *IPAMPrefixesDeleteParams) WithContext(ctx context.Context) *IPAMPrefixesDeleteParams { +func (o *IpamPrefixesDeleteParams) WithContext(ctx context.Context) *IpamPrefixesDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam prefixes delete params -func (o *IPAMPrefixesDeleteParams) SetContext(ctx context.Context) { +func (o *IpamPrefixesDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam prefixes delete params -func (o *IPAMPrefixesDeleteParams) WithHTTPClient(client *http.Client) *IPAMPrefixesDeleteParams { +func (o *IpamPrefixesDeleteParams) WithHTTPClient(client *http.Client) *IpamPrefixesDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam prefixes delete params -func (o *IPAMPrefixesDeleteParams) SetHTTPClient(client *http.Client) { +func (o *IpamPrefixesDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam prefixes delete params -func (o *IPAMPrefixesDeleteParams) WithID(id int64) *IPAMPrefixesDeleteParams { +func (o *IpamPrefixesDeleteParams) WithID(id int64) *IpamPrefixesDeleteParams { o.SetID(id) return o } // SetID adds the id to the ipam prefixes delete params -func (o *IPAMPrefixesDeleteParams) SetID(id int64) { +func (o *IpamPrefixesDeleteParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMPrefixesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamPrefixesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_prefixes_delete_responses.go b/netbox/client/ipam/ipam_prefixes_delete_responses.go similarity index 70% rename from netbox/client/ipam/ip_a_m_prefixes_delete_responses.go rename to netbox/client/ipam/ipam_prefixes_delete_responses.go index c9668b845a56744eb11f6d8e0c4a0e9b4a4be805..1be860cdfd8c31b46afacd09d2a673e1c20903bd 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_delete_responses.go +++ b/netbox/client/ipam/ipam_prefixes_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,17 +28,16 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// IPAMPrefixesDeleteReader is a Reader for the IPAMPrefixesDelete structure. -type IPAMPrefixesDeleteReader struct { +// IpamPrefixesDeleteReader is a Reader for the IpamPrefixesDelete structure. +type IpamPrefixesDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMPrefixesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamPrefixesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: - result := NewIPAMPrefixesDeleteNoContent() + result := NewIpamPrefixesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -48,23 +48,23 @@ func (o *IPAMPrefixesDeleteReader) ReadResponse(response runtime.ClientResponse, } } -// NewIPAMPrefixesDeleteNoContent creates a IPAMPrefixesDeleteNoContent with default headers values -func NewIPAMPrefixesDeleteNoContent() *IPAMPrefixesDeleteNoContent { - return &IPAMPrefixesDeleteNoContent{} +// NewIpamPrefixesDeleteNoContent creates a IpamPrefixesDeleteNoContent with default headers values +func NewIpamPrefixesDeleteNoContent() *IpamPrefixesDeleteNoContent { + return &IpamPrefixesDeleteNoContent{} } -/*IPAMPrefixesDeleteNoContent handles this case with default header values. +/*IpamPrefixesDeleteNoContent handles this case with default header values. -IPAMPrefixesDeleteNoContent ipam prefixes delete no content +IpamPrefixesDeleteNoContent ipam prefixes delete no content */ -type IPAMPrefixesDeleteNoContent struct { +type IpamPrefixesDeleteNoContent struct { } -func (o *IPAMPrefixesDeleteNoContent) Error() string { +func (o *IpamPrefixesDeleteNoContent) Error() string { return fmt.Sprintf("[DELETE /ipam/prefixes/{id}/][%d] ipamPrefixesDeleteNoContent ", 204) } -func (o *IPAMPrefixesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamPrefixesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/ipam/ip_a_m_prefixes_list_parameters.go b/netbox/client/ipam/ipam_prefixes_list_parameters.go similarity index 58% rename from netbox/client/ipam/ip_a_m_prefixes_list_parameters.go rename to netbox/client/ipam/ipam_prefixes_list_parameters.go index d217cef8abb03ef6e3c3f7940ed81574ce876b68..d35a9edf94d4095853066f6eefbca24b3467d3d6 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_list_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,52 +33,58 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMPrefixesListParams creates a new IPAMPrefixesListParams object +// NewIpamPrefixesListParams creates a new IpamPrefixesListParams object // with the default values initialized. -func NewIPAMPrefixesListParams() *IPAMPrefixesListParams { +func NewIpamPrefixesListParams() *IpamPrefixesListParams { var () - return &IPAMPrefixesListParams{ + return &IpamPrefixesListParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMPrefixesListParamsWithTimeout creates a new IPAMPrefixesListParams object +// NewIpamPrefixesListParamsWithTimeout creates a new IpamPrefixesListParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMPrefixesListParamsWithTimeout(timeout time.Duration) *IPAMPrefixesListParams { +func NewIpamPrefixesListParamsWithTimeout(timeout time.Duration) *IpamPrefixesListParams { var () - return &IPAMPrefixesListParams{ + return &IpamPrefixesListParams{ timeout: timeout, } } -// NewIPAMPrefixesListParamsWithContext creates a new IPAMPrefixesListParams object +// NewIpamPrefixesListParamsWithContext creates a new IpamPrefixesListParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMPrefixesListParamsWithContext(ctx context.Context) *IPAMPrefixesListParams { +func NewIpamPrefixesListParamsWithContext(ctx context.Context) *IpamPrefixesListParams { var () - return &IPAMPrefixesListParams{ + return &IpamPrefixesListParams{ Context: ctx, } } -// NewIPAMPrefixesListParamsWithHTTPClient creates a new IPAMPrefixesListParams object +// NewIpamPrefixesListParamsWithHTTPClient creates a new IpamPrefixesListParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMPrefixesListParamsWithHTTPClient(client *http.Client) *IPAMPrefixesListParams { +func NewIpamPrefixesListParamsWithHTTPClient(client *http.Client) *IpamPrefixesListParams { var () - return &IPAMPrefixesListParams{ + return &IpamPrefixesListParams{ HTTPClient: client, } } -/*IPAMPrefixesListParams contains all the parameters to send to the API endpoint +/*IpamPrefixesListParams contains all the parameters to send to the API endpoint for the ipam prefixes list operation typically these are written to a http.Request */ -type IPAMPrefixesListParams struct { +type IpamPrefixesListParams struct { /*Contains*/ Contains *string + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*Family*/ Family *string /*IDIn @@ -87,6 +94,12 @@ type IPAMPrefixesListParams struct { IDIn *string /*IsPool*/ IsPool *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. @@ -103,6 +116,10 @@ type IPAMPrefixesListParams struct { Prefix *string /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string /*Role*/ Role *string /*RoleID*/ @@ -142,315 +159,403 @@ type IPAMPrefixesListParams struct { } // WithTimeout adds the timeout to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithTimeout(timeout time.Duration) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithTimeout(timeout time.Duration) *IpamPrefixesListParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetTimeout(timeout time.Duration) { +func (o *IpamPrefixesListParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithContext(ctx context.Context) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithContext(ctx context.Context) *IpamPrefixesListParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetContext(ctx context.Context) { +func (o *IpamPrefixesListParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithHTTPClient(client *http.Client) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithHTTPClient(client *http.Client) *IpamPrefixesListParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetHTTPClient(client *http.Client) { +func (o *IpamPrefixesListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithContains adds the contains to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithContains(contains *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithContains(contains *string) *IpamPrefixesListParams { o.SetContains(contains) return o } // SetContains adds the contains to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetContains(contains *string) { +func (o *IpamPrefixesListParams) SetContains(contains *string) { o.Contains = contains } +// WithCreated adds the created to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithCreated(created *string) *IpamPrefixesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithCreatedGte(createdGte *string) *IpamPrefixesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithCreatedLte(createdLte *string) *IpamPrefixesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + // WithFamily adds the family to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithFamily(family *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithFamily(family *string) *IpamPrefixesListParams { o.SetFamily(family) return o } // SetFamily adds the family to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetFamily(family *string) { +func (o *IpamPrefixesListParams) SetFamily(family *string) { o.Family = family } // WithIDIn adds the iDIn to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithIDIn(iDIn *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithIDIn(iDIn *string) *IpamPrefixesListParams { o.SetIDIn(iDIn) return o } // SetIDIn adds the idIn to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetIDIn(iDIn *string) { +func (o *IpamPrefixesListParams) SetIDIn(iDIn *string) { o.IDIn = iDIn } // WithIsPool adds the isPool to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithIsPool(isPool *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithIsPool(isPool *string) *IpamPrefixesListParams { o.SetIsPool(isPool) return o } // SetIsPool adds the isPool to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetIsPool(isPool *string) { +func (o *IpamPrefixesListParams) SetIsPool(isPool *string) { o.IsPool = isPool } +// WithLastUpdated adds the lastUpdated to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithLastUpdated(lastUpdated *string) *IpamPrefixesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamPrefixesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamPrefixesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithLimit(limit *int64) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithLimit(limit *int64) *IpamPrefixesListParams { o.SetLimit(limit) return o } // SetLimit adds the limit to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetLimit(limit *int64) { +func (o *IpamPrefixesListParams) SetLimit(limit *int64) { o.Limit = limit } // WithMaskLength adds the maskLength to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithMaskLength(maskLength *float64) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithMaskLength(maskLength *float64) *IpamPrefixesListParams { o.SetMaskLength(maskLength) return o } // SetMaskLength adds the maskLength to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetMaskLength(maskLength *float64) { +func (o *IpamPrefixesListParams) SetMaskLength(maskLength *float64) { o.MaskLength = maskLength } // WithOffset adds the offset to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithOffset(offset *int64) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithOffset(offset *int64) *IpamPrefixesListParams { o.SetOffset(offset) return o } // SetOffset adds the offset to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetOffset(offset *int64) { +func (o *IpamPrefixesListParams) SetOffset(offset *int64) { o.Offset = offset } // WithPrefix adds the prefix to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithPrefix(prefix *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithPrefix(prefix *string) *IpamPrefixesListParams { o.SetPrefix(prefix) return o } // SetPrefix adds the prefix to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetPrefix(prefix *string) { +func (o *IpamPrefixesListParams) SetPrefix(prefix *string) { o.Prefix = prefix } // WithQ adds the q to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithQ(q *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithQ(q *string) *IpamPrefixesListParams { o.SetQ(q) return o } // SetQ adds the q to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetQ(q *string) { +func (o *IpamPrefixesListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithRegion(region *string) *IpamPrefixesListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithRegionID(regionID *string) *IpamPrefixesListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + // WithRole adds the role to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithRole(role *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithRole(role *string) *IpamPrefixesListParams { o.SetRole(role) return o } // SetRole adds the role to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetRole(role *string) { +func (o *IpamPrefixesListParams) SetRole(role *string) { o.Role = role } // WithRoleID adds the roleID to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithRoleID(roleID *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithRoleID(roleID *string) *IpamPrefixesListParams { o.SetRoleID(roleID) return o } // SetRoleID adds the roleId to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetRoleID(roleID *string) { +func (o *IpamPrefixesListParams) SetRoleID(roleID *string) { o.RoleID = roleID } // WithSite adds the site to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithSite(site *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithSite(site *string) *IpamPrefixesListParams { o.SetSite(site) return o } // SetSite adds the site to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetSite(site *string) { +func (o *IpamPrefixesListParams) SetSite(site *string) { o.Site = site } // WithSiteID adds the siteID to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithSiteID(siteID *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithSiteID(siteID *string) *IpamPrefixesListParams { o.SetSiteID(siteID) return o } // SetSiteID adds the siteId to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetSiteID(siteID *string) { +func (o *IpamPrefixesListParams) SetSiteID(siteID *string) { o.SiteID = siteID } // WithStatus adds the status to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithStatus(status *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithStatus(status *string) *IpamPrefixesListParams { o.SetStatus(status) return o } // SetStatus adds the status to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetStatus(status *string) { +func (o *IpamPrefixesListParams) SetStatus(status *string) { o.Status = status } // WithTag adds the tag to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithTag(tag *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithTag(tag *string) *IpamPrefixesListParams { o.SetTag(tag) return o } // SetTag adds the tag to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetTag(tag *string) { +func (o *IpamPrefixesListParams) SetTag(tag *string) { o.Tag = tag } // WithTenant adds the tenant to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithTenant(tenant *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithTenant(tenant *string) *IpamPrefixesListParams { o.SetTenant(tenant) return o } // SetTenant adds the tenant to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetTenant(tenant *string) { +func (o *IpamPrefixesListParams) SetTenant(tenant *string) { o.Tenant = tenant } // WithTenantGroup adds the tenantGroup to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithTenantGroup(tenantGroup *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithTenantGroup(tenantGroup *string) *IpamPrefixesListParams { o.SetTenantGroup(tenantGroup) return o } // SetTenantGroup adds the tenantGroup to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetTenantGroup(tenantGroup *string) { +func (o *IpamPrefixesListParams) SetTenantGroup(tenantGroup *string) { o.TenantGroup = tenantGroup } // WithTenantGroupID adds the tenantGroupID to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithTenantGroupID(tenantGroupID *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithTenantGroupID(tenantGroupID *string) *IpamPrefixesListParams { o.SetTenantGroupID(tenantGroupID) return o } // SetTenantGroupID adds the tenantGroupId to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetTenantGroupID(tenantGroupID *string) { +func (o *IpamPrefixesListParams) SetTenantGroupID(tenantGroupID *string) { o.TenantGroupID = tenantGroupID } // WithTenantID adds the tenantID to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithTenantID(tenantID *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithTenantID(tenantID *string) *IpamPrefixesListParams { o.SetTenantID(tenantID) return o } // SetTenantID adds the tenantId to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetTenantID(tenantID *string) { +func (o *IpamPrefixesListParams) SetTenantID(tenantID *string) { o.TenantID = tenantID } // WithVlanID adds the vlanID to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithVlanID(vlanID *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithVlanID(vlanID *string) *IpamPrefixesListParams { o.SetVlanID(vlanID) return o } // SetVlanID adds the vlanId to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetVlanID(vlanID *string) { +func (o *IpamPrefixesListParams) SetVlanID(vlanID *string) { o.VlanID = vlanID } // WithVlanVid adds the vlanVid to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithVlanVid(vlanVid *float64) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithVlanVid(vlanVid *float64) *IpamPrefixesListParams { o.SetVlanVid(vlanVid) return o } // SetVlanVid adds the vlanVid to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetVlanVid(vlanVid *float64) { +func (o *IpamPrefixesListParams) SetVlanVid(vlanVid *float64) { o.VlanVid = vlanVid } // WithVrf adds the vrf to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithVrf(vrf *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithVrf(vrf *string) *IpamPrefixesListParams { o.SetVrf(vrf) return o } // SetVrf adds the vrf to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetVrf(vrf *string) { +func (o *IpamPrefixesListParams) SetVrf(vrf *string) { o.Vrf = vrf } // WithVrfID adds the vrfID to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithVrfID(vrfID *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithVrfID(vrfID *string) *IpamPrefixesListParams { o.SetVrfID(vrfID) return o } // SetVrfID adds the vrfId to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetVrfID(vrfID *string) { +func (o *IpamPrefixesListParams) SetVrfID(vrfID *string) { o.VrfID = vrfID } // WithWithin adds the within to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithWithin(within *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithWithin(within *string) *IpamPrefixesListParams { o.SetWithin(within) return o } // SetWithin adds the within to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetWithin(within *string) { +func (o *IpamPrefixesListParams) SetWithin(within *string) { o.Within = within } // WithWithinInclude adds the withinInclude to the ipam prefixes list params -func (o *IPAMPrefixesListParams) WithWithinInclude(withinInclude *string) *IPAMPrefixesListParams { +func (o *IpamPrefixesListParams) WithWithinInclude(withinInclude *string) *IpamPrefixesListParams { o.SetWithinInclude(withinInclude) return o } // SetWithinInclude adds the withinInclude to the ipam prefixes list params -func (o *IPAMPrefixesListParams) SetWithinInclude(withinInclude *string) { +func (o *IpamPrefixesListParams) SetWithinInclude(withinInclude *string) { o.WithinInclude = withinInclude } // WriteToRequest writes these params to a swagger request -func (o *IPAMPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err @@ -473,6 +578,54 @@ func (o *IPAMPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg str } + 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 @@ -521,6 +674,54 @@ func (o *IPAMPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg str } + 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 @@ -601,6 +802,38 @@ func (o *IPAMPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg str } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + if o.Role != nil { // query param role diff --git a/netbox/client/ipam/ip_a_m_prefixes_list_responses.go b/netbox/client/ipam/ipam_prefixes_list_responses.go similarity index 72% rename from netbox/client/ipam/ip_a_m_prefixes_list_responses.go rename to netbox/client/ipam/ipam_prefixes_list_responses.go index f76434ae30657f421130fe0d124896bb1b25b19d..a74ed68ed5f86d3f9c80ae15c72dad9f926d26d8 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_list_responses.go +++ b/netbox/client/ipam/ipam_prefixes_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,20 +32,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMPrefixesListReader is a Reader for the IPAMPrefixesList structure. -type IPAMPrefixesListReader struct { +// IpamPrefixesListReader is a Reader for the IpamPrefixesList structure. +type IpamPrefixesListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMPrefixesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamPrefixesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMPrefixesListOK() + result := NewIpamPrefixesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -55,26 +55,30 @@ func (o *IPAMPrefixesListReader) ReadResponse(response runtime.ClientResponse, c } } -// NewIPAMPrefixesListOK creates a IPAMPrefixesListOK with default headers values -func NewIPAMPrefixesListOK() *IPAMPrefixesListOK { - return &IPAMPrefixesListOK{} +// NewIpamPrefixesListOK creates a IpamPrefixesListOK with default headers values +func NewIpamPrefixesListOK() *IpamPrefixesListOK { + return &IpamPrefixesListOK{} } -/*IPAMPrefixesListOK handles this case with default header values. +/*IpamPrefixesListOK handles this case with default header values. -IPAMPrefixesListOK ipam prefixes list o k +IpamPrefixesListOK ipam prefixes list o k */ -type IPAMPrefixesListOK struct { - Payload *IPAMPrefixesListOKBody +type IpamPrefixesListOK struct { + Payload *IpamPrefixesListOKBody } -func (o *IPAMPrefixesListOK) Error() string { +func (o *IpamPrefixesListOK) Error() string { return fmt.Sprintf("[GET /ipam/prefixes/][%d] ipamPrefixesListOK %+v", 200, o.Payload) } -func (o *IPAMPrefixesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamPrefixesListOK) GetPayload() *IpamPrefixesListOKBody { + return o.Payload +} + +func (o *IpamPrefixesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(IPAMPrefixesListOKBody) + o.Payload = new(IpamPrefixesListOKBody) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -84,10 +88,10 @@ func (o *IPAMPrefixesListOK) readResponse(response runtime.ClientResponse, consu return nil } -/*IPAMPrefixesListOKBody IP a m prefixes list o k body -swagger:model IPAMPrefixesListOKBody +/*IpamPrefixesListOKBody ipam prefixes list o k body +swagger:model IpamPrefixesListOKBody */ -type IPAMPrefixesListOKBody struct { +type IpamPrefixesListOKBody struct { // count // Required: true @@ -106,8 +110,8 @@ type IPAMPrefixesListOKBody struct { Results []*models.Prefix `json:"results"` } -// Validate validates this IP a m prefixes list o k body -func (o *IPAMPrefixesListOKBody) Validate(formats strfmt.Registry) error { +// Validate validates this ipam prefixes list o k body +func (o *IpamPrefixesListOKBody) Validate(formats strfmt.Registry) error { var res []error if err := o.validateCount(formats); err != nil { @@ -132,7 +136,7 @@ func (o *IPAMPrefixesListOKBody) Validate(formats strfmt.Registry) error { return nil } -func (o *IPAMPrefixesListOKBody) validateCount(formats strfmt.Registry) error { +func (o *IpamPrefixesListOKBody) validateCount(formats strfmt.Registry) error { if err := validate.Required("ipamPrefixesListOK"+"."+"count", "body", o.Count); err != nil { return err @@ -141,7 +145,7 @@ func (o *IPAMPrefixesListOKBody) validateCount(formats strfmt.Registry) error { return nil } -func (o *IPAMPrefixesListOKBody) validateNext(formats strfmt.Registry) error { +func (o *IpamPrefixesListOKBody) validateNext(formats strfmt.Registry) error { if swag.IsZero(o.Next) { // not required return nil @@ -154,7 +158,7 @@ func (o *IPAMPrefixesListOKBody) validateNext(formats strfmt.Registry) error { return nil } -func (o *IPAMPrefixesListOKBody) validatePrevious(formats strfmt.Registry) error { +func (o *IpamPrefixesListOKBody) validatePrevious(formats strfmt.Registry) error { if swag.IsZero(o.Previous) { // not required return nil @@ -167,7 +171,7 @@ func (o *IPAMPrefixesListOKBody) validatePrevious(formats strfmt.Registry) error return nil } -func (o *IPAMPrefixesListOKBody) validateResults(formats strfmt.Registry) error { +func (o *IpamPrefixesListOKBody) validateResults(formats strfmt.Registry) error { if err := validate.Required("ipamPrefixesListOK"+"."+"results", "body", o.Results); err != nil { return err @@ -193,7 +197,7 @@ func (o *IPAMPrefixesListOKBody) validateResults(formats strfmt.Registry) error } // MarshalBinary interface implementation -func (o *IPAMPrefixesListOKBody) MarshalBinary() ([]byte, error) { +func (o *IpamPrefixesListOKBody) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -201,8 +205,8 @@ func (o *IPAMPrefixesListOKBody) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *IPAMPrefixesListOKBody) UnmarshalBinary(b []byte) error { - var res IPAMPrefixesListOKBody +func (o *IpamPrefixesListOKBody) UnmarshalBinary(b []byte) error { + var res IpamPrefixesListOKBody if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/netbox/client/ipam/ip_a_m_prefixes_partial_update_parameters.go b/netbox/client/ipam/ipam_prefixes_partial_update_parameters.go similarity index 62% rename from netbox/client/ipam/ip_a_m_prefixes_partial_update_parameters.go rename to netbox/client/ipam/ipam_prefixes_partial_update_parameters.go index ddd42a1701502130f4759a140339674804bafe2a..1f218b20b7dfa1db90eebc77b82ac4c68c8a8807 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_partial_update_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMPrefixesPartialUpdateParams creates a new IPAMPrefixesPartialUpdateParams object +// NewIpamPrefixesPartialUpdateParams creates a new IpamPrefixesPartialUpdateParams object // with the default values initialized. -func NewIPAMPrefixesPartialUpdateParams() *IPAMPrefixesPartialUpdateParams { +func NewIpamPrefixesPartialUpdateParams() *IpamPrefixesPartialUpdateParams { var () - return &IPAMPrefixesPartialUpdateParams{ + return &IpamPrefixesPartialUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMPrefixesPartialUpdateParamsWithTimeout creates a new IPAMPrefixesPartialUpdateParams object +// NewIpamPrefixesPartialUpdateParamsWithTimeout creates a new IpamPrefixesPartialUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMPrefixesPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMPrefixesPartialUpdateParams { +func NewIpamPrefixesPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamPrefixesPartialUpdateParams { var () - return &IPAMPrefixesPartialUpdateParams{ + return &IpamPrefixesPartialUpdateParams{ timeout: timeout, } } -// NewIPAMPrefixesPartialUpdateParamsWithContext creates a new IPAMPrefixesPartialUpdateParams object +// NewIpamPrefixesPartialUpdateParamsWithContext creates a new IpamPrefixesPartialUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMPrefixesPartialUpdateParamsWithContext(ctx context.Context) *IPAMPrefixesPartialUpdateParams { +func NewIpamPrefixesPartialUpdateParamsWithContext(ctx context.Context) *IpamPrefixesPartialUpdateParams { var () - return &IPAMPrefixesPartialUpdateParams{ + return &IpamPrefixesPartialUpdateParams{ Context: ctx, } } -// NewIPAMPrefixesPartialUpdateParamsWithHTTPClient creates a new IPAMPrefixesPartialUpdateParams object +// NewIpamPrefixesPartialUpdateParamsWithHTTPClient creates a new IpamPrefixesPartialUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMPrefixesPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMPrefixesPartialUpdateParams { +func NewIpamPrefixesPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamPrefixesPartialUpdateParams { var () - return &IPAMPrefixesPartialUpdateParams{ + return &IpamPrefixesPartialUpdateParams{ HTTPClient: client, } } -/*IPAMPrefixesPartialUpdateParams contains all the parameters to send to the API endpoint +/*IpamPrefixesPartialUpdateParams contains all the parameters to send to the API endpoint for the ipam prefixes partial update operation typically these are written to a http.Request */ -type IPAMPrefixesPartialUpdateParams struct { +type IpamPrefixesPartialUpdateParams struct { /*Data*/ Data *models.WritablePrefix @@ -92,62 +93,62 @@ type IPAMPrefixesPartialUpdateParams struct { } // WithTimeout adds the timeout to the ipam prefixes partial update params -func (o *IPAMPrefixesPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMPrefixesPartialUpdateParams { +func (o *IpamPrefixesPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamPrefixesPartialUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam prefixes partial update params -func (o *IPAMPrefixesPartialUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamPrefixesPartialUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam prefixes partial update params -func (o *IPAMPrefixesPartialUpdateParams) WithContext(ctx context.Context) *IPAMPrefixesPartialUpdateParams { +func (o *IpamPrefixesPartialUpdateParams) WithContext(ctx context.Context) *IpamPrefixesPartialUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam prefixes partial update params -func (o *IPAMPrefixesPartialUpdateParams) SetContext(ctx context.Context) { +func (o *IpamPrefixesPartialUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam prefixes partial update params -func (o *IPAMPrefixesPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMPrefixesPartialUpdateParams { +func (o *IpamPrefixesPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamPrefixesPartialUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam prefixes partial update params -func (o *IPAMPrefixesPartialUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamPrefixesPartialUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam prefixes partial update params -func (o *IPAMPrefixesPartialUpdateParams) WithData(data *models.WritablePrefix) *IPAMPrefixesPartialUpdateParams { +func (o *IpamPrefixesPartialUpdateParams) WithData(data *models.WritablePrefix) *IpamPrefixesPartialUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam prefixes partial update params -func (o *IPAMPrefixesPartialUpdateParams) SetData(data *models.WritablePrefix) { +func (o *IpamPrefixesPartialUpdateParams) SetData(data *models.WritablePrefix) { o.Data = data } // WithID adds the id to the ipam prefixes partial update params -func (o *IPAMPrefixesPartialUpdateParams) WithID(id int64) *IPAMPrefixesPartialUpdateParams { +func (o *IpamPrefixesPartialUpdateParams) WithID(id int64) *IpamPrefixesPartialUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam prefixes partial update params -func (o *IPAMPrefixesPartialUpdateParams) SetID(id int64) { +func (o *IpamPrefixesPartialUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMPrefixesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamPrefixesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_prefixes_partial_update_responses.go b/netbox/client/ipam/ipam_prefixes_partial_update_responses.go similarity index 68% rename from netbox/client/ipam/ip_a_m_prefixes_partial_update_responses.go rename to netbox/client/ipam/ipam_prefixes_partial_update_responses.go index 9cfd20e572575769666134f1bafa3b779cfaaa7b..f0941ed67efc2a2bd82d773c44d510744f2989e0 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_partial_update_responses.go +++ b/netbox/client/ipam/ipam_prefixes_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMPrefixesPartialUpdateReader is a Reader for the IPAMPrefixesPartialUpdate structure. -type IPAMPrefixesPartialUpdateReader struct { +// IpamPrefixesPartialUpdateReader is a Reader for the IpamPrefixesPartialUpdate structure. +type IpamPrefixesPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMPrefixesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamPrefixesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMPrefixesPartialUpdateOK() + result := NewIpamPrefixesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMPrefixesPartialUpdateReader) ReadResponse(response runtime.ClientRe } } -// NewIPAMPrefixesPartialUpdateOK creates a IPAMPrefixesPartialUpdateOK with default headers values -func NewIPAMPrefixesPartialUpdateOK() *IPAMPrefixesPartialUpdateOK { - return &IPAMPrefixesPartialUpdateOK{} +// NewIpamPrefixesPartialUpdateOK creates a IpamPrefixesPartialUpdateOK with default headers values +func NewIpamPrefixesPartialUpdateOK() *IpamPrefixesPartialUpdateOK { + return &IpamPrefixesPartialUpdateOK{} } -/*IPAMPrefixesPartialUpdateOK handles this case with default header values. +/*IpamPrefixesPartialUpdateOK handles this case with default header values. -IPAMPrefixesPartialUpdateOK ipam prefixes partial update o k +IpamPrefixesPartialUpdateOK ipam prefixes partial update o k */ -type IPAMPrefixesPartialUpdateOK struct { +type IpamPrefixesPartialUpdateOK struct { Payload *models.Prefix } -func (o *IPAMPrefixesPartialUpdateOK) Error() string { +func (o *IpamPrefixesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /ipam/prefixes/{id}/][%d] ipamPrefixesPartialUpdateOK %+v", 200, o.Payload) } -func (o *IPAMPrefixesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamPrefixesPartialUpdateOK) GetPayload() *models.Prefix { + return o.Payload +} + +func (o *IpamPrefixesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Prefix) diff --git a/netbox/client/ipam/ip_a_m_prefixes_read_parameters.go b/netbox/client/ipam/ipam_prefixes_read_parameters.go similarity index 66% rename from netbox/client/ipam/ip_a_m_prefixes_read_parameters.go rename to netbox/client/ipam/ipam_prefixes_read_parameters.go index 39945c5225b748f2b31f47f034950a0195e26217..175617ac7aa6c7d4ab78e044ff50806e3a0235a9 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_read_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMPrefixesReadParams creates a new IPAMPrefixesReadParams object +// NewIpamPrefixesReadParams creates a new IpamPrefixesReadParams object // with the default values initialized. -func NewIPAMPrefixesReadParams() *IPAMPrefixesReadParams { +func NewIpamPrefixesReadParams() *IpamPrefixesReadParams { var () - return &IPAMPrefixesReadParams{ + return &IpamPrefixesReadParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMPrefixesReadParamsWithTimeout creates a new IPAMPrefixesReadParams object +// NewIpamPrefixesReadParamsWithTimeout creates a new IpamPrefixesReadParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMPrefixesReadParamsWithTimeout(timeout time.Duration) *IPAMPrefixesReadParams { +func NewIpamPrefixesReadParamsWithTimeout(timeout time.Duration) *IpamPrefixesReadParams { var () - return &IPAMPrefixesReadParams{ + return &IpamPrefixesReadParams{ timeout: timeout, } } -// NewIPAMPrefixesReadParamsWithContext creates a new IPAMPrefixesReadParams object +// NewIpamPrefixesReadParamsWithContext creates a new IpamPrefixesReadParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMPrefixesReadParamsWithContext(ctx context.Context) *IPAMPrefixesReadParams { +func NewIpamPrefixesReadParamsWithContext(ctx context.Context) *IpamPrefixesReadParams { var () - return &IPAMPrefixesReadParams{ + return &IpamPrefixesReadParams{ Context: ctx, } } -// NewIPAMPrefixesReadParamsWithHTTPClient creates a new IPAMPrefixesReadParams object +// NewIpamPrefixesReadParamsWithHTTPClient creates a new IpamPrefixesReadParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMPrefixesReadParamsWithHTTPClient(client *http.Client) *IPAMPrefixesReadParams { +func NewIpamPrefixesReadParamsWithHTTPClient(client *http.Client) *IpamPrefixesReadParams { var () - return &IPAMPrefixesReadParams{ + return &IpamPrefixesReadParams{ HTTPClient: client, } } -/*IPAMPrefixesReadParams contains all the parameters to send to the API endpoint +/*IpamPrefixesReadParams contains all the parameters to send to the API endpoint for the ipam prefixes read operation typically these are written to a http.Request */ -type IPAMPrefixesReadParams struct { +type IpamPrefixesReadParams struct { /*ID A unique integer value identifying this prefix. @@ -88,51 +89,51 @@ type IPAMPrefixesReadParams struct { } // WithTimeout adds the timeout to the ipam prefixes read params -func (o *IPAMPrefixesReadParams) WithTimeout(timeout time.Duration) *IPAMPrefixesReadParams { +func (o *IpamPrefixesReadParams) WithTimeout(timeout time.Duration) *IpamPrefixesReadParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam prefixes read params -func (o *IPAMPrefixesReadParams) SetTimeout(timeout time.Duration) { +func (o *IpamPrefixesReadParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam prefixes read params -func (o *IPAMPrefixesReadParams) WithContext(ctx context.Context) *IPAMPrefixesReadParams { +func (o *IpamPrefixesReadParams) WithContext(ctx context.Context) *IpamPrefixesReadParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam prefixes read params -func (o *IPAMPrefixesReadParams) SetContext(ctx context.Context) { +func (o *IpamPrefixesReadParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam prefixes read params -func (o *IPAMPrefixesReadParams) WithHTTPClient(client *http.Client) *IPAMPrefixesReadParams { +func (o *IpamPrefixesReadParams) WithHTTPClient(client *http.Client) *IpamPrefixesReadParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam prefixes read params -func (o *IPAMPrefixesReadParams) SetHTTPClient(client *http.Client) { +func (o *IpamPrefixesReadParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam prefixes read params -func (o *IPAMPrefixesReadParams) WithID(id int64) *IPAMPrefixesReadParams { +func (o *IpamPrefixesReadParams) WithID(id int64) *IpamPrefixesReadParams { o.SetID(id) return o } // SetID adds the id to the ipam prefixes read params -func (o *IPAMPrefixesReadParams) SetID(id int64) { +func (o *IpamPrefixesReadParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMPrefixesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamPrefixesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_prefixes_read_responses.go b/netbox/client/ipam/ipam_prefixes_read_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_prefixes_read_responses.go rename to netbox/client/ipam/ipam_prefixes_read_responses.go index c61cc6dceb938fc9366d867c029dd3fdb7da4cde..04efb03c8fb6407430d77b47f1578f81c3a49c85 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_read_responses.go +++ b/netbox/client/ipam/ipam_prefixes_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMPrefixesReadReader is a Reader for the IPAMPrefixesRead structure. -type IPAMPrefixesReadReader struct { +// IpamPrefixesReadReader is a Reader for the IpamPrefixesRead structure. +type IpamPrefixesReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMPrefixesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamPrefixesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMPrefixesReadOK() + result := NewIpamPrefixesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMPrefixesReadReader) ReadResponse(response runtime.ClientResponse, c } } -// NewIPAMPrefixesReadOK creates a IPAMPrefixesReadOK with default headers values -func NewIPAMPrefixesReadOK() *IPAMPrefixesReadOK { - return &IPAMPrefixesReadOK{} +// NewIpamPrefixesReadOK creates a IpamPrefixesReadOK with default headers values +func NewIpamPrefixesReadOK() *IpamPrefixesReadOK { + return &IpamPrefixesReadOK{} } -/*IPAMPrefixesReadOK handles this case with default header values. +/*IpamPrefixesReadOK handles this case with default header values. -IPAMPrefixesReadOK ipam prefixes read o k +IpamPrefixesReadOK ipam prefixes read o k */ -type IPAMPrefixesReadOK struct { +type IpamPrefixesReadOK struct { Payload *models.Prefix } -func (o *IPAMPrefixesReadOK) Error() string { +func (o *IpamPrefixesReadOK) Error() string { return fmt.Sprintf("[GET /ipam/prefixes/{id}/][%d] ipamPrefixesReadOK %+v", 200, o.Payload) } -func (o *IPAMPrefixesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamPrefixesReadOK) GetPayload() *models.Prefix { + return o.Payload +} + +func (o *IpamPrefixesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Prefix) diff --git a/netbox/client/ipam/ip_a_m_prefixes_update_parameters.go b/netbox/client/ipam/ipam_prefixes_update_parameters.go similarity index 65% rename from netbox/client/ipam/ip_a_m_prefixes_update_parameters.go rename to netbox/client/ipam/ipam_prefixes_update_parameters.go index 951385e4b4e049b0cc555e243289d273c8115068..3846f333a8c4aac3b38f521c5558ed18d3cdf94d 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_update_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMPrefixesUpdateParams creates a new IPAMPrefixesUpdateParams object +// NewIpamPrefixesUpdateParams creates a new IpamPrefixesUpdateParams object // with the default values initialized. -func NewIPAMPrefixesUpdateParams() *IPAMPrefixesUpdateParams { +func NewIpamPrefixesUpdateParams() *IpamPrefixesUpdateParams { var () - return &IPAMPrefixesUpdateParams{ + return &IpamPrefixesUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMPrefixesUpdateParamsWithTimeout creates a new IPAMPrefixesUpdateParams object +// NewIpamPrefixesUpdateParamsWithTimeout creates a new IpamPrefixesUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMPrefixesUpdateParamsWithTimeout(timeout time.Duration) *IPAMPrefixesUpdateParams { +func NewIpamPrefixesUpdateParamsWithTimeout(timeout time.Duration) *IpamPrefixesUpdateParams { var () - return &IPAMPrefixesUpdateParams{ + return &IpamPrefixesUpdateParams{ timeout: timeout, } } -// NewIPAMPrefixesUpdateParamsWithContext creates a new IPAMPrefixesUpdateParams object +// NewIpamPrefixesUpdateParamsWithContext creates a new IpamPrefixesUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMPrefixesUpdateParamsWithContext(ctx context.Context) *IPAMPrefixesUpdateParams { +func NewIpamPrefixesUpdateParamsWithContext(ctx context.Context) *IpamPrefixesUpdateParams { var () - return &IPAMPrefixesUpdateParams{ + return &IpamPrefixesUpdateParams{ Context: ctx, } } -// NewIPAMPrefixesUpdateParamsWithHTTPClient creates a new IPAMPrefixesUpdateParams object +// NewIpamPrefixesUpdateParamsWithHTTPClient creates a new IpamPrefixesUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMPrefixesUpdateParamsWithHTTPClient(client *http.Client) *IPAMPrefixesUpdateParams { +func NewIpamPrefixesUpdateParamsWithHTTPClient(client *http.Client) *IpamPrefixesUpdateParams { var () - return &IPAMPrefixesUpdateParams{ + return &IpamPrefixesUpdateParams{ HTTPClient: client, } } -/*IPAMPrefixesUpdateParams contains all the parameters to send to the API endpoint +/*IpamPrefixesUpdateParams contains all the parameters to send to the API endpoint for the ipam prefixes update operation typically these are written to a http.Request */ -type IPAMPrefixesUpdateParams struct { +type IpamPrefixesUpdateParams struct { /*Data*/ Data *models.WritablePrefix @@ -92,62 +93,62 @@ type IPAMPrefixesUpdateParams struct { } // WithTimeout adds the timeout to the ipam prefixes update params -func (o *IPAMPrefixesUpdateParams) WithTimeout(timeout time.Duration) *IPAMPrefixesUpdateParams { +func (o *IpamPrefixesUpdateParams) WithTimeout(timeout time.Duration) *IpamPrefixesUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam prefixes update params -func (o *IPAMPrefixesUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamPrefixesUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam prefixes update params -func (o *IPAMPrefixesUpdateParams) WithContext(ctx context.Context) *IPAMPrefixesUpdateParams { +func (o *IpamPrefixesUpdateParams) WithContext(ctx context.Context) *IpamPrefixesUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam prefixes update params -func (o *IPAMPrefixesUpdateParams) SetContext(ctx context.Context) { +func (o *IpamPrefixesUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam prefixes update params -func (o *IPAMPrefixesUpdateParams) WithHTTPClient(client *http.Client) *IPAMPrefixesUpdateParams { +func (o *IpamPrefixesUpdateParams) WithHTTPClient(client *http.Client) *IpamPrefixesUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam prefixes update params -func (o *IPAMPrefixesUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamPrefixesUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam prefixes update params -func (o *IPAMPrefixesUpdateParams) WithData(data *models.WritablePrefix) *IPAMPrefixesUpdateParams { +func (o *IpamPrefixesUpdateParams) WithData(data *models.WritablePrefix) *IpamPrefixesUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam prefixes update params -func (o *IPAMPrefixesUpdateParams) SetData(data *models.WritablePrefix) { +func (o *IpamPrefixesUpdateParams) SetData(data *models.WritablePrefix) { o.Data = data } // WithID adds the id to the ipam prefixes update params -func (o *IPAMPrefixesUpdateParams) WithID(id int64) *IPAMPrefixesUpdateParams { +func (o *IpamPrefixesUpdateParams) WithID(id int64) *IpamPrefixesUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam prefixes update params -func (o *IPAMPrefixesUpdateParams) SetID(id int64) { +func (o *IpamPrefixesUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMPrefixesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamPrefixesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_prefixes_update_responses.go b/netbox/client/ipam/ipam_prefixes_update_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_prefixes_update_responses.go rename to netbox/client/ipam/ipam_prefixes_update_responses.go index 376bcdfc17da66adc3dabbaf6796b576bf051a19..9dadf0cb30cf00fe04a82f01e81b9aded1d20c5e 100644 --- a/netbox/client/ipam/ip_a_m_prefixes_update_responses.go +++ b/netbox/client/ipam/ipam_prefixes_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMPrefixesUpdateReader is a Reader for the IPAMPrefixesUpdate structure. -type IPAMPrefixesUpdateReader struct { +// IpamPrefixesUpdateReader is a Reader for the IpamPrefixesUpdate structure. +type IpamPrefixesUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMPrefixesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamPrefixesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMPrefixesUpdateOK() + result := NewIpamPrefixesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMPrefixesUpdateReader) ReadResponse(response runtime.ClientResponse, } } -// NewIPAMPrefixesUpdateOK creates a IPAMPrefixesUpdateOK with default headers values -func NewIPAMPrefixesUpdateOK() *IPAMPrefixesUpdateOK { - return &IPAMPrefixesUpdateOK{} +// NewIpamPrefixesUpdateOK creates a IpamPrefixesUpdateOK with default headers values +func NewIpamPrefixesUpdateOK() *IpamPrefixesUpdateOK { + return &IpamPrefixesUpdateOK{} } -/*IPAMPrefixesUpdateOK handles this case with default header values. +/*IpamPrefixesUpdateOK handles this case with default header values. -IPAMPrefixesUpdateOK ipam prefixes update o k +IpamPrefixesUpdateOK ipam prefixes update o k */ -type IPAMPrefixesUpdateOK struct { +type IpamPrefixesUpdateOK struct { Payload *models.Prefix } -func (o *IPAMPrefixesUpdateOK) Error() string { +func (o *IpamPrefixesUpdateOK) Error() string { return fmt.Sprintf("[PUT /ipam/prefixes/{id}/][%d] ipamPrefixesUpdateOK %+v", 200, o.Payload) } -func (o *IPAMPrefixesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamPrefixesUpdateOK) GetPayload() *models.Prefix { + return o.Payload +} + +func (o *IpamPrefixesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Prefix) diff --git a/netbox/client/ipam/ip_a_m_rirs_create_parameters.go b/netbox/client/ipam/ipam_rirs_create_parameters.go similarity index 65% rename from netbox/client/ipam/ip_a_m_rirs_create_parameters.go rename to netbox/client/ipam/ipam_rirs_create_parameters.go index 24843a8caf25e618e43e4ccababe1afee1fb8d73..45d26b7dc752d16658cd73e8236f8251b0d126c4 100644 --- a/netbox/client/ipam/ip_a_m_rirs_create_parameters.go +++ b/netbox/client/ipam/ipam_rirs_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -30,52 +31,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMRirsCreateParams creates a new IPAMRirsCreateParams object +// NewIpamRirsCreateParams creates a new IpamRirsCreateParams object // with the default values initialized. -func NewIPAMRirsCreateParams() *IPAMRirsCreateParams { +func NewIpamRirsCreateParams() *IpamRirsCreateParams { var () - return &IPAMRirsCreateParams{ + return &IpamRirsCreateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMRirsCreateParamsWithTimeout creates a new IPAMRirsCreateParams object +// NewIpamRirsCreateParamsWithTimeout creates a new IpamRirsCreateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMRirsCreateParamsWithTimeout(timeout time.Duration) *IPAMRirsCreateParams { +func NewIpamRirsCreateParamsWithTimeout(timeout time.Duration) *IpamRirsCreateParams { var () - return &IPAMRirsCreateParams{ + return &IpamRirsCreateParams{ timeout: timeout, } } -// NewIPAMRirsCreateParamsWithContext creates a new IPAMRirsCreateParams object +// NewIpamRirsCreateParamsWithContext creates a new IpamRirsCreateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMRirsCreateParamsWithContext(ctx context.Context) *IPAMRirsCreateParams { +func NewIpamRirsCreateParamsWithContext(ctx context.Context) *IpamRirsCreateParams { var () - return &IPAMRirsCreateParams{ + return &IpamRirsCreateParams{ Context: ctx, } } -// NewIPAMRirsCreateParamsWithHTTPClient creates a new IPAMRirsCreateParams object +// NewIpamRirsCreateParamsWithHTTPClient creates a new IpamRirsCreateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMRirsCreateParamsWithHTTPClient(client *http.Client) *IPAMRirsCreateParams { +func NewIpamRirsCreateParamsWithHTTPClient(client *http.Client) *IpamRirsCreateParams { var () - return &IPAMRirsCreateParams{ + return &IpamRirsCreateParams{ HTTPClient: client, } } -/*IPAMRirsCreateParams contains all the parameters to send to the API endpoint +/*IpamRirsCreateParams contains all the parameters to send to the API endpoint for the ipam rirs create operation typically these are written to a http.Request */ -type IPAMRirsCreateParams struct { +type IpamRirsCreateParams struct { /*Data*/ Data *models.RIR @@ -86,51 +87,51 @@ type IPAMRirsCreateParams struct { } // WithTimeout adds the timeout to the ipam rirs create params -func (o *IPAMRirsCreateParams) WithTimeout(timeout time.Duration) *IPAMRirsCreateParams { +func (o *IpamRirsCreateParams) WithTimeout(timeout time.Duration) *IpamRirsCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam rirs create params -func (o *IPAMRirsCreateParams) SetTimeout(timeout time.Duration) { +func (o *IpamRirsCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam rirs create params -func (o *IPAMRirsCreateParams) WithContext(ctx context.Context) *IPAMRirsCreateParams { +func (o *IpamRirsCreateParams) WithContext(ctx context.Context) *IpamRirsCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam rirs create params -func (o *IPAMRirsCreateParams) SetContext(ctx context.Context) { +func (o *IpamRirsCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam rirs create params -func (o *IPAMRirsCreateParams) WithHTTPClient(client *http.Client) *IPAMRirsCreateParams { +func (o *IpamRirsCreateParams) WithHTTPClient(client *http.Client) *IpamRirsCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam rirs create params -func (o *IPAMRirsCreateParams) SetHTTPClient(client *http.Client) { +func (o *IpamRirsCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam rirs create params -func (o *IPAMRirsCreateParams) WithData(data *models.RIR) *IPAMRirsCreateParams { +func (o *IpamRirsCreateParams) WithData(data *models.RIR) *IpamRirsCreateParams { o.SetData(data) return o } // SetData adds the data to the ipam rirs create params -func (o *IPAMRirsCreateParams) SetData(data *models.RIR) { +func (o *IpamRirsCreateParams) SetData(data *models.RIR) { o.Data = data } // WriteToRequest writes these params to a swagger request -func (o *IPAMRirsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamRirsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_rirs_create_responses.go b/netbox/client/ipam/ipam_rirs_create_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_rirs_create_responses.go rename to netbox/client/ipam/ipam_rirs_create_responses.go index e5a859686b2a3e694c274742bac0213db00d0d9d..700197782280079199416aff7d9756e9106cdc76 100644 --- a/netbox/client/ipam/ip_a_m_rirs_create_responses.go +++ b/netbox/client/ipam/ipam_rirs_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMRirsCreateReader is a Reader for the IPAMRirsCreate structure. -type IPAMRirsCreateReader struct { +// IpamRirsCreateReader is a Reader for the IpamRirsCreate structure. +type IpamRirsCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMRirsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamRirsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: - result := NewIPAMRirsCreateCreated() + result := NewIpamRirsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMRirsCreateReader) ReadResponse(response runtime.ClientResponse, con } } -// NewIPAMRirsCreateCreated creates a IPAMRirsCreateCreated with default headers values -func NewIPAMRirsCreateCreated() *IPAMRirsCreateCreated { - return &IPAMRirsCreateCreated{} +// NewIpamRirsCreateCreated creates a IpamRirsCreateCreated with default headers values +func NewIpamRirsCreateCreated() *IpamRirsCreateCreated { + return &IpamRirsCreateCreated{} } -/*IPAMRirsCreateCreated handles this case with default header values. +/*IpamRirsCreateCreated handles this case with default header values. -IPAMRirsCreateCreated ipam rirs create created +IpamRirsCreateCreated ipam rirs create created */ -type IPAMRirsCreateCreated struct { +type IpamRirsCreateCreated struct { Payload *models.RIR } -func (o *IPAMRirsCreateCreated) Error() string { +func (o *IpamRirsCreateCreated) Error() string { return fmt.Sprintf("[POST /ipam/rirs/][%d] ipamRirsCreateCreated %+v", 201, o.Payload) } -func (o *IPAMRirsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamRirsCreateCreated) GetPayload() *models.RIR { + return o.Payload +} + +func (o *IpamRirsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RIR) diff --git a/netbox/client/ipam/ip_a_m_rirs_delete_parameters.go b/netbox/client/ipam/ipam_rirs_delete_parameters.go similarity index 66% rename from netbox/client/ipam/ip_a_m_rirs_delete_parameters.go rename to netbox/client/ipam/ipam_rirs_delete_parameters.go index 29b4a75770b8e51b9d4841298f0c8b930f39c7a7..a6e07e7292764004cd4d500d94dbed2f1e90b29a 100644 --- a/netbox/client/ipam/ip_a_m_rirs_delete_parameters.go +++ b/netbox/client/ipam/ipam_rirs_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMRirsDeleteParams creates a new IPAMRirsDeleteParams object +// NewIpamRirsDeleteParams creates a new IpamRirsDeleteParams object // with the default values initialized. -func NewIPAMRirsDeleteParams() *IPAMRirsDeleteParams { +func NewIpamRirsDeleteParams() *IpamRirsDeleteParams { var () - return &IPAMRirsDeleteParams{ + return &IpamRirsDeleteParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMRirsDeleteParamsWithTimeout creates a new IPAMRirsDeleteParams object +// NewIpamRirsDeleteParamsWithTimeout creates a new IpamRirsDeleteParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMRirsDeleteParamsWithTimeout(timeout time.Duration) *IPAMRirsDeleteParams { +func NewIpamRirsDeleteParamsWithTimeout(timeout time.Duration) *IpamRirsDeleteParams { var () - return &IPAMRirsDeleteParams{ + return &IpamRirsDeleteParams{ timeout: timeout, } } -// NewIPAMRirsDeleteParamsWithContext creates a new IPAMRirsDeleteParams object +// NewIpamRirsDeleteParamsWithContext creates a new IpamRirsDeleteParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMRirsDeleteParamsWithContext(ctx context.Context) *IPAMRirsDeleteParams { +func NewIpamRirsDeleteParamsWithContext(ctx context.Context) *IpamRirsDeleteParams { var () - return &IPAMRirsDeleteParams{ + return &IpamRirsDeleteParams{ Context: ctx, } } -// NewIPAMRirsDeleteParamsWithHTTPClient creates a new IPAMRirsDeleteParams object +// NewIpamRirsDeleteParamsWithHTTPClient creates a new IpamRirsDeleteParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMRirsDeleteParamsWithHTTPClient(client *http.Client) *IPAMRirsDeleteParams { +func NewIpamRirsDeleteParamsWithHTTPClient(client *http.Client) *IpamRirsDeleteParams { var () - return &IPAMRirsDeleteParams{ + return &IpamRirsDeleteParams{ HTTPClient: client, } } -/*IPAMRirsDeleteParams contains all the parameters to send to the API endpoint +/*IpamRirsDeleteParams contains all the parameters to send to the API endpoint for the ipam rirs delete operation typically these are written to a http.Request */ -type IPAMRirsDeleteParams struct { +type IpamRirsDeleteParams struct { /*ID A unique integer value identifying this RIR. @@ -88,51 +89,51 @@ type IPAMRirsDeleteParams struct { } // WithTimeout adds the timeout to the ipam rirs delete params -func (o *IPAMRirsDeleteParams) WithTimeout(timeout time.Duration) *IPAMRirsDeleteParams { +func (o *IpamRirsDeleteParams) WithTimeout(timeout time.Duration) *IpamRirsDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam rirs delete params -func (o *IPAMRirsDeleteParams) SetTimeout(timeout time.Duration) { +func (o *IpamRirsDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam rirs delete params -func (o *IPAMRirsDeleteParams) WithContext(ctx context.Context) *IPAMRirsDeleteParams { +func (o *IpamRirsDeleteParams) WithContext(ctx context.Context) *IpamRirsDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam rirs delete params -func (o *IPAMRirsDeleteParams) SetContext(ctx context.Context) { +func (o *IpamRirsDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam rirs delete params -func (o *IPAMRirsDeleteParams) WithHTTPClient(client *http.Client) *IPAMRirsDeleteParams { +func (o *IpamRirsDeleteParams) WithHTTPClient(client *http.Client) *IpamRirsDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam rirs delete params -func (o *IPAMRirsDeleteParams) SetHTTPClient(client *http.Client) { +func (o *IpamRirsDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam rirs delete params -func (o *IPAMRirsDeleteParams) WithID(id int64) *IPAMRirsDeleteParams { +func (o *IpamRirsDeleteParams) WithID(id int64) *IpamRirsDeleteParams { o.SetID(id) return o } // SetID adds the id to the ipam rirs delete params -func (o *IPAMRirsDeleteParams) SetID(id int64) { +func (o *IpamRirsDeleteParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMRirsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamRirsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_rirs_delete_responses.go b/netbox/client/ipam/ipam_rirs_delete_responses.go similarity index 70% rename from netbox/client/ipam/ip_a_m_rirs_delete_responses.go rename to netbox/client/ipam/ipam_rirs_delete_responses.go index 2aeebcb451d1a1496bb1c2259b8e03b121b59844..d5c38babd77cfca53252e5bb22fc84ff7d7cd030 100644 --- a/netbox/client/ipam/ip_a_m_rirs_delete_responses.go +++ b/netbox/client/ipam/ipam_rirs_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,17 +28,16 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// IPAMRirsDeleteReader is a Reader for the IPAMRirsDelete structure. -type IPAMRirsDeleteReader struct { +// IpamRirsDeleteReader is a Reader for the IpamRirsDelete structure. +type IpamRirsDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMRirsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamRirsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: - result := NewIPAMRirsDeleteNoContent() + result := NewIpamRirsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -48,23 +48,23 @@ func (o *IPAMRirsDeleteReader) ReadResponse(response runtime.ClientResponse, con } } -// NewIPAMRirsDeleteNoContent creates a IPAMRirsDeleteNoContent with default headers values -func NewIPAMRirsDeleteNoContent() *IPAMRirsDeleteNoContent { - return &IPAMRirsDeleteNoContent{} +// NewIpamRirsDeleteNoContent creates a IpamRirsDeleteNoContent with default headers values +func NewIpamRirsDeleteNoContent() *IpamRirsDeleteNoContent { + return &IpamRirsDeleteNoContent{} } -/*IPAMRirsDeleteNoContent handles this case with default header values. +/*IpamRirsDeleteNoContent handles this case with default header values. -IPAMRirsDeleteNoContent ipam rirs delete no content +IpamRirsDeleteNoContent ipam rirs delete no content */ -type IPAMRirsDeleteNoContent struct { +type IpamRirsDeleteNoContent struct { } -func (o *IPAMRirsDeleteNoContent) Error() string { +func (o *IpamRirsDeleteNoContent) Error() string { return fmt.Sprintf("[DELETE /ipam/rirs/{id}/][%d] ipamRirsDeleteNoContent ", 204) } -func (o *IPAMRirsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamRirsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/ipam/ip_a_m_rirs_list_parameters.go b/netbox/client/ipam/ipam_rirs_list_parameters.go similarity index 73% rename from netbox/client/ipam/ip_a_m_rirs_list_parameters.go rename to netbox/client/ipam/ipam_rirs_list_parameters.go index 2c84d3dff402e682d6fb3f60bbfee89d32952fe4..3b8617132059e8e74571fa0db1c80438dc2e5074 100644 --- a/netbox/client/ipam/ip_a_m_rirs_list_parameters.go +++ b/netbox/client/ipam/ipam_rirs_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMRirsListParams creates a new IPAMRirsListParams object +// NewIpamRirsListParams creates a new IpamRirsListParams object // with the default values initialized. -func NewIPAMRirsListParams() *IPAMRirsListParams { +func NewIpamRirsListParams() *IpamRirsListParams { var () - return &IPAMRirsListParams{ + return &IpamRirsListParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMRirsListParamsWithTimeout creates a new IPAMRirsListParams object +// NewIpamRirsListParamsWithTimeout creates a new IpamRirsListParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMRirsListParamsWithTimeout(timeout time.Duration) *IPAMRirsListParams { +func NewIpamRirsListParamsWithTimeout(timeout time.Duration) *IpamRirsListParams { var () - return &IPAMRirsListParams{ + return &IpamRirsListParams{ timeout: timeout, } } -// NewIPAMRirsListParamsWithContext creates a new IPAMRirsListParams object +// NewIpamRirsListParamsWithContext creates a new IpamRirsListParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMRirsListParamsWithContext(ctx context.Context) *IPAMRirsListParams { +func NewIpamRirsListParamsWithContext(ctx context.Context) *IpamRirsListParams { var () - return &IPAMRirsListParams{ + return &IpamRirsListParams{ Context: ctx, } } -// NewIPAMRirsListParamsWithHTTPClient creates a new IPAMRirsListParams object +// NewIpamRirsListParamsWithHTTPClient creates a new IpamRirsListParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMRirsListParamsWithHTTPClient(client *http.Client) *IPAMRirsListParams { +func NewIpamRirsListParamsWithHTTPClient(client *http.Client) *IpamRirsListParams { var () - return &IPAMRirsListParams{ + return &IpamRirsListParams{ HTTPClient: client, } } -/*IPAMRirsListParams contains all the parameters to send to the API endpoint +/*IpamRirsListParams contains all the parameters to send to the API endpoint for the ipam rirs list operation typically these are written to a http.Request */ -type IPAMRirsListParams struct { +type IpamRirsListParams struct { /*IDIn Multiple values may be separated by commas. @@ -106,117 +107,117 @@ type IPAMRirsListParams struct { } // WithTimeout adds the timeout to the ipam rirs list params -func (o *IPAMRirsListParams) WithTimeout(timeout time.Duration) *IPAMRirsListParams { +func (o *IpamRirsListParams) WithTimeout(timeout time.Duration) *IpamRirsListParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam rirs list params -func (o *IPAMRirsListParams) SetTimeout(timeout time.Duration) { +func (o *IpamRirsListParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam rirs list params -func (o *IPAMRirsListParams) WithContext(ctx context.Context) *IPAMRirsListParams { +func (o *IpamRirsListParams) WithContext(ctx context.Context) *IpamRirsListParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam rirs list params -func (o *IPAMRirsListParams) SetContext(ctx context.Context) { +func (o *IpamRirsListParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam rirs list params -func (o *IPAMRirsListParams) WithHTTPClient(client *http.Client) *IPAMRirsListParams { +func (o *IpamRirsListParams) WithHTTPClient(client *http.Client) *IpamRirsListParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam rirs list params -func (o *IPAMRirsListParams) SetHTTPClient(client *http.Client) { +func (o *IpamRirsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithIDIn adds the iDIn to the ipam rirs list params -func (o *IPAMRirsListParams) WithIDIn(iDIn *string) *IPAMRirsListParams { +func (o *IpamRirsListParams) WithIDIn(iDIn *string) *IpamRirsListParams { o.SetIDIn(iDIn) return o } // SetIDIn adds the idIn to the ipam rirs list params -func (o *IPAMRirsListParams) SetIDIn(iDIn *string) { +func (o *IpamRirsListParams) SetIDIn(iDIn *string) { o.IDIn = iDIn } // WithIsPrivate adds the isPrivate to the ipam rirs list params -func (o *IPAMRirsListParams) WithIsPrivate(isPrivate *string) *IPAMRirsListParams { +func (o *IpamRirsListParams) WithIsPrivate(isPrivate *string) *IpamRirsListParams { o.SetIsPrivate(isPrivate) return o } // SetIsPrivate adds the isPrivate to the ipam rirs list params -func (o *IPAMRirsListParams) SetIsPrivate(isPrivate *string) { +func (o *IpamRirsListParams) SetIsPrivate(isPrivate *string) { o.IsPrivate = isPrivate } // WithLimit adds the limit to the ipam rirs list params -func (o *IPAMRirsListParams) WithLimit(limit *int64) *IPAMRirsListParams { +func (o *IpamRirsListParams) WithLimit(limit *int64) *IpamRirsListParams { o.SetLimit(limit) return o } // SetLimit adds the limit to the ipam rirs list params -func (o *IPAMRirsListParams) SetLimit(limit *int64) { +func (o *IpamRirsListParams) SetLimit(limit *int64) { o.Limit = limit } // WithName adds the name to the ipam rirs list params -func (o *IPAMRirsListParams) WithName(name *string) *IPAMRirsListParams { +func (o *IpamRirsListParams) WithName(name *string) *IpamRirsListParams { o.SetName(name) return o } // SetName adds the name to the ipam rirs list params -func (o *IPAMRirsListParams) SetName(name *string) { +func (o *IpamRirsListParams) SetName(name *string) { o.Name = name } // WithOffset adds the offset to the ipam rirs list params -func (o *IPAMRirsListParams) WithOffset(offset *int64) *IPAMRirsListParams { +func (o *IpamRirsListParams) WithOffset(offset *int64) *IpamRirsListParams { o.SetOffset(offset) return o } // SetOffset adds the offset to the ipam rirs list params -func (o *IPAMRirsListParams) SetOffset(offset *int64) { +func (o *IpamRirsListParams) SetOffset(offset *int64) { o.Offset = offset } // WithQ adds the q to the ipam rirs list params -func (o *IPAMRirsListParams) WithQ(q *string) *IPAMRirsListParams { +func (o *IpamRirsListParams) WithQ(q *string) *IpamRirsListParams { o.SetQ(q) return o } // SetQ adds the q to the ipam rirs list params -func (o *IPAMRirsListParams) SetQ(q *string) { +func (o *IpamRirsListParams) SetQ(q *string) { o.Q = q } // WithSlug adds the slug to the ipam rirs list params -func (o *IPAMRirsListParams) WithSlug(slug *string) *IPAMRirsListParams { +func (o *IpamRirsListParams) WithSlug(slug *string) *IpamRirsListParams { o.SetSlug(slug) return o } // SetSlug adds the slug to the ipam rirs list params -func (o *IPAMRirsListParams) SetSlug(slug *string) { +func (o *IpamRirsListParams) SetSlug(slug *string) { o.Slug = slug } // WriteToRequest writes these params to a swagger request -func (o *IPAMRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_rirs_list_responses.go b/netbox/client/ipam/ipam_rirs_list_responses.go similarity index 72% rename from netbox/client/ipam/ip_a_m_rirs_list_responses.go rename to netbox/client/ipam/ipam_rirs_list_responses.go index 97a296f9803f65364c0f30cd6230f3e04c42b590..e0e31da2d5b9bdf40df63db355c8bb204792c9df 100644 --- a/netbox/client/ipam/ip_a_m_rirs_list_responses.go +++ b/netbox/client/ipam/ipam_rirs_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,20 +32,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMRirsListReader is a Reader for the IPAMRirsList structure. -type IPAMRirsListReader struct { +// IpamRirsListReader is a Reader for the IpamRirsList structure. +type IpamRirsListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMRirsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamRirsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMRirsListOK() + result := NewIpamRirsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -55,26 +55,30 @@ func (o *IPAMRirsListReader) ReadResponse(response runtime.ClientResponse, consu } } -// NewIPAMRirsListOK creates a IPAMRirsListOK with default headers values -func NewIPAMRirsListOK() *IPAMRirsListOK { - return &IPAMRirsListOK{} +// NewIpamRirsListOK creates a IpamRirsListOK with default headers values +func NewIpamRirsListOK() *IpamRirsListOK { + return &IpamRirsListOK{} } -/*IPAMRirsListOK handles this case with default header values. +/*IpamRirsListOK handles this case with default header values. -IPAMRirsListOK ipam rirs list o k +IpamRirsListOK ipam rirs list o k */ -type IPAMRirsListOK struct { - Payload *IPAMRirsListOKBody +type IpamRirsListOK struct { + Payload *IpamRirsListOKBody } -func (o *IPAMRirsListOK) Error() string { +func (o *IpamRirsListOK) Error() string { return fmt.Sprintf("[GET /ipam/rirs/][%d] ipamRirsListOK %+v", 200, o.Payload) } -func (o *IPAMRirsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamRirsListOK) GetPayload() *IpamRirsListOKBody { + return o.Payload +} + +func (o *IpamRirsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(IPAMRirsListOKBody) + o.Payload = new(IpamRirsListOKBody) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -84,10 +88,10 @@ func (o *IPAMRirsListOK) readResponse(response runtime.ClientResponse, consumer return nil } -/*IPAMRirsListOKBody IP a m rirs list o k body -swagger:model IPAMRirsListOKBody +/*IpamRirsListOKBody ipam rirs list o k body +swagger:model IpamRirsListOKBody */ -type IPAMRirsListOKBody struct { +type IpamRirsListOKBody struct { // count // Required: true @@ -106,8 +110,8 @@ type IPAMRirsListOKBody struct { Results []*models.RIR `json:"results"` } -// Validate validates this IP a m rirs list o k body -func (o *IPAMRirsListOKBody) Validate(formats strfmt.Registry) error { +// Validate validates this ipam rirs list o k body +func (o *IpamRirsListOKBody) Validate(formats strfmt.Registry) error { var res []error if err := o.validateCount(formats); err != nil { @@ -132,7 +136,7 @@ func (o *IPAMRirsListOKBody) Validate(formats strfmt.Registry) error { return nil } -func (o *IPAMRirsListOKBody) validateCount(formats strfmt.Registry) error { +func (o *IpamRirsListOKBody) validateCount(formats strfmt.Registry) error { if err := validate.Required("ipamRirsListOK"+"."+"count", "body", o.Count); err != nil { return err @@ -141,7 +145,7 @@ func (o *IPAMRirsListOKBody) validateCount(formats strfmt.Registry) error { return nil } -func (o *IPAMRirsListOKBody) validateNext(formats strfmt.Registry) error { +func (o *IpamRirsListOKBody) validateNext(formats strfmt.Registry) error { if swag.IsZero(o.Next) { // not required return nil @@ -154,7 +158,7 @@ func (o *IPAMRirsListOKBody) validateNext(formats strfmt.Registry) error { return nil } -func (o *IPAMRirsListOKBody) validatePrevious(formats strfmt.Registry) error { +func (o *IpamRirsListOKBody) validatePrevious(formats strfmt.Registry) error { if swag.IsZero(o.Previous) { // not required return nil @@ -167,7 +171,7 @@ func (o *IPAMRirsListOKBody) validatePrevious(formats strfmt.Registry) error { return nil } -func (o *IPAMRirsListOKBody) validateResults(formats strfmt.Registry) error { +func (o *IpamRirsListOKBody) validateResults(formats strfmt.Registry) error { if err := validate.Required("ipamRirsListOK"+"."+"results", "body", o.Results); err != nil { return err @@ -193,7 +197,7 @@ func (o *IPAMRirsListOKBody) validateResults(formats strfmt.Registry) error { } // MarshalBinary interface implementation -func (o *IPAMRirsListOKBody) MarshalBinary() ([]byte, error) { +func (o *IpamRirsListOKBody) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -201,8 +205,8 @@ func (o *IPAMRirsListOKBody) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *IPAMRirsListOKBody) UnmarshalBinary(b []byte) error { - var res IPAMRirsListOKBody +func (o *IpamRirsListOKBody) UnmarshalBinary(b []byte) error { + var res IpamRirsListOKBody if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/netbox/client/ipam/ip_a_m_rirs_partial_update_parameters.go b/netbox/client/ipam/ipam_rirs_partial_update_parameters.go similarity index 64% rename from netbox/client/ipam/ip_a_m_rirs_partial_update_parameters.go rename to netbox/client/ipam/ipam_rirs_partial_update_parameters.go index abfd3e46435fc5d8e151cc5a30157878b79dd681..99f9531171e38957586bb347afe8341fe40057d7 100644 --- a/netbox/client/ipam/ip_a_m_rirs_partial_update_parameters.go +++ b/netbox/client/ipam/ipam_rirs_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMRirsPartialUpdateParams creates a new IPAMRirsPartialUpdateParams object +// NewIpamRirsPartialUpdateParams creates a new IpamRirsPartialUpdateParams object // with the default values initialized. -func NewIPAMRirsPartialUpdateParams() *IPAMRirsPartialUpdateParams { +func NewIpamRirsPartialUpdateParams() *IpamRirsPartialUpdateParams { var () - return &IPAMRirsPartialUpdateParams{ + return &IpamRirsPartialUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMRirsPartialUpdateParamsWithTimeout creates a new IPAMRirsPartialUpdateParams object +// NewIpamRirsPartialUpdateParamsWithTimeout creates a new IpamRirsPartialUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMRirsPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMRirsPartialUpdateParams { +func NewIpamRirsPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamRirsPartialUpdateParams { var () - return &IPAMRirsPartialUpdateParams{ + return &IpamRirsPartialUpdateParams{ timeout: timeout, } } -// NewIPAMRirsPartialUpdateParamsWithContext creates a new IPAMRirsPartialUpdateParams object +// NewIpamRirsPartialUpdateParamsWithContext creates a new IpamRirsPartialUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMRirsPartialUpdateParamsWithContext(ctx context.Context) *IPAMRirsPartialUpdateParams { +func NewIpamRirsPartialUpdateParamsWithContext(ctx context.Context) *IpamRirsPartialUpdateParams { var () - return &IPAMRirsPartialUpdateParams{ + return &IpamRirsPartialUpdateParams{ Context: ctx, } } -// NewIPAMRirsPartialUpdateParamsWithHTTPClient creates a new IPAMRirsPartialUpdateParams object +// NewIpamRirsPartialUpdateParamsWithHTTPClient creates a new IpamRirsPartialUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMRirsPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMRirsPartialUpdateParams { +func NewIpamRirsPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamRirsPartialUpdateParams { var () - return &IPAMRirsPartialUpdateParams{ + return &IpamRirsPartialUpdateParams{ HTTPClient: client, } } -/*IPAMRirsPartialUpdateParams contains all the parameters to send to the API endpoint +/*IpamRirsPartialUpdateParams contains all the parameters to send to the API endpoint for the ipam rirs partial update operation typically these are written to a http.Request */ -type IPAMRirsPartialUpdateParams struct { +type IpamRirsPartialUpdateParams struct { /*Data*/ Data *models.RIR @@ -92,62 +93,62 @@ type IPAMRirsPartialUpdateParams struct { } // WithTimeout adds the timeout to the ipam rirs partial update params -func (o *IPAMRirsPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMRirsPartialUpdateParams { +func (o *IpamRirsPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamRirsPartialUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam rirs partial update params -func (o *IPAMRirsPartialUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamRirsPartialUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam rirs partial update params -func (o *IPAMRirsPartialUpdateParams) WithContext(ctx context.Context) *IPAMRirsPartialUpdateParams { +func (o *IpamRirsPartialUpdateParams) WithContext(ctx context.Context) *IpamRirsPartialUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam rirs partial update params -func (o *IPAMRirsPartialUpdateParams) SetContext(ctx context.Context) { +func (o *IpamRirsPartialUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam rirs partial update params -func (o *IPAMRirsPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMRirsPartialUpdateParams { +func (o *IpamRirsPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamRirsPartialUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam rirs partial update params -func (o *IPAMRirsPartialUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamRirsPartialUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam rirs partial update params -func (o *IPAMRirsPartialUpdateParams) WithData(data *models.RIR) *IPAMRirsPartialUpdateParams { +func (o *IpamRirsPartialUpdateParams) WithData(data *models.RIR) *IpamRirsPartialUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam rirs partial update params -func (o *IPAMRirsPartialUpdateParams) SetData(data *models.RIR) { +func (o *IpamRirsPartialUpdateParams) SetData(data *models.RIR) { o.Data = data } // WithID adds the id to the ipam rirs partial update params -func (o *IPAMRirsPartialUpdateParams) WithID(id int64) *IPAMRirsPartialUpdateParams { +func (o *IpamRirsPartialUpdateParams) WithID(id int64) *IpamRirsPartialUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam rirs partial update params -func (o *IPAMRirsPartialUpdateParams) SetID(id int64) { +func (o *IpamRirsPartialUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMRirsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamRirsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_rirs_partial_update_responses.go b/netbox/client/ipam/ipam_rirs_partial_update_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_rirs_partial_update_responses.go rename to netbox/client/ipam/ipam_rirs_partial_update_responses.go index 0e672896bee10391f84655675ef9778829e84db7..f1b400473a11a8bd68fb3df61e3336c658c76338 100644 --- a/netbox/client/ipam/ip_a_m_rirs_partial_update_responses.go +++ b/netbox/client/ipam/ipam_rirs_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMRirsPartialUpdateReader is a Reader for the IPAMRirsPartialUpdate structure. -type IPAMRirsPartialUpdateReader struct { +// IpamRirsPartialUpdateReader is a Reader for the IpamRirsPartialUpdate structure. +type IpamRirsPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMRirsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamRirsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMRirsPartialUpdateOK() + result := NewIpamRirsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMRirsPartialUpdateReader) ReadResponse(response runtime.ClientRespon } } -// NewIPAMRirsPartialUpdateOK creates a IPAMRirsPartialUpdateOK with default headers values -func NewIPAMRirsPartialUpdateOK() *IPAMRirsPartialUpdateOK { - return &IPAMRirsPartialUpdateOK{} +// NewIpamRirsPartialUpdateOK creates a IpamRirsPartialUpdateOK with default headers values +func NewIpamRirsPartialUpdateOK() *IpamRirsPartialUpdateOK { + return &IpamRirsPartialUpdateOK{} } -/*IPAMRirsPartialUpdateOK handles this case with default header values. +/*IpamRirsPartialUpdateOK handles this case with default header values. -IPAMRirsPartialUpdateOK ipam rirs partial update o k +IpamRirsPartialUpdateOK ipam rirs partial update o k */ -type IPAMRirsPartialUpdateOK struct { +type IpamRirsPartialUpdateOK struct { Payload *models.RIR } -func (o *IPAMRirsPartialUpdateOK) Error() string { +func (o *IpamRirsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /ipam/rirs/{id}/][%d] ipamRirsPartialUpdateOK %+v", 200, o.Payload) } -func (o *IPAMRirsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamRirsPartialUpdateOK) GetPayload() *models.RIR { + return o.Payload +} + +func (o *IpamRirsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RIR) diff --git a/netbox/client/ipam/ip_a_m_rirs_read_parameters.go b/netbox/client/ipam/ipam_rirs_read_parameters.go similarity index 67% rename from netbox/client/ipam/ip_a_m_rirs_read_parameters.go rename to netbox/client/ipam/ipam_rirs_read_parameters.go index ef6fb46659526b6cff41962ec1651f89304d434a..bca3bb31853d614d06e4eca120411c0186e98330 100644 --- a/netbox/client/ipam/ip_a_m_rirs_read_parameters.go +++ b/netbox/client/ipam/ipam_rirs_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMRirsReadParams creates a new IPAMRirsReadParams object +// NewIpamRirsReadParams creates a new IpamRirsReadParams object // with the default values initialized. -func NewIPAMRirsReadParams() *IPAMRirsReadParams { +func NewIpamRirsReadParams() *IpamRirsReadParams { var () - return &IPAMRirsReadParams{ + return &IpamRirsReadParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMRirsReadParamsWithTimeout creates a new IPAMRirsReadParams object +// NewIpamRirsReadParamsWithTimeout creates a new IpamRirsReadParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMRirsReadParamsWithTimeout(timeout time.Duration) *IPAMRirsReadParams { +func NewIpamRirsReadParamsWithTimeout(timeout time.Duration) *IpamRirsReadParams { var () - return &IPAMRirsReadParams{ + return &IpamRirsReadParams{ timeout: timeout, } } -// NewIPAMRirsReadParamsWithContext creates a new IPAMRirsReadParams object +// NewIpamRirsReadParamsWithContext creates a new IpamRirsReadParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMRirsReadParamsWithContext(ctx context.Context) *IPAMRirsReadParams { +func NewIpamRirsReadParamsWithContext(ctx context.Context) *IpamRirsReadParams { var () - return &IPAMRirsReadParams{ + return &IpamRirsReadParams{ Context: ctx, } } -// NewIPAMRirsReadParamsWithHTTPClient creates a new IPAMRirsReadParams object +// NewIpamRirsReadParamsWithHTTPClient creates a new IpamRirsReadParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMRirsReadParamsWithHTTPClient(client *http.Client) *IPAMRirsReadParams { +func NewIpamRirsReadParamsWithHTTPClient(client *http.Client) *IpamRirsReadParams { var () - return &IPAMRirsReadParams{ + return &IpamRirsReadParams{ HTTPClient: client, } } -/*IPAMRirsReadParams contains all the parameters to send to the API endpoint +/*IpamRirsReadParams contains all the parameters to send to the API endpoint for the ipam rirs read operation typically these are written to a http.Request */ -type IPAMRirsReadParams struct { +type IpamRirsReadParams struct { /*ID A unique integer value identifying this RIR. @@ -88,51 +89,51 @@ type IPAMRirsReadParams struct { } // WithTimeout adds the timeout to the ipam rirs read params -func (o *IPAMRirsReadParams) WithTimeout(timeout time.Duration) *IPAMRirsReadParams { +func (o *IpamRirsReadParams) WithTimeout(timeout time.Duration) *IpamRirsReadParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam rirs read params -func (o *IPAMRirsReadParams) SetTimeout(timeout time.Duration) { +func (o *IpamRirsReadParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam rirs read params -func (o *IPAMRirsReadParams) WithContext(ctx context.Context) *IPAMRirsReadParams { +func (o *IpamRirsReadParams) WithContext(ctx context.Context) *IpamRirsReadParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam rirs read params -func (o *IPAMRirsReadParams) SetContext(ctx context.Context) { +func (o *IpamRirsReadParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam rirs read params -func (o *IPAMRirsReadParams) WithHTTPClient(client *http.Client) *IPAMRirsReadParams { +func (o *IpamRirsReadParams) WithHTTPClient(client *http.Client) *IpamRirsReadParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam rirs read params -func (o *IPAMRirsReadParams) SetHTTPClient(client *http.Client) { +func (o *IpamRirsReadParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam rirs read params -func (o *IPAMRirsReadParams) WithID(id int64) *IPAMRirsReadParams { +func (o *IpamRirsReadParams) WithID(id int64) *IpamRirsReadParams { o.SetID(id) return o } // SetID adds the id to the ipam rirs read params -func (o *IPAMRirsReadParams) SetID(id int64) { +func (o *IpamRirsReadParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMRirsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamRirsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_rirs_read_responses.go b/netbox/client/ipam/ipam_rirs_read_responses.go similarity index 70% rename from netbox/client/ipam/ip_a_m_rirs_read_responses.go rename to netbox/client/ipam/ipam_rirs_read_responses.go index 269abd00d194355a5ec70959c18264793b8717b7..3326f865221f562e426260816b7a2a67e2e091f2 100644 --- a/netbox/client/ipam/ip_a_m_rirs_read_responses.go +++ b/netbox/client/ipam/ipam_rirs_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMRirsReadReader is a Reader for the IPAMRirsRead structure. -type IPAMRirsReadReader struct { +// IpamRirsReadReader is a Reader for the IpamRirsRead structure. +type IpamRirsReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMRirsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamRirsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMRirsReadOK() + result := NewIpamRirsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMRirsReadReader) ReadResponse(response runtime.ClientResponse, consu } } -// NewIPAMRirsReadOK creates a IPAMRirsReadOK with default headers values -func NewIPAMRirsReadOK() *IPAMRirsReadOK { - return &IPAMRirsReadOK{} +// NewIpamRirsReadOK creates a IpamRirsReadOK with default headers values +func NewIpamRirsReadOK() *IpamRirsReadOK { + return &IpamRirsReadOK{} } -/*IPAMRirsReadOK handles this case with default header values. +/*IpamRirsReadOK handles this case with default header values. -IPAMRirsReadOK ipam rirs read o k +IpamRirsReadOK ipam rirs read o k */ -type IPAMRirsReadOK struct { +type IpamRirsReadOK struct { Payload *models.RIR } -func (o *IPAMRirsReadOK) Error() string { +func (o *IpamRirsReadOK) Error() string { return fmt.Sprintf("[GET /ipam/rirs/{id}/][%d] ipamRirsReadOK %+v", 200, o.Payload) } -func (o *IPAMRirsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamRirsReadOK) GetPayload() *models.RIR { + return o.Payload +} + +func (o *IpamRirsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RIR) diff --git a/netbox/client/ipam/ip_a_m_rirs_update_parameters.go b/netbox/client/ipam/ipam_rirs_update_parameters.go similarity index 66% rename from netbox/client/ipam/ip_a_m_rirs_update_parameters.go rename to netbox/client/ipam/ipam_rirs_update_parameters.go index 0efa374d32951cfdc392fd9a12529899acadf46b..d2681f1f64e95bad9d661ca491a9a2b0950b0cb9 100644 --- a/netbox/client/ipam/ip_a_m_rirs_update_parameters.go +++ b/netbox/client/ipam/ipam_rirs_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMRirsUpdateParams creates a new IPAMRirsUpdateParams object +// NewIpamRirsUpdateParams creates a new IpamRirsUpdateParams object // with the default values initialized. -func NewIPAMRirsUpdateParams() *IPAMRirsUpdateParams { +func NewIpamRirsUpdateParams() *IpamRirsUpdateParams { var () - return &IPAMRirsUpdateParams{ + return &IpamRirsUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMRirsUpdateParamsWithTimeout creates a new IPAMRirsUpdateParams object +// NewIpamRirsUpdateParamsWithTimeout creates a new IpamRirsUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMRirsUpdateParamsWithTimeout(timeout time.Duration) *IPAMRirsUpdateParams { +func NewIpamRirsUpdateParamsWithTimeout(timeout time.Duration) *IpamRirsUpdateParams { var () - return &IPAMRirsUpdateParams{ + return &IpamRirsUpdateParams{ timeout: timeout, } } -// NewIPAMRirsUpdateParamsWithContext creates a new IPAMRirsUpdateParams object +// NewIpamRirsUpdateParamsWithContext creates a new IpamRirsUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMRirsUpdateParamsWithContext(ctx context.Context) *IPAMRirsUpdateParams { +func NewIpamRirsUpdateParamsWithContext(ctx context.Context) *IpamRirsUpdateParams { var () - return &IPAMRirsUpdateParams{ + return &IpamRirsUpdateParams{ Context: ctx, } } -// NewIPAMRirsUpdateParamsWithHTTPClient creates a new IPAMRirsUpdateParams object +// NewIpamRirsUpdateParamsWithHTTPClient creates a new IpamRirsUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMRirsUpdateParamsWithHTTPClient(client *http.Client) *IPAMRirsUpdateParams { +func NewIpamRirsUpdateParamsWithHTTPClient(client *http.Client) *IpamRirsUpdateParams { var () - return &IPAMRirsUpdateParams{ + return &IpamRirsUpdateParams{ HTTPClient: client, } } -/*IPAMRirsUpdateParams contains all the parameters to send to the API endpoint +/*IpamRirsUpdateParams contains all the parameters to send to the API endpoint for the ipam rirs update operation typically these are written to a http.Request */ -type IPAMRirsUpdateParams struct { +type IpamRirsUpdateParams struct { /*Data*/ Data *models.RIR @@ -92,62 +93,62 @@ type IPAMRirsUpdateParams struct { } // WithTimeout adds the timeout to the ipam rirs update params -func (o *IPAMRirsUpdateParams) WithTimeout(timeout time.Duration) *IPAMRirsUpdateParams { +func (o *IpamRirsUpdateParams) WithTimeout(timeout time.Duration) *IpamRirsUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam rirs update params -func (o *IPAMRirsUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamRirsUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam rirs update params -func (o *IPAMRirsUpdateParams) WithContext(ctx context.Context) *IPAMRirsUpdateParams { +func (o *IpamRirsUpdateParams) WithContext(ctx context.Context) *IpamRirsUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam rirs update params -func (o *IPAMRirsUpdateParams) SetContext(ctx context.Context) { +func (o *IpamRirsUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam rirs update params -func (o *IPAMRirsUpdateParams) WithHTTPClient(client *http.Client) *IPAMRirsUpdateParams { +func (o *IpamRirsUpdateParams) WithHTTPClient(client *http.Client) *IpamRirsUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam rirs update params -func (o *IPAMRirsUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamRirsUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam rirs update params -func (o *IPAMRirsUpdateParams) WithData(data *models.RIR) *IPAMRirsUpdateParams { +func (o *IpamRirsUpdateParams) WithData(data *models.RIR) *IpamRirsUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam rirs update params -func (o *IPAMRirsUpdateParams) SetData(data *models.RIR) { +func (o *IpamRirsUpdateParams) SetData(data *models.RIR) { o.Data = data } // WithID adds the id to the ipam rirs update params -func (o *IPAMRirsUpdateParams) WithID(id int64) *IPAMRirsUpdateParams { +func (o *IpamRirsUpdateParams) WithID(id int64) *IpamRirsUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam rirs update params -func (o *IPAMRirsUpdateParams) SetID(id int64) { +func (o *IpamRirsUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMRirsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamRirsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_rirs_update_responses.go b/netbox/client/ipam/ipam_rirs_update_responses.go similarity index 70% rename from netbox/client/ipam/ip_a_m_rirs_update_responses.go rename to netbox/client/ipam/ipam_rirs_update_responses.go index f7dd3d91a702cb28259670d1ac2bf430924eda81..2b8bd6f237ef74bc4b828f7599380a2465f745bb 100644 --- a/netbox/client/ipam/ip_a_m_rirs_update_responses.go +++ b/netbox/client/ipam/ipam_rirs_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMRirsUpdateReader is a Reader for the IPAMRirsUpdate structure. -type IPAMRirsUpdateReader struct { +// IpamRirsUpdateReader is a Reader for the IpamRirsUpdate structure. +type IpamRirsUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMRirsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamRirsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMRirsUpdateOK() + result := NewIpamRirsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMRirsUpdateReader) ReadResponse(response runtime.ClientResponse, con } } -// NewIPAMRirsUpdateOK creates a IPAMRirsUpdateOK with default headers values -func NewIPAMRirsUpdateOK() *IPAMRirsUpdateOK { - return &IPAMRirsUpdateOK{} +// NewIpamRirsUpdateOK creates a IpamRirsUpdateOK with default headers values +func NewIpamRirsUpdateOK() *IpamRirsUpdateOK { + return &IpamRirsUpdateOK{} } -/*IPAMRirsUpdateOK handles this case with default header values. +/*IpamRirsUpdateOK handles this case with default header values. -IPAMRirsUpdateOK ipam rirs update o k +IpamRirsUpdateOK ipam rirs update o k */ -type IPAMRirsUpdateOK struct { +type IpamRirsUpdateOK struct { Payload *models.RIR } -func (o *IPAMRirsUpdateOK) Error() string { +func (o *IpamRirsUpdateOK) Error() string { return fmt.Sprintf("[PUT /ipam/rirs/{id}/][%d] ipamRirsUpdateOK %+v", 200, o.Payload) } -func (o *IPAMRirsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamRirsUpdateOK) GetPayload() *models.RIR { + return o.Payload +} + +func (o *IpamRirsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RIR) diff --git a/netbox/client/ipam/ip_a_m_roles_create_parameters.go b/netbox/client/ipam/ipam_roles_create_parameters.go similarity index 64% rename from netbox/client/ipam/ip_a_m_roles_create_parameters.go rename to netbox/client/ipam/ipam_roles_create_parameters.go index 1d2ab391855879b56bb764e8989dc93b31b9b769..3c7004b923f2ec7d31c48e1b9dfd93ae6040b5b8 100644 --- a/netbox/client/ipam/ip_a_m_roles_create_parameters.go +++ b/netbox/client/ipam/ipam_roles_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -30,52 +31,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMRolesCreateParams creates a new IPAMRolesCreateParams object +// NewIpamRolesCreateParams creates a new IpamRolesCreateParams object // with the default values initialized. -func NewIPAMRolesCreateParams() *IPAMRolesCreateParams { +func NewIpamRolesCreateParams() *IpamRolesCreateParams { var () - return &IPAMRolesCreateParams{ + return &IpamRolesCreateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMRolesCreateParamsWithTimeout creates a new IPAMRolesCreateParams object +// NewIpamRolesCreateParamsWithTimeout creates a new IpamRolesCreateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMRolesCreateParamsWithTimeout(timeout time.Duration) *IPAMRolesCreateParams { +func NewIpamRolesCreateParamsWithTimeout(timeout time.Duration) *IpamRolesCreateParams { var () - return &IPAMRolesCreateParams{ + return &IpamRolesCreateParams{ timeout: timeout, } } -// NewIPAMRolesCreateParamsWithContext creates a new IPAMRolesCreateParams object +// NewIpamRolesCreateParamsWithContext creates a new IpamRolesCreateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMRolesCreateParamsWithContext(ctx context.Context) *IPAMRolesCreateParams { +func NewIpamRolesCreateParamsWithContext(ctx context.Context) *IpamRolesCreateParams { var () - return &IPAMRolesCreateParams{ + return &IpamRolesCreateParams{ Context: ctx, } } -// NewIPAMRolesCreateParamsWithHTTPClient creates a new IPAMRolesCreateParams object +// NewIpamRolesCreateParamsWithHTTPClient creates a new IpamRolesCreateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMRolesCreateParamsWithHTTPClient(client *http.Client) *IPAMRolesCreateParams { +func NewIpamRolesCreateParamsWithHTTPClient(client *http.Client) *IpamRolesCreateParams { var () - return &IPAMRolesCreateParams{ + return &IpamRolesCreateParams{ HTTPClient: client, } } -/*IPAMRolesCreateParams contains all the parameters to send to the API endpoint +/*IpamRolesCreateParams contains all the parameters to send to the API endpoint for the ipam roles create operation typically these are written to a http.Request */ -type IPAMRolesCreateParams struct { +type IpamRolesCreateParams struct { /*Data*/ Data *models.Role @@ -86,51 +87,51 @@ type IPAMRolesCreateParams struct { } // WithTimeout adds the timeout to the ipam roles create params -func (o *IPAMRolesCreateParams) WithTimeout(timeout time.Duration) *IPAMRolesCreateParams { +func (o *IpamRolesCreateParams) WithTimeout(timeout time.Duration) *IpamRolesCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam roles create params -func (o *IPAMRolesCreateParams) SetTimeout(timeout time.Duration) { +func (o *IpamRolesCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam roles create params -func (o *IPAMRolesCreateParams) WithContext(ctx context.Context) *IPAMRolesCreateParams { +func (o *IpamRolesCreateParams) WithContext(ctx context.Context) *IpamRolesCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam roles create params -func (o *IPAMRolesCreateParams) SetContext(ctx context.Context) { +func (o *IpamRolesCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam roles create params -func (o *IPAMRolesCreateParams) WithHTTPClient(client *http.Client) *IPAMRolesCreateParams { +func (o *IpamRolesCreateParams) WithHTTPClient(client *http.Client) *IpamRolesCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam roles create params -func (o *IPAMRolesCreateParams) SetHTTPClient(client *http.Client) { +func (o *IpamRolesCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam roles create params -func (o *IPAMRolesCreateParams) WithData(data *models.Role) *IPAMRolesCreateParams { +func (o *IpamRolesCreateParams) WithData(data *models.Role) *IpamRolesCreateParams { o.SetData(data) return o } // SetData adds the data to the ipam roles create params -func (o *IPAMRolesCreateParams) SetData(data *models.Role) { +func (o *IpamRolesCreateParams) SetData(data *models.Role) { o.Data = data } // WriteToRequest writes these params to a swagger request -func (o *IPAMRolesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamRolesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_roles_create_responses.go b/netbox/client/ipam/ipam_roles_create_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_roles_create_responses.go rename to netbox/client/ipam/ipam_roles_create_responses.go index ac0f0b6229bd05b7628ddf014f9016eecebdff86..735defbffcc23a99835acaaa4c334096e987ae10 100644 --- a/netbox/client/ipam/ip_a_m_roles_create_responses.go +++ b/netbox/client/ipam/ipam_roles_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMRolesCreateReader is a Reader for the IPAMRolesCreate structure. -type IPAMRolesCreateReader struct { +// IpamRolesCreateReader is a Reader for the IpamRolesCreate structure. +type IpamRolesCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMRolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamRolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: - result := NewIPAMRolesCreateCreated() + result := NewIpamRolesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMRolesCreateReader) ReadResponse(response runtime.ClientResponse, co } } -// NewIPAMRolesCreateCreated creates a IPAMRolesCreateCreated with default headers values -func NewIPAMRolesCreateCreated() *IPAMRolesCreateCreated { - return &IPAMRolesCreateCreated{} +// NewIpamRolesCreateCreated creates a IpamRolesCreateCreated with default headers values +func NewIpamRolesCreateCreated() *IpamRolesCreateCreated { + return &IpamRolesCreateCreated{} } -/*IPAMRolesCreateCreated handles this case with default header values. +/*IpamRolesCreateCreated handles this case with default header values. -IPAMRolesCreateCreated ipam roles create created +IpamRolesCreateCreated ipam roles create created */ -type IPAMRolesCreateCreated struct { +type IpamRolesCreateCreated struct { Payload *models.Role } -func (o *IPAMRolesCreateCreated) Error() string { +func (o *IpamRolesCreateCreated) Error() string { return fmt.Sprintf("[POST /ipam/roles/][%d] ipamRolesCreateCreated %+v", 201, o.Payload) } -func (o *IPAMRolesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamRolesCreateCreated) GetPayload() *models.Role { + return o.Payload +} + +func (o *IpamRolesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Role) diff --git a/netbox/client/ipam/ip_a_m_roles_delete_parameters.go b/netbox/client/ipam/ipam_roles_delete_parameters.go similarity index 66% rename from netbox/client/ipam/ip_a_m_roles_delete_parameters.go rename to netbox/client/ipam/ipam_roles_delete_parameters.go index 58914e5ef71db99a06d340d3abdc55dad016de64..aeb45735f27cbb7c53693453369de15d391b9ce3 100644 --- a/netbox/client/ipam/ip_a_m_roles_delete_parameters.go +++ b/netbox/client/ipam/ipam_roles_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMRolesDeleteParams creates a new IPAMRolesDeleteParams object +// NewIpamRolesDeleteParams creates a new IpamRolesDeleteParams object // with the default values initialized. -func NewIPAMRolesDeleteParams() *IPAMRolesDeleteParams { +func NewIpamRolesDeleteParams() *IpamRolesDeleteParams { var () - return &IPAMRolesDeleteParams{ + return &IpamRolesDeleteParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMRolesDeleteParamsWithTimeout creates a new IPAMRolesDeleteParams object +// NewIpamRolesDeleteParamsWithTimeout creates a new IpamRolesDeleteParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMRolesDeleteParamsWithTimeout(timeout time.Duration) *IPAMRolesDeleteParams { +func NewIpamRolesDeleteParamsWithTimeout(timeout time.Duration) *IpamRolesDeleteParams { var () - return &IPAMRolesDeleteParams{ + return &IpamRolesDeleteParams{ timeout: timeout, } } -// NewIPAMRolesDeleteParamsWithContext creates a new IPAMRolesDeleteParams object +// NewIpamRolesDeleteParamsWithContext creates a new IpamRolesDeleteParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMRolesDeleteParamsWithContext(ctx context.Context) *IPAMRolesDeleteParams { +func NewIpamRolesDeleteParamsWithContext(ctx context.Context) *IpamRolesDeleteParams { var () - return &IPAMRolesDeleteParams{ + return &IpamRolesDeleteParams{ Context: ctx, } } -// NewIPAMRolesDeleteParamsWithHTTPClient creates a new IPAMRolesDeleteParams object +// NewIpamRolesDeleteParamsWithHTTPClient creates a new IpamRolesDeleteParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMRolesDeleteParamsWithHTTPClient(client *http.Client) *IPAMRolesDeleteParams { +func NewIpamRolesDeleteParamsWithHTTPClient(client *http.Client) *IpamRolesDeleteParams { var () - return &IPAMRolesDeleteParams{ + return &IpamRolesDeleteParams{ HTTPClient: client, } } -/*IPAMRolesDeleteParams contains all the parameters to send to the API endpoint +/*IpamRolesDeleteParams contains all the parameters to send to the API endpoint for the ipam roles delete operation typically these are written to a http.Request */ -type IPAMRolesDeleteParams struct { +type IpamRolesDeleteParams struct { /*ID A unique integer value identifying this role. @@ -88,51 +89,51 @@ type IPAMRolesDeleteParams struct { } // WithTimeout adds the timeout to the ipam roles delete params -func (o *IPAMRolesDeleteParams) WithTimeout(timeout time.Duration) *IPAMRolesDeleteParams { +func (o *IpamRolesDeleteParams) WithTimeout(timeout time.Duration) *IpamRolesDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam roles delete params -func (o *IPAMRolesDeleteParams) SetTimeout(timeout time.Duration) { +func (o *IpamRolesDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam roles delete params -func (o *IPAMRolesDeleteParams) WithContext(ctx context.Context) *IPAMRolesDeleteParams { +func (o *IpamRolesDeleteParams) WithContext(ctx context.Context) *IpamRolesDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam roles delete params -func (o *IPAMRolesDeleteParams) SetContext(ctx context.Context) { +func (o *IpamRolesDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam roles delete params -func (o *IPAMRolesDeleteParams) WithHTTPClient(client *http.Client) *IPAMRolesDeleteParams { +func (o *IpamRolesDeleteParams) WithHTTPClient(client *http.Client) *IpamRolesDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam roles delete params -func (o *IPAMRolesDeleteParams) SetHTTPClient(client *http.Client) { +func (o *IpamRolesDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam roles delete params -func (o *IPAMRolesDeleteParams) WithID(id int64) *IPAMRolesDeleteParams { +func (o *IpamRolesDeleteParams) WithID(id int64) *IpamRolesDeleteParams { o.SetID(id) return o } // SetID adds the id to the ipam roles delete params -func (o *IPAMRolesDeleteParams) SetID(id int64) { +func (o *IpamRolesDeleteParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMRolesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamRolesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_roles_delete_responses.go b/netbox/client/ipam/ipam_roles_delete_responses.go similarity index 70% rename from netbox/client/ipam/ip_a_m_roles_delete_responses.go rename to netbox/client/ipam/ipam_roles_delete_responses.go index 6a5e17d658f1bc819b71665fb433c2c60fed2e0e..8ea0a3b04bb2d05811a94dd536a2a43cddf3561e 100644 --- a/netbox/client/ipam/ip_a_m_roles_delete_responses.go +++ b/netbox/client/ipam/ipam_roles_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,17 +28,16 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// IPAMRolesDeleteReader is a Reader for the IPAMRolesDelete structure. -type IPAMRolesDeleteReader struct { +// IpamRolesDeleteReader is a Reader for the IpamRolesDelete structure. +type IpamRolesDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMRolesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamRolesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: - result := NewIPAMRolesDeleteNoContent() + result := NewIpamRolesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -48,23 +48,23 @@ func (o *IPAMRolesDeleteReader) ReadResponse(response runtime.ClientResponse, co } } -// NewIPAMRolesDeleteNoContent creates a IPAMRolesDeleteNoContent with default headers values -func NewIPAMRolesDeleteNoContent() *IPAMRolesDeleteNoContent { - return &IPAMRolesDeleteNoContent{} +// NewIpamRolesDeleteNoContent creates a IpamRolesDeleteNoContent with default headers values +func NewIpamRolesDeleteNoContent() *IpamRolesDeleteNoContent { + return &IpamRolesDeleteNoContent{} } -/*IPAMRolesDeleteNoContent handles this case with default header values. +/*IpamRolesDeleteNoContent handles this case with default header values. -IPAMRolesDeleteNoContent ipam roles delete no content +IpamRolesDeleteNoContent ipam roles delete no content */ -type IPAMRolesDeleteNoContent struct { +type IpamRolesDeleteNoContent struct { } -func (o *IPAMRolesDeleteNoContent) Error() string { +func (o *IpamRolesDeleteNoContent) Error() string { return fmt.Sprintf("[DELETE /ipam/roles/{id}/][%d] ipamRolesDeleteNoContent ", 204) } -func (o *IPAMRolesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamRolesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/ipam/ip_a_m_roles_list_parameters.go b/netbox/client/ipam/ipam_roles_list_parameters.go similarity index 72% rename from netbox/client/ipam/ip_a_m_roles_list_parameters.go rename to netbox/client/ipam/ipam_roles_list_parameters.go index a81b9195094f0051f3283277a00ab84fddccd10a..10b93e00af6553b4e6e556b9cf2a2af7cf03f96d 100644 --- a/netbox/client/ipam/ip_a_m_roles_list_parameters.go +++ b/netbox/client/ipam/ipam_roles_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMRolesListParams creates a new IPAMRolesListParams object +// NewIpamRolesListParams creates a new IpamRolesListParams object // with the default values initialized. -func NewIPAMRolesListParams() *IPAMRolesListParams { +func NewIpamRolesListParams() *IpamRolesListParams { var () - return &IPAMRolesListParams{ + return &IpamRolesListParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMRolesListParamsWithTimeout creates a new IPAMRolesListParams object +// NewIpamRolesListParamsWithTimeout creates a new IpamRolesListParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMRolesListParamsWithTimeout(timeout time.Duration) *IPAMRolesListParams { +func NewIpamRolesListParamsWithTimeout(timeout time.Duration) *IpamRolesListParams { var () - return &IPAMRolesListParams{ + return &IpamRolesListParams{ timeout: timeout, } } -// NewIPAMRolesListParamsWithContext creates a new IPAMRolesListParams object +// NewIpamRolesListParamsWithContext creates a new IpamRolesListParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMRolesListParamsWithContext(ctx context.Context) *IPAMRolesListParams { +func NewIpamRolesListParamsWithContext(ctx context.Context) *IpamRolesListParams { var () - return &IPAMRolesListParams{ + return &IpamRolesListParams{ Context: ctx, } } -// NewIPAMRolesListParamsWithHTTPClient creates a new IPAMRolesListParams object +// NewIpamRolesListParamsWithHTTPClient creates a new IpamRolesListParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMRolesListParamsWithHTTPClient(client *http.Client) *IPAMRolesListParams { +func NewIpamRolesListParamsWithHTTPClient(client *http.Client) *IpamRolesListParams { var () - return &IPAMRolesListParams{ + return &IpamRolesListParams{ HTTPClient: client, } } -/*IPAMRolesListParams contains all the parameters to send to the API endpoint +/*IpamRolesListParams contains all the parameters to send to the API endpoint for the ipam roles list operation typically these are written to a http.Request */ -type IPAMRolesListParams struct { +type IpamRolesListParams struct { /*ID*/ ID *string @@ -101,106 +102,106 @@ type IPAMRolesListParams struct { } // WithTimeout adds the timeout to the ipam roles list params -func (o *IPAMRolesListParams) WithTimeout(timeout time.Duration) *IPAMRolesListParams { +func (o *IpamRolesListParams) WithTimeout(timeout time.Duration) *IpamRolesListParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam roles list params -func (o *IPAMRolesListParams) SetTimeout(timeout time.Duration) { +func (o *IpamRolesListParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam roles list params -func (o *IPAMRolesListParams) WithContext(ctx context.Context) *IPAMRolesListParams { +func (o *IpamRolesListParams) WithContext(ctx context.Context) *IpamRolesListParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam roles list params -func (o *IPAMRolesListParams) SetContext(ctx context.Context) { +func (o *IpamRolesListParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam roles list params -func (o *IPAMRolesListParams) WithHTTPClient(client *http.Client) *IPAMRolesListParams { +func (o *IpamRolesListParams) WithHTTPClient(client *http.Client) *IpamRolesListParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam roles list params -func (o *IPAMRolesListParams) SetHTTPClient(client *http.Client) { +func (o *IpamRolesListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam roles list params -func (o *IPAMRolesListParams) WithID(id *string) *IPAMRolesListParams { +func (o *IpamRolesListParams) WithID(id *string) *IpamRolesListParams { o.SetID(id) return o } // SetID adds the id to the ipam roles list params -func (o *IPAMRolesListParams) SetID(id *string) { +func (o *IpamRolesListParams) SetID(id *string) { o.ID = id } // WithLimit adds the limit to the ipam roles list params -func (o *IPAMRolesListParams) WithLimit(limit *int64) *IPAMRolesListParams { +func (o *IpamRolesListParams) WithLimit(limit *int64) *IpamRolesListParams { o.SetLimit(limit) return o } // SetLimit adds the limit to the ipam roles list params -func (o *IPAMRolesListParams) SetLimit(limit *int64) { +func (o *IpamRolesListParams) SetLimit(limit *int64) { o.Limit = limit } // WithName adds the name to the ipam roles list params -func (o *IPAMRolesListParams) WithName(name *string) *IPAMRolesListParams { +func (o *IpamRolesListParams) WithName(name *string) *IpamRolesListParams { o.SetName(name) return o } // SetName adds the name to the ipam roles list params -func (o *IPAMRolesListParams) SetName(name *string) { +func (o *IpamRolesListParams) SetName(name *string) { o.Name = name } // WithOffset adds the offset to the ipam roles list params -func (o *IPAMRolesListParams) WithOffset(offset *int64) *IPAMRolesListParams { +func (o *IpamRolesListParams) WithOffset(offset *int64) *IpamRolesListParams { o.SetOffset(offset) return o } // SetOffset adds the offset to the ipam roles list params -func (o *IPAMRolesListParams) SetOffset(offset *int64) { +func (o *IpamRolesListParams) SetOffset(offset *int64) { o.Offset = offset } // WithQ adds the q to the ipam roles list params -func (o *IPAMRolesListParams) WithQ(q *string) *IPAMRolesListParams { +func (o *IpamRolesListParams) WithQ(q *string) *IpamRolesListParams { o.SetQ(q) return o } // SetQ adds the q to the ipam roles list params -func (o *IPAMRolesListParams) SetQ(q *string) { +func (o *IpamRolesListParams) SetQ(q *string) { o.Q = q } // WithSlug adds the slug to the ipam roles list params -func (o *IPAMRolesListParams) WithSlug(slug *string) *IPAMRolesListParams { +func (o *IpamRolesListParams) WithSlug(slug *string) *IpamRolesListParams { o.SetSlug(slug) return o } // SetSlug adds the slug to the ipam roles list params -func (o *IPAMRolesListParams) SetSlug(slug *string) { +func (o *IpamRolesListParams) SetSlug(slug *string) { o.Slug = slug } // WriteToRequest writes these params to a swagger request -func (o *IPAMRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_roles_list_responses.go b/netbox/client/ipam/ipam_roles_list_responses.go similarity index 72% rename from netbox/client/ipam/ip_a_m_roles_list_responses.go rename to netbox/client/ipam/ipam_roles_list_responses.go index 4beae52c93beac5add79802ce32d57a7cfd716d3..440aee2e4e5d07f44a65de8b6e6951c09abf2573 100644 --- a/netbox/client/ipam/ip_a_m_roles_list_responses.go +++ b/netbox/client/ipam/ipam_roles_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,20 +32,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMRolesListReader is a Reader for the IPAMRolesList structure. -type IPAMRolesListReader struct { +// IpamRolesListReader is a Reader for the IpamRolesList structure. +type IpamRolesListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMRolesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamRolesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMRolesListOK() + result := NewIpamRolesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -55,26 +55,30 @@ func (o *IPAMRolesListReader) ReadResponse(response runtime.ClientResponse, cons } } -// NewIPAMRolesListOK creates a IPAMRolesListOK with default headers values -func NewIPAMRolesListOK() *IPAMRolesListOK { - return &IPAMRolesListOK{} +// NewIpamRolesListOK creates a IpamRolesListOK with default headers values +func NewIpamRolesListOK() *IpamRolesListOK { + return &IpamRolesListOK{} } -/*IPAMRolesListOK handles this case with default header values. +/*IpamRolesListOK handles this case with default header values. -IPAMRolesListOK ipam roles list o k +IpamRolesListOK ipam roles list o k */ -type IPAMRolesListOK struct { - Payload *IPAMRolesListOKBody +type IpamRolesListOK struct { + Payload *IpamRolesListOKBody } -func (o *IPAMRolesListOK) Error() string { +func (o *IpamRolesListOK) Error() string { return fmt.Sprintf("[GET /ipam/roles/][%d] ipamRolesListOK %+v", 200, o.Payload) } -func (o *IPAMRolesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamRolesListOK) GetPayload() *IpamRolesListOKBody { + return o.Payload +} + +func (o *IpamRolesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(IPAMRolesListOKBody) + o.Payload = new(IpamRolesListOKBody) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -84,10 +88,10 @@ func (o *IPAMRolesListOK) readResponse(response runtime.ClientResponse, consumer return nil } -/*IPAMRolesListOKBody IP a m roles list o k body -swagger:model IPAMRolesListOKBody +/*IpamRolesListOKBody ipam roles list o k body +swagger:model IpamRolesListOKBody */ -type IPAMRolesListOKBody struct { +type IpamRolesListOKBody struct { // count // Required: true @@ -106,8 +110,8 @@ type IPAMRolesListOKBody struct { Results []*models.Role `json:"results"` } -// Validate validates this IP a m roles list o k body -func (o *IPAMRolesListOKBody) Validate(formats strfmt.Registry) error { +// Validate validates this ipam roles list o k body +func (o *IpamRolesListOKBody) Validate(formats strfmt.Registry) error { var res []error if err := o.validateCount(formats); err != nil { @@ -132,7 +136,7 @@ func (o *IPAMRolesListOKBody) Validate(formats strfmt.Registry) error { return nil } -func (o *IPAMRolesListOKBody) validateCount(formats strfmt.Registry) error { +func (o *IpamRolesListOKBody) validateCount(formats strfmt.Registry) error { if err := validate.Required("ipamRolesListOK"+"."+"count", "body", o.Count); err != nil { return err @@ -141,7 +145,7 @@ func (o *IPAMRolesListOKBody) validateCount(formats strfmt.Registry) error { return nil } -func (o *IPAMRolesListOKBody) validateNext(formats strfmt.Registry) error { +func (o *IpamRolesListOKBody) validateNext(formats strfmt.Registry) error { if swag.IsZero(o.Next) { // not required return nil @@ -154,7 +158,7 @@ func (o *IPAMRolesListOKBody) validateNext(formats strfmt.Registry) error { return nil } -func (o *IPAMRolesListOKBody) validatePrevious(formats strfmt.Registry) error { +func (o *IpamRolesListOKBody) validatePrevious(formats strfmt.Registry) error { if swag.IsZero(o.Previous) { // not required return nil @@ -167,7 +171,7 @@ func (o *IPAMRolesListOKBody) validatePrevious(formats strfmt.Registry) error { return nil } -func (o *IPAMRolesListOKBody) validateResults(formats strfmt.Registry) error { +func (o *IpamRolesListOKBody) validateResults(formats strfmt.Registry) error { if err := validate.Required("ipamRolesListOK"+"."+"results", "body", o.Results); err != nil { return err @@ -193,7 +197,7 @@ func (o *IPAMRolesListOKBody) validateResults(formats strfmt.Registry) error { } // MarshalBinary interface implementation -func (o *IPAMRolesListOKBody) MarshalBinary() ([]byte, error) { +func (o *IpamRolesListOKBody) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -201,8 +205,8 @@ func (o *IPAMRolesListOKBody) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *IPAMRolesListOKBody) UnmarshalBinary(b []byte) error { - var res IPAMRolesListOKBody +func (o *IpamRolesListOKBody) UnmarshalBinary(b []byte) error { + var res IpamRolesListOKBody if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/netbox/client/ipam/ip_a_m_roles_partial_update_parameters.go b/netbox/client/ipam/ipam_roles_partial_update_parameters.go similarity index 64% rename from netbox/client/ipam/ip_a_m_roles_partial_update_parameters.go rename to netbox/client/ipam/ipam_roles_partial_update_parameters.go index a444117038f3b709e18f0c1e221418f76f545ce6..9eb2d93b377ed19b0702e17bde36412f5ad29500 100644 --- a/netbox/client/ipam/ip_a_m_roles_partial_update_parameters.go +++ b/netbox/client/ipam/ipam_roles_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMRolesPartialUpdateParams creates a new IPAMRolesPartialUpdateParams object +// NewIpamRolesPartialUpdateParams creates a new IpamRolesPartialUpdateParams object // with the default values initialized. -func NewIPAMRolesPartialUpdateParams() *IPAMRolesPartialUpdateParams { +func NewIpamRolesPartialUpdateParams() *IpamRolesPartialUpdateParams { var () - return &IPAMRolesPartialUpdateParams{ + return &IpamRolesPartialUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMRolesPartialUpdateParamsWithTimeout creates a new IPAMRolesPartialUpdateParams object +// NewIpamRolesPartialUpdateParamsWithTimeout creates a new IpamRolesPartialUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMRolesPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMRolesPartialUpdateParams { +func NewIpamRolesPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamRolesPartialUpdateParams { var () - return &IPAMRolesPartialUpdateParams{ + return &IpamRolesPartialUpdateParams{ timeout: timeout, } } -// NewIPAMRolesPartialUpdateParamsWithContext creates a new IPAMRolesPartialUpdateParams object +// NewIpamRolesPartialUpdateParamsWithContext creates a new IpamRolesPartialUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMRolesPartialUpdateParamsWithContext(ctx context.Context) *IPAMRolesPartialUpdateParams { +func NewIpamRolesPartialUpdateParamsWithContext(ctx context.Context) *IpamRolesPartialUpdateParams { var () - return &IPAMRolesPartialUpdateParams{ + return &IpamRolesPartialUpdateParams{ Context: ctx, } } -// NewIPAMRolesPartialUpdateParamsWithHTTPClient creates a new IPAMRolesPartialUpdateParams object +// NewIpamRolesPartialUpdateParamsWithHTTPClient creates a new IpamRolesPartialUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMRolesPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMRolesPartialUpdateParams { +func NewIpamRolesPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamRolesPartialUpdateParams { var () - return &IPAMRolesPartialUpdateParams{ + return &IpamRolesPartialUpdateParams{ HTTPClient: client, } } -/*IPAMRolesPartialUpdateParams contains all the parameters to send to the API endpoint +/*IpamRolesPartialUpdateParams contains all the parameters to send to the API endpoint for the ipam roles partial update operation typically these are written to a http.Request */ -type IPAMRolesPartialUpdateParams struct { +type IpamRolesPartialUpdateParams struct { /*Data*/ Data *models.Role @@ -92,62 +93,62 @@ type IPAMRolesPartialUpdateParams struct { } // WithTimeout adds the timeout to the ipam roles partial update params -func (o *IPAMRolesPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMRolesPartialUpdateParams { +func (o *IpamRolesPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamRolesPartialUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam roles partial update params -func (o *IPAMRolesPartialUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamRolesPartialUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam roles partial update params -func (o *IPAMRolesPartialUpdateParams) WithContext(ctx context.Context) *IPAMRolesPartialUpdateParams { +func (o *IpamRolesPartialUpdateParams) WithContext(ctx context.Context) *IpamRolesPartialUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam roles partial update params -func (o *IPAMRolesPartialUpdateParams) SetContext(ctx context.Context) { +func (o *IpamRolesPartialUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam roles partial update params -func (o *IPAMRolesPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMRolesPartialUpdateParams { +func (o *IpamRolesPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamRolesPartialUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam roles partial update params -func (o *IPAMRolesPartialUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamRolesPartialUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam roles partial update params -func (o *IPAMRolesPartialUpdateParams) WithData(data *models.Role) *IPAMRolesPartialUpdateParams { +func (o *IpamRolesPartialUpdateParams) WithData(data *models.Role) *IpamRolesPartialUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam roles partial update params -func (o *IPAMRolesPartialUpdateParams) SetData(data *models.Role) { +func (o *IpamRolesPartialUpdateParams) SetData(data *models.Role) { o.Data = data } // WithID adds the id to the ipam roles partial update params -func (o *IPAMRolesPartialUpdateParams) WithID(id int64) *IPAMRolesPartialUpdateParams { +func (o *IpamRolesPartialUpdateParams) WithID(id int64) *IpamRolesPartialUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam roles partial update params -func (o *IPAMRolesPartialUpdateParams) SetID(id int64) { +func (o *IpamRolesPartialUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMRolesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamRolesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_roles_partial_update_responses.go b/netbox/client/ipam/ipam_roles_partial_update_responses.go similarity index 68% rename from netbox/client/ipam/ip_a_m_roles_partial_update_responses.go rename to netbox/client/ipam/ipam_roles_partial_update_responses.go index 1350b5d4507629f480761f25eb3522a6ee48b4c7..de22b55cbefac64319e822f5e3ac5ae7a1c748b4 100644 --- a/netbox/client/ipam/ip_a_m_roles_partial_update_responses.go +++ b/netbox/client/ipam/ipam_roles_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMRolesPartialUpdateReader is a Reader for the IPAMRolesPartialUpdate structure. -type IPAMRolesPartialUpdateReader struct { +// IpamRolesPartialUpdateReader is a Reader for the IpamRolesPartialUpdate structure. +type IpamRolesPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMRolesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamRolesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMRolesPartialUpdateOK() + result := NewIpamRolesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMRolesPartialUpdateReader) ReadResponse(response runtime.ClientRespo } } -// NewIPAMRolesPartialUpdateOK creates a IPAMRolesPartialUpdateOK with default headers values -func NewIPAMRolesPartialUpdateOK() *IPAMRolesPartialUpdateOK { - return &IPAMRolesPartialUpdateOK{} +// NewIpamRolesPartialUpdateOK creates a IpamRolesPartialUpdateOK with default headers values +func NewIpamRolesPartialUpdateOK() *IpamRolesPartialUpdateOK { + return &IpamRolesPartialUpdateOK{} } -/*IPAMRolesPartialUpdateOK handles this case with default header values. +/*IpamRolesPartialUpdateOK handles this case with default header values. -IPAMRolesPartialUpdateOK ipam roles partial update o k +IpamRolesPartialUpdateOK ipam roles partial update o k */ -type IPAMRolesPartialUpdateOK struct { +type IpamRolesPartialUpdateOK struct { Payload *models.Role } -func (o *IPAMRolesPartialUpdateOK) Error() string { +func (o *IpamRolesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /ipam/roles/{id}/][%d] ipamRolesPartialUpdateOK %+v", 200, o.Payload) } -func (o *IPAMRolesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamRolesPartialUpdateOK) GetPayload() *models.Role { + return o.Payload +} + +func (o *IpamRolesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Role) diff --git a/netbox/client/ipam/ip_a_m_roles_read_parameters.go b/netbox/client/ipam/ipam_roles_read_parameters.go similarity index 66% rename from netbox/client/ipam/ip_a_m_roles_read_parameters.go rename to netbox/client/ipam/ipam_roles_read_parameters.go index c0e786e47674f554ea92fb8cdcc76dceebcc02e8..a010494b1e1d7d3515bb7239772fcc97d6194d14 100644 --- a/netbox/client/ipam/ip_a_m_roles_read_parameters.go +++ b/netbox/client/ipam/ipam_roles_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMRolesReadParams creates a new IPAMRolesReadParams object +// NewIpamRolesReadParams creates a new IpamRolesReadParams object // with the default values initialized. -func NewIPAMRolesReadParams() *IPAMRolesReadParams { +func NewIpamRolesReadParams() *IpamRolesReadParams { var () - return &IPAMRolesReadParams{ + return &IpamRolesReadParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMRolesReadParamsWithTimeout creates a new IPAMRolesReadParams object +// NewIpamRolesReadParamsWithTimeout creates a new IpamRolesReadParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMRolesReadParamsWithTimeout(timeout time.Duration) *IPAMRolesReadParams { +func NewIpamRolesReadParamsWithTimeout(timeout time.Duration) *IpamRolesReadParams { var () - return &IPAMRolesReadParams{ + return &IpamRolesReadParams{ timeout: timeout, } } -// NewIPAMRolesReadParamsWithContext creates a new IPAMRolesReadParams object +// NewIpamRolesReadParamsWithContext creates a new IpamRolesReadParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMRolesReadParamsWithContext(ctx context.Context) *IPAMRolesReadParams { +func NewIpamRolesReadParamsWithContext(ctx context.Context) *IpamRolesReadParams { var () - return &IPAMRolesReadParams{ + return &IpamRolesReadParams{ Context: ctx, } } -// NewIPAMRolesReadParamsWithHTTPClient creates a new IPAMRolesReadParams object +// NewIpamRolesReadParamsWithHTTPClient creates a new IpamRolesReadParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMRolesReadParamsWithHTTPClient(client *http.Client) *IPAMRolesReadParams { +func NewIpamRolesReadParamsWithHTTPClient(client *http.Client) *IpamRolesReadParams { var () - return &IPAMRolesReadParams{ + return &IpamRolesReadParams{ HTTPClient: client, } } -/*IPAMRolesReadParams contains all the parameters to send to the API endpoint +/*IpamRolesReadParams contains all the parameters to send to the API endpoint for the ipam roles read operation typically these are written to a http.Request */ -type IPAMRolesReadParams struct { +type IpamRolesReadParams struct { /*ID A unique integer value identifying this role. @@ -88,51 +89,51 @@ type IPAMRolesReadParams struct { } // WithTimeout adds the timeout to the ipam roles read params -func (o *IPAMRolesReadParams) WithTimeout(timeout time.Duration) *IPAMRolesReadParams { +func (o *IpamRolesReadParams) WithTimeout(timeout time.Duration) *IpamRolesReadParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam roles read params -func (o *IPAMRolesReadParams) SetTimeout(timeout time.Duration) { +func (o *IpamRolesReadParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam roles read params -func (o *IPAMRolesReadParams) WithContext(ctx context.Context) *IPAMRolesReadParams { +func (o *IpamRolesReadParams) WithContext(ctx context.Context) *IpamRolesReadParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam roles read params -func (o *IPAMRolesReadParams) SetContext(ctx context.Context) { +func (o *IpamRolesReadParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam roles read params -func (o *IPAMRolesReadParams) WithHTTPClient(client *http.Client) *IPAMRolesReadParams { +func (o *IpamRolesReadParams) WithHTTPClient(client *http.Client) *IpamRolesReadParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam roles read params -func (o *IPAMRolesReadParams) SetHTTPClient(client *http.Client) { +func (o *IpamRolesReadParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam roles read params -func (o *IPAMRolesReadParams) WithID(id int64) *IPAMRolesReadParams { +func (o *IpamRolesReadParams) WithID(id int64) *IpamRolesReadParams { o.SetID(id) return o } // SetID adds the id to the ipam roles read params -func (o *IPAMRolesReadParams) SetID(id int64) { +func (o *IpamRolesReadParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMRolesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamRolesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_roles_read_responses.go b/netbox/client/ipam/ipam_roles_read_responses.go similarity index 70% rename from netbox/client/ipam/ip_a_m_roles_read_responses.go rename to netbox/client/ipam/ipam_roles_read_responses.go index 9926f9ef300edde7c5326052a3bce4287b917b8d..7d98fdcb4a94a3ab2adac5bf6255e857fc41583d 100644 --- a/netbox/client/ipam/ip_a_m_roles_read_responses.go +++ b/netbox/client/ipam/ipam_roles_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMRolesReadReader is a Reader for the IPAMRolesRead structure. -type IPAMRolesReadReader struct { +// IpamRolesReadReader is a Reader for the IpamRolesRead structure. +type IpamRolesReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMRolesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamRolesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMRolesReadOK() + result := NewIpamRolesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMRolesReadReader) ReadResponse(response runtime.ClientResponse, cons } } -// NewIPAMRolesReadOK creates a IPAMRolesReadOK with default headers values -func NewIPAMRolesReadOK() *IPAMRolesReadOK { - return &IPAMRolesReadOK{} +// NewIpamRolesReadOK creates a IpamRolesReadOK with default headers values +func NewIpamRolesReadOK() *IpamRolesReadOK { + return &IpamRolesReadOK{} } -/*IPAMRolesReadOK handles this case with default header values. +/*IpamRolesReadOK handles this case with default header values. -IPAMRolesReadOK ipam roles read o k +IpamRolesReadOK ipam roles read o k */ -type IPAMRolesReadOK struct { +type IpamRolesReadOK struct { Payload *models.Role } -func (o *IPAMRolesReadOK) Error() string { +func (o *IpamRolesReadOK) Error() string { return fmt.Sprintf("[GET /ipam/roles/{id}/][%d] ipamRolesReadOK %+v", 200, o.Payload) } -func (o *IPAMRolesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamRolesReadOK) GetPayload() *models.Role { + return o.Payload +} + +func (o *IpamRolesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Role) diff --git a/netbox/client/ipam/ip_a_m_roles_update_parameters.go b/netbox/client/ipam/ipam_roles_update_parameters.go similarity index 65% rename from netbox/client/ipam/ip_a_m_roles_update_parameters.go rename to netbox/client/ipam/ipam_roles_update_parameters.go index 4c2b12fce76ab18a17f6b7e353a108df2f4fb006..ceab36742793851628692ec690e5c8881f9b640e 100644 --- a/netbox/client/ipam/ip_a_m_roles_update_parameters.go +++ b/netbox/client/ipam/ipam_roles_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMRolesUpdateParams creates a new IPAMRolesUpdateParams object +// NewIpamRolesUpdateParams creates a new IpamRolesUpdateParams object // with the default values initialized. -func NewIPAMRolesUpdateParams() *IPAMRolesUpdateParams { +func NewIpamRolesUpdateParams() *IpamRolesUpdateParams { var () - return &IPAMRolesUpdateParams{ + return &IpamRolesUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMRolesUpdateParamsWithTimeout creates a new IPAMRolesUpdateParams object +// NewIpamRolesUpdateParamsWithTimeout creates a new IpamRolesUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMRolesUpdateParamsWithTimeout(timeout time.Duration) *IPAMRolesUpdateParams { +func NewIpamRolesUpdateParamsWithTimeout(timeout time.Duration) *IpamRolesUpdateParams { var () - return &IPAMRolesUpdateParams{ + return &IpamRolesUpdateParams{ timeout: timeout, } } -// NewIPAMRolesUpdateParamsWithContext creates a new IPAMRolesUpdateParams object +// NewIpamRolesUpdateParamsWithContext creates a new IpamRolesUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMRolesUpdateParamsWithContext(ctx context.Context) *IPAMRolesUpdateParams { +func NewIpamRolesUpdateParamsWithContext(ctx context.Context) *IpamRolesUpdateParams { var () - return &IPAMRolesUpdateParams{ + return &IpamRolesUpdateParams{ Context: ctx, } } -// NewIPAMRolesUpdateParamsWithHTTPClient creates a new IPAMRolesUpdateParams object +// NewIpamRolesUpdateParamsWithHTTPClient creates a new IpamRolesUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMRolesUpdateParamsWithHTTPClient(client *http.Client) *IPAMRolesUpdateParams { +func NewIpamRolesUpdateParamsWithHTTPClient(client *http.Client) *IpamRolesUpdateParams { var () - return &IPAMRolesUpdateParams{ + return &IpamRolesUpdateParams{ HTTPClient: client, } } -/*IPAMRolesUpdateParams contains all the parameters to send to the API endpoint +/*IpamRolesUpdateParams contains all the parameters to send to the API endpoint for the ipam roles update operation typically these are written to a http.Request */ -type IPAMRolesUpdateParams struct { +type IpamRolesUpdateParams struct { /*Data*/ Data *models.Role @@ -92,62 +93,62 @@ type IPAMRolesUpdateParams struct { } // WithTimeout adds the timeout to the ipam roles update params -func (o *IPAMRolesUpdateParams) WithTimeout(timeout time.Duration) *IPAMRolesUpdateParams { +func (o *IpamRolesUpdateParams) WithTimeout(timeout time.Duration) *IpamRolesUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam roles update params -func (o *IPAMRolesUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamRolesUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam roles update params -func (o *IPAMRolesUpdateParams) WithContext(ctx context.Context) *IPAMRolesUpdateParams { +func (o *IpamRolesUpdateParams) WithContext(ctx context.Context) *IpamRolesUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam roles update params -func (o *IPAMRolesUpdateParams) SetContext(ctx context.Context) { +func (o *IpamRolesUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam roles update params -func (o *IPAMRolesUpdateParams) WithHTTPClient(client *http.Client) *IPAMRolesUpdateParams { +func (o *IpamRolesUpdateParams) WithHTTPClient(client *http.Client) *IpamRolesUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam roles update params -func (o *IPAMRolesUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamRolesUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam roles update params -func (o *IPAMRolesUpdateParams) WithData(data *models.Role) *IPAMRolesUpdateParams { +func (o *IpamRolesUpdateParams) WithData(data *models.Role) *IpamRolesUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam roles update params -func (o *IPAMRolesUpdateParams) SetData(data *models.Role) { +func (o *IpamRolesUpdateParams) SetData(data *models.Role) { o.Data = data } // WithID adds the id to the ipam roles update params -func (o *IPAMRolesUpdateParams) WithID(id int64) *IPAMRolesUpdateParams { +func (o *IpamRolesUpdateParams) WithID(id int64) *IpamRolesUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam roles update params -func (o *IPAMRolesUpdateParams) SetID(id int64) { +func (o *IpamRolesUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMRolesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamRolesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_roles_update_responses.go b/netbox/client/ipam/ipam_roles_update_responses.go similarity index 70% rename from netbox/client/ipam/ip_a_m_roles_update_responses.go rename to netbox/client/ipam/ipam_roles_update_responses.go index 232f415e984e51763ef90368e20b0c9a24919dcb..55b7900ce2d81674ce652a9a333d8da5a1c8149a 100644 --- a/netbox/client/ipam/ip_a_m_roles_update_responses.go +++ b/netbox/client/ipam/ipam_roles_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMRolesUpdateReader is a Reader for the IPAMRolesUpdate structure. -type IPAMRolesUpdateReader struct { +// IpamRolesUpdateReader is a Reader for the IpamRolesUpdate structure. +type IpamRolesUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMRolesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamRolesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMRolesUpdateOK() + result := NewIpamRolesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMRolesUpdateReader) ReadResponse(response runtime.ClientResponse, co } } -// NewIPAMRolesUpdateOK creates a IPAMRolesUpdateOK with default headers values -func NewIPAMRolesUpdateOK() *IPAMRolesUpdateOK { - return &IPAMRolesUpdateOK{} +// NewIpamRolesUpdateOK creates a IpamRolesUpdateOK with default headers values +func NewIpamRolesUpdateOK() *IpamRolesUpdateOK { + return &IpamRolesUpdateOK{} } -/*IPAMRolesUpdateOK handles this case with default header values. +/*IpamRolesUpdateOK handles this case with default header values. -IPAMRolesUpdateOK ipam roles update o k +IpamRolesUpdateOK ipam roles update o k */ -type IPAMRolesUpdateOK struct { +type IpamRolesUpdateOK struct { Payload *models.Role } -func (o *IPAMRolesUpdateOK) Error() string { +func (o *IpamRolesUpdateOK) Error() string { return fmt.Sprintf("[PUT /ipam/roles/{id}/][%d] ipamRolesUpdateOK %+v", 200, o.Payload) } -func (o *IPAMRolesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamRolesUpdateOK) GetPayload() *models.Role { + return o.Payload +} + +func (o *IpamRolesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Role) diff --git a/netbox/client/ipam/ip_a_m_services_create_parameters.go b/netbox/client/ipam/ipam_services_create_parameters.go similarity index 64% rename from netbox/client/ipam/ip_a_m_services_create_parameters.go rename to netbox/client/ipam/ipam_services_create_parameters.go index 7f733cb9b39a0be1e0b4852360130a09367275ca..5b2a39a53759fc209291fa553c41b592968e3aac 100644 --- a/netbox/client/ipam/ip_a_m_services_create_parameters.go +++ b/netbox/client/ipam/ipam_services_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -30,52 +31,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMServicesCreateParams creates a new IPAMServicesCreateParams object +// NewIpamServicesCreateParams creates a new IpamServicesCreateParams object // with the default values initialized. -func NewIPAMServicesCreateParams() *IPAMServicesCreateParams { +func NewIpamServicesCreateParams() *IpamServicesCreateParams { var () - return &IPAMServicesCreateParams{ + return &IpamServicesCreateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMServicesCreateParamsWithTimeout creates a new IPAMServicesCreateParams object +// NewIpamServicesCreateParamsWithTimeout creates a new IpamServicesCreateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMServicesCreateParamsWithTimeout(timeout time.Duration) *IPAMServicesCreateParams { +func NewIpamServicesCreateParamsWithTimeout(timeout time.Duration) *IpamServicesCreateParams { var () - return &IPAMServicesCreateParams{ + return &IpamServicesCreateParams{ timeout: timeout, } } -// NewIPAMServicesCreateParamsWithContext creates a new IPAMServicesCreateParams object +// NewIpamServicesCreateParamsWithContext creates a new IpamServicesCreateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMServicesCreateParamsWithContext(ctx context.Context) *IPAMServicesCreateParams { +func NewIpamServicesCreateParamsWithContext(ctx context.Context) *IpamServicesCreateParams { var () - return &IPAMServicesCreateParams{ + return &IpamServicesCreateParams{ Context: ctx, } } -// NewIPAMServicesCreateParamsWithHTTPClient creates a new IPAMServicesCreateParams object +// NewIpamServicesCreateParamsWithHTTPClient creates a new IpamServicesCreateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMServicesCreateParamsWithHTTPClient(client *http.Client) *IPAMServicesCreateParams { +func NewIpamServicesCreateParamsWithHTTPClient(client *http.Client) *IpamServicesCreateParams { var () - return &IPAMServicesCreateParams{ + return &IpamServicesCreateParams{ HTTPClient: client, } } -/*IPAMServicesCreateParams contains all the parameters to send to the API endpoint +/*IpamServicesCreateParams contains all the parameters to send to the API endpoint for the ipam services create operation typically these are written to a http.Request */ -type IPAMServicesCreateParams struct { +type IpamServicesCreateParams struct { /*Data*/ Data *models.WritableService @@ -86,51 +87,51 @@ type IPAMServicesCreateParams struct { } // WithTimeout adds the timeout to the ipam services create params -func (o *IPAMServicesCreateParams) WithTimeout(timeout time.Duration) *IPAMServicesCreateParams { +func (o *IpamServicesCreateParams) WithTimeout(timeout time.Duration) *IpamServicesCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam services create params -func (o *IPAMServicesCreateParams) SetTimeout(timeout time.Duration) { +func (o *IpamServicesCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam services create params -func (o *IPAMServicesCreateParams) WithContext(ctx context.Context) *IPAMServicesCreateParams { +func (o *IpamServicesCreateParams) WithContext(ctx context.Context) *IpamServicesCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam services create params -func (o *IPAMServicesCreateParams) SetContext(ctx context.Context) { +func (o *IpamServicesCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam services create params -func (o *IPAMServicesCreateParams) WithHTTPClient(client *http.Client) *IPAMServicesCreateParams { +func (o *IpamServicesCreateParams) WithHTTPClient(client *http.Client) *IpamServicesCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam services create params -func (o *IPAMServicesCreateParams) SetHTTPClient(client *http.Client) { +func (o *IpamServicesCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam services create params -func (o *IPAMServicesCreateParams) WithData(data *models.WritableService) *IPAMServicesCreateParams { +func (o *IpamServicesCreateParams) WithData(data *models.WritableService) *IpamServicesCreateParams { o.SetData(data) return o } // SetData adds the data to the ipam services create params -func (o *IPAMServicesCreateParams) SetData(data *models.WritableService) { +func (o *IpamServicesCreateParams) SetData(data *models.WritableService) { o.Data = data } // WriteToRequest writes these params to a swagger request -func (o *IPAMServicesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamServicesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_services_create_responses.go b/netbox/client/ipam/ipam_services_create_responses.go similarity index 68% rename from netbox/client/ipam/ip_a_m_services_create_responses.go rename to netbox/client/ipam/ipam_services_create_responses.go index 0f1ab9f6c927c7f9eac42b2f41ca63779f9f770a..4861e36103f7c42331c5b608f18a844503718117 100644 --- a/netbox/client/ipam/ip_a_m_services_create_responses.go +++ b/netbox/client/ipam/ipam_services_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMServicesCreateReader is a Reader for the IPAMServicesCreate structure. -type IPAMServicesCreateReader struct { +// IpamServicesCreateReader is a Reader for the IpamServicesCreate structure. +type IpamServicesCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMServicesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamServicesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: - result := NewIPAMServicesCreateCreated() + result := NewIpamServicesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMServicesCreateReader) ReadResponse(response runtime.ClientResponse, } } -// NewIPAMServicesCreateCreated creates a IPAMServicesCreateCreated with default headers values -func NewIPAMServicesCreateCreated() *IPAMServicesCreateCreated { - return &IPAMServicesCreateCreated{} +// NewIpamServicesCreateCreated creates a IpamServicesCreateCreated with default headers values +func NewIpamServicesCreateCreated() *IpamServicesCreateCreated { + return &IpamServicesCreateCreated{} } -/*IPAMServicesCreateCreated handles this case with default header values. +/*IpamServicesCreateCreated handles this case with default header values. -IPAMServicesCreateCreated ipam services create created +IpamServicesCreateCreated ipam services create created */ -type IPAMServicesCreateCreated struct { +type IpamServicesCreateCreated struct { Payload *models.Service } -func (o *IPAMServicesCreateCreated) Error() string { +func (o *IpamServicesCreateCreated) Error() string { return fmt.Sprintf("[POST /ipam/services/][%d] ipamServicesCreateCreated %+v", 201, o.Payload) } -func (o *IPAMServicesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamServicesCreateCreated) GetPayload() *models.Service { + return o.Payload +} + +func (o *IpamServicesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Service) diff --git a/netbox/client/ipam/ip_a_m_services_delete_parameters.go b/netbox/client/ipam/ipam_services_delete_parameters.go similarity index 66% rename from netbox/client/ipam/ip_a_m_services_delete_parameters.go rename to netbox/client/ipam/ipam_services_delete_parameters.go index 661398c6280461c4a92b674021dc8fe214160f2f..37054df62e5c58bb2522d10f24659c2f4b6e0351 100644 --- a/netbox/client/ipam/ip_a_m_services_delete_parameters.go +++ b/netbox/client/ipam/ipam_services_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMServicesDeleteParams creates a new IPAMServicesDeleteParams object +// NewIpamServicesDeleteParams creates a new IpamServicesDeleteParams object // with the default values initialized. -func NewIPAMServicesDeleteParams() *IPAMServicesDeleteParams { +func NewIpamServicesDeleteParams() *IpamServicesDeleteParams { var () - return &IPAMServicesDeleteParams{ + return &IpamServicesDeleteParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMServicesDeleteParamsWithTimeout creates a new IPAMServicesDeleteParams object +// NewIpamServicesDeleteParamsWithTimeout creates a new IpamServicesDeleteParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMServicesDeleteParamsWithTimeout(timeout time.Duration) *IPAMServicesDeleteParams { +func NewIpamServicesDeleteParamsWithTimeout(timeout time.Duration) *IpamServicesDeleteParams { var () - return &IPAMServicesDeleteParams{ + return &IpamServicesDeleteParams{ timeout: timeout, } } -// NewIPAMServicesDeleteParamsWithContext creates a new IPAMServicesDeleteParams object +// NewIpamServicesDeleteParamsWithContext creates a new IpamServicesDeleteParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMServicesDeleteParamsWithContext(ctx context.Context) *IPAMServicesDeleteParams { +func NewIpamServicesDeleteParamsWithContext(ctx context.Context) *IpamServicesDeleteParams { var () - return &IPAMServicesDeleteParams{ + return &IpamServicesDeleteParams{ Context: ctx, } } -// NewIPAMServicesDeleteParamsWithHTTPClient creates a new IPAMServicesDeleteParams object +// NewIpamServicesDeleteParamsWithHTTPClient creates a new IpamServicesDeleteParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMServicesDeleteParamsWithHTTPClient(client *http.Client) *IPAMServicesDeleteParams { +func NewIpamServicesDeleteParamsWithHTTPClient(client *http.Client) *IpamServicesDeleteParams { var () - return &IPAMServicesDeleteParams{ + return &IpamServicesDeleteParams{ HTTPClient: client, } } -/*IPAMServicesDeleteParams contains all the parameters to send to the API endpoint +/*IpamServicesDeleteParams contains all the parameters to send to the API endpoint for the ipam services delete operation typically these are written to a http.Request */ -type IPAMServicesDeleteParams struct { +type IpamServicesDeleteParams struct { /*ID A unique integer value identifying this service. @@ -88,51 +89,51 @@ type IPAMServicesDeleteParams struct { } // WithTimeout adds the timeout to the ipam services delete params -func (o *IPAMServicesDeleteParams) WithTimeout(timeout time.Duration) *IPAMServicesDeleteParams { +func (o *IpamServicesDeleteParams) WithTimeout(timeout time.Duration) *IpamServicesDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam services delete params -func (o *IPAMServicesDeleteParams) SetTimeout(timeout time.Duration) { +func (o *IpamServicesDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam services delete params -func (o *IPAMServicesDeleteParams) WithContext(ctx context.Context) *IPAMServicesDeleteParams { +func (o *IpamServicesDeleteParams) WithContext(ctx context.Context) *IpamServicesDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam services delete params -func (o *IPAMServicesDeleteParams) SetContext(ctx context.Context) { +func (o *IpamServicesDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam services delete params -func (o *IPAMServicesDeleteParams) WithHTTPClient(client *http.Client) *IPAMServicesDeleteParams { +func (o *IpamServicesDeleteParams) WithHTTPClient(client *http.Client) *IpamServicesDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam services delete params -func (o *IPAMServicesDeleteParams) SetHTTPClient(client *http.Client) { +func (o *IpamServicesDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam services delete params -func (o *IPAMServicesDeleteParams) WithID(id int64) *IPAMServicesDeleteParams { +func (o *IpamServicesDeleteParams) WithID(id int64) *IpamServicesDeleteParams { o.SetID(id) return o } // SetID adds the id to the ipam services delete params -func (o *IPAMServicesDeleteParams) SetID(id int64) { +func (o *IpamServicesDeleteParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMServicesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamServicesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_services_delete_responses.go b/netbox/client/ipam/ipam_services_delete_responses.go similarity index 70% rename from netbox/client/ipam/ip_a_m_services_delete_responses.go rename to netbox/client/ipam/ipam_services_delete_responses.go index 12b6313211e8fb9d5844b404fb2fccdabd516f6c..13aeb7a5bacc0e12433737e45d2f8e25cf28d34f 100644 --- a/netbox/client/ipam/ip_a_m_services_delete_responses.go +++ b/netbox/client/ipam/ipam_services_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,17 +28,16 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// IPAMServicesDeleteReader is a Reader for the IPAMServicesDelete structure. -type IPAMServicesDeleteReader struct { +// IpamServicesDeleteReader is a Reader for the IpamServicesDelete structure. +type IpamServicesDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMServicesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamServicesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: - result := NewIPAMServicesDeleteNoContent() + result := NewIpamServicesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -48,23 +48,23 @@ func (o *IPAMServicesDeleteReader) ReadResponse(response runtime.ClientResponse, } } -// NewIPAMServicesDeleteNoContent creates a IPAMServicesDeleteNoContent with default headers values -func NewIPAMServicesDeleteNoContent() *IPAMServicesDeleteNoContent { - return &IPAMServicesDeleteNoContent{} +// NewIpamServicesDeleteNoContent creates a IpamServicesDeleteNoContent with default headers values +func NewIpamServicesDeleteNoContent() *IpamServicesDeleteNoContent { + return &IpamServicesDeleteNoContent{} } -/*IPAMServicesDeleteNoContent handles this case with default header values. +/*IpamServicesDeleteNoContent handles this case with default header values. -IPAMServicesDeleteNoContent ipam services delete no content +IpamServicesDeleteNoContent ipam services delete no content */ -type IPAMServicesDeleteNoContent struct { +type IpamServicesDeleteNoContent struct { } -func (o *IPAMServicesDeleteNoContent) Error() string { +func (o *IpamServicesDeleteNoContent) Error() string { return fmt.Sprintf("[DELETE /ipam/services/{id}/][%d] ipamServicesDeleteNoContent ", 204) } -func (o *IPAMServicesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamServicesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/ipam/ip_a_m_services_list_parameters.go b/netbox/client/ipam/ipam_services_list_parameters.go similarity index 53% rename from netbox/client/ipam/ip_a_m_services_list_parameters.go rename to netbox/client/ipam/ipam_services_list_parameters.go index 8eefa094eb36651de89c61d8674b27dea26dcb76..f6c368714e9c0d9501cfc564555b7058abbfdc98 100644 --- a/netbox/client/ipam/ip_a_m_services_list_parameters.go +++ b/netbox/client/ipam/ipam_services_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,56 +33,68 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMServicesListParams creates a new IPAMServicesListParams object +// NewIpamServicesListParams creates a new IpamServicesListParams object // with the default values initialized. -func NewIPAMServicesListParams() *IPAMServicesListParams { +func NewIpamServicesListParams() *IpamServicesListParams { var () - return &IPAMServicesListParams{ + return &IpamServicesListParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMServicesListParamsWithTimeout creates a new IPAMServicesListParams object +// NewIpamServicesListParamsWithTimeout creates a new IpamServicesListParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMServicesListParamsWithTimeout(timeout time.Duration) *IPAMServicesListParams { +func NewIpamServicesListParamsWithTimeout(timeout time.Duration) *IpamServicesListParams { var () - return &IPAMServicesListParams{ + return &IpamServicesListParams{ timeout: timeout, } } -// NewIPAMServicesListParamsWithContext creates a new IPAMServicesListParams object +// NewIpamServicesListParamsWithContext creates a new IpamServicesListParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMServicesListParamsWithContext(ctx context.Context) *IPAMServicesListParams { +func NewIpamServicesListParamsWithContext(ctx context.Context) *IpamServicesListParams { var () - return &IPAMServicesListParams{ + return &IpamServicesListParams{ Context: ctx, } } -// NewIPAMServicesListParamsWithHTTPClient creates a new IPAMServicesListParams object +// NewIpamServicesListParamsWithHTTPClient creates a new IpamServicesListParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMServicesListParamsWithHTTPClient(client *http.Client) *IPAMServicesListParams { +func NewIpamServicesListParamsWithHTTPClient(client *http.Client) *IpamServicesListParams { var () - return &IPAMServicesListParams{ + return &IpamServicesListParams{ HTTPClient: client, } } -/*IPAMServicesListParams contains all the parameters to send to the API endpoint +/*IpamServicesListParams contains all the parameters to send to the API endpoint for the ipam services list operation typically these are written to a http.Request */ -type IPAMServicesListParams struct { - +type IpamServicesListParams struct { + + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*Device*/ Device *string /*DeviceID*/ DeviceID *string /*ID*/ ID *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. @@ -113,178 +126,292 @@ type IPAMServicesListParams struct { } // WithTimeout adds the timeout to the ipam services list params -func (o *IPAMServicesListParams) WithTimeout(timeout time.Duration) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithTimeout(timeout time.Duration) *IpamServicesListParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam services list params -func (o *IPAMServicesListParams) SetTimeout(timeout time.Duration) { +func (o *IpamServicesListParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam services list params -func (o *IPAMServicesListParams) WithContext(ctx context.Context) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithContext(ctx context.Context) *IpamServicesListParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam services list params -func (o *IPAMServicesListParams) SetContext(ctx context.Context) { +func (o *IpamServicesListParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam services list params -func (o *IPAMServicesListParams) WithHTTPClient(client *http.Client) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithHTTPClient(client *http.Client) *IpamServicesListParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam services list params -func (o *IPAMServicesListParams) SetHTTPClient(client *http.Client) { +func (o *IpamServicesListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithCreated adds the created to the ipam services list params +func (o *IpamServicesListParams) WithCreated(created *string) *IpamServicesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the ipam services list params +func (o *IpamServicesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the ipam services list params +func (o *IpamServicesListParams) WithCreatedGte(createdGte *string) *IpamServicesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the ipam services list params +func (o *IpamServicesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the ipam services list params +func (o *IpamServicesListParams) WithCreatedLte(createdLte *string) *IpamServicesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the ipam services list params +func (o *IpamServicesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + // WithDevice adds the device to the ipam services list params -func (o *IPAMServicesListParams) WithDevice(device *string) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithDevice(device *string) *IpamServicesListParams { o.SetDevice(device) return o } // SetDevice adds the device to the ipam services list params -func (o *IPAMServicesListParams) SetDevice(device *string) { +func (o *IpamServicesListParams) SetDevice(device *string) { o.Device = device } // WithDeviceID adds the deviceID to the ipam services list params -func (o *IPAMServicesListParams) WithDeviceID(deviceID *string) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithDeviceID(deviceID *string) *IpamServicesListParams { o.SetDeviceID(deviceID) return o } // SetDeviceID adds the deviceId to the ipam services list params -func (o *IPAMServicesListParams) SetDeviceID(deviceID *string) { +func (o *IpamServicesListParams) SetDeviceID(deviceID *string) { o.DeviceID = deviceID } // WithID adds the id to the ipam services list params -func (o *IPAMServicesListParams) WithID(id *string) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithID(id *string) *IpamServicesListParams { o.SetID(id) return o } // SetID adds the id to the ipam services list params -func (o *IPAMServicesListParams) SetID(id *string) { +func (o *IpamServicesListParams) SetID(id *string) { o.ID = id } +// WithLastUpdated adds the lastUpdated to the ipam services list params +func (o *IpamServicesListParams) WithLastUpdated(lastUpdated *string) *IpamServicesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the ipam services list params +func (o *IpamServicesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the ipam services list params +func (o *IpamServicesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamServicesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the ipam services list params +func (o *IpamServicesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the ipam services list params +func (o *IpamServicesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamServicesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the ipam services list params +func (o *IpamServicesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the ipam services list params -func (o *IPAMServicesListParams) WithLimit(limit *int64) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithLimit(limit *int64) *IpamServicesListParams { o.SetLimit(limit) return o } // SetLimit adds the limit to the ipam services list params -func (o *IPAMServicesListParams) SetLimit(limit *int64) { +func (o *IpamServicesListParams) SetLimit(limit *int64) { o.Limit = limit } // WithName adds the name to the ipam services list params -func (o *IPAMServicesListParams) WithName(name *string) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithName(name *string) *IpamServicesListParams { o.SetName(name) return o } // SetName adds the name to the ipam services list params -func (o *IPAMServicesListParams) SetName(name *string) { +func (o *IpamServicesListParams) SetName(name *string) { o.Name = name } // WithOffset adds the offset to the ipam services list params -func (o *IPAMServicesListParams) WithOffset(offset *int64) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithOffset(offset *int64) *IpamServicesListParams { o.SetOffset(offset) return o } // SetOffset adds the offset to the ipam services list params -func (o *IPAMServicesListParams) SetOffset(offset *int64) { +func (o *IpamServicesListParams) SetOffset(offset *int64) { o.Offset = offset } // WithPort adds the port to the ipam services list params -func (o *IPAMServicesListParams) WithPort(port *string) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithPort(port *string) *IpamServicesListParams { o.SetPort(port) return o } // SetPort adds the port to the ipam services list params -func (o *IPAMServicesListParams) SetPort(port *string) { +func (o *IpamServicesListParams) SetPort(port *string) { o.Port = port } // WithProtocol adds the protocol to the ipam services list params -func (o *IPAMServicesListParams) WithProtocol(protocol *string) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithProtocol(protocol *string) *IpamServicesListParams { o.SetProtocol(protocol) return o } // SetProtocol adds the protocol to the ipam services list params -func (o *IPAMServicesListParams) SetProtocol(protocol *string) { +func (o *IpamServicesListParams) SetProtocol(protocol *string) { o.Protocol = protocol } // WithQ adds the q to the ipam services list params -func (o *IPAMServicesListParams) WithQ(q *string) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithQ(q *string) *IpamServicesListParams { o.SetQ(q) return o } // SetQ adds the q to the ipam services list params -func (o *IPAMServicesListParams) SetQ(q *string) { +func (o *IpamServicesListParams) SetQ(q *string) { o.Q = q } // WithTag adds the tag to the ipam services list params -func (o *IPAMServicesListParams) WithTag(tag *string) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithTag(tag *string) *IpamServicesListParams { o.SetTag(tag) return o } // SetTag adds the tag to the ipam services list params -func (o *IPAMServicesListParams) SetTag(tag *string) { +func (o *IpamServicesListParams) SetTag(tag *string) { o.Tag = tag } // WithVirtualMachine adds the virtualMachine to the ipam services list params -func (o *IPAMServicesListParams) WithVirtualMachine(virtualMachine *string) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithVirtualMachine(virtualMachine *string) *IpamServicesListParams { o.SetVirtualMachine(virtualMachine) return o } // SetVirtualMachine adds the virtualMachine to the ipam services list params -func (o *IPAMServicesListParams) SetVirtualMachine(virtualMachine *string) { +func (o *IpamServicesListParams) SetVirtualMachine(virtualMachine *string) { o.VirtualMachine = virtualMachine } // WithVirtualMachineID adds the virtualMachineID to the ipam services list params -func (o *IPAMServicesListParams) WithVirtualMachineID(virtualMachineID *string) *IPAMServicesListParams { +func (o *IpamServicesListParams) WithVirtualMachineID(virtualMachineID *string) *IpamServicesListParams { o.SetVirtualMachineID(virtualMachineID) return o } // SetVirtualMachineID adds the virtualMachineId to the ipam services list params -func (o *IPAMServicesListParams) SetVirtualMachineID(virtualMachineID *string) { +func (o *IpamServicesListParams) SetVirtualMachineID(virtualMachineID *string) { o.VirtualMachineID = virtualMachineID } // WriteToRequest writes these params to a swagger request -func (o *IPAMServicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamServicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error + if o.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 @@ -333,6 +460,54 @@ func (o *IPAMServicesListParams) WriteToRequest(r runtime.ClientRequest, reg str } + 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 diff --git a/netbox/client/ipam/ip_a_m_services_list_responses.go b/netbox/client/ipam/ipam_services_list_responses.go similarity index 72% rename from netbox/client/ipam/ip_a_m_services_list_responses.go rename to netbox/client/ipam/ipam_services_list_responses.go index 86c4bbc211c27c02d0071a3b7d9d160eb21b82b2..efb154428aa7820595ca3574879ede102029b09c 100644 --- a/netbox/client/ipam/ip_a_m_services_list_responses.go +++ b/netbox/client/ipam/ipam_services_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,20 +32,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMServicesListReader is a Reader for the IPAMServicesList structure. -type IPAMServicesListReader struct { +// IpamServicesListReader is a Reader for the IpamServicesList structure. +type IpamServicesListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMServicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamServicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMServicesListOK() + result := NewIpamServicesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -55,26 +55,30 @@ func (o *IPAMServicesListReader) ReadResponse(response runtime.ClientResponse, c } } -// NewIPAMServicesListOK creates a IPAMServicesListOK with default headers values -func NewIPAMServicesListOK() *IPAMServicesListOK { - return &IPAMServicesListOK{} +// NewIpamServicesListOK creates a IpamServicesListOK with default headers values +func NewIpamServicesListOK() *IpamServicesListOK { + return &IpamServicesListOK{} } -/*IPAMServicesListOK handles this case with default header values. +/*IpamServicesListOK handles this case with default header values. -IPAMServicesListOK ipam services list o k +IpamServicesListOK ipam services list o k */ -type IPAMServicesListOK struct { - Payload *IPAMServicesListOKBody +type IpamServicesListOK struct { + Payload *IpamServicesListOKBody } -func (o *IPAMServicesListOK) Error() string { +func (o *IpamServicesListOK) Error() string { return fmt.Sprintf("[GET /ipam/services/][%d] ipamServicesListOK %+v", 200, o.Payload) } -func (o *IPAMServicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamServicesListOK) GetPayload() *IpamServicesListOKBody { + return o.Payload +} + +func (o *IpamServicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(IPAMServicesListOKBody) + o.Payload = new(IpamServicesListOKBody) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -84,10 +88,10 @@ func (o *IPAMServicesListOK) readResponse(response runtime.ClientResponse, consu return nil } -/*IPAMServicesListOKBody IP a m services list o k body -swagger:model IPAMServicesListOKBody +/*IpamServicesListOKBody ipam services list o k body +swagger:model IpamServicesListOKBody */ -type IPAMServicesListOKBody struct { +type IpamServicesListOKBody struct { // count // Required: true @@ -106,8 +110,8 @@ type IPAMServicesListOKBody struct { Results []*models.Service `json:"results"` } -// Validate validates this IP a m services list o k body -func (o *IPAMServicesListOKBody) Validate(formats strfmt.Registry) error { +// Validate validates this ipam services list o k body +func (o *IpamServicesListOKBody) Validate(formats strfmt.Registry) error { var res []error if err := o.validateCount(formats); err != nil { @@ -132,7 +136,7 @@ func (o *IPAMServicesListOKBody) Validate(formats strfmt.Registry) error { return nil } -func (o *IPAMServicesListOKBody) validateCount(formats strfmt.Registry) error { +func (o *IpamServicesListOKBody) validateCount(formats strfmt.Registry) error { if err := validate.Required("ipamServicesListOK"+"."+"count", "body", o.Count); err != nil { return err @@ -141,7 +145,7 @@ func (o *IPAMServicesListOKBody) validateCount(formats strfmt.Registry) error { return nil } -func (o *IPAMServicesListOKBody) validateNext(formats strfmt.Registry) error { +func (o *IpamServicesListOKBody) validateNext(formats strfmt.Registry) error { if swag.IsZero(o.Next) { // not required return nil @@ -154,7 +158,7 @@ func (o *IPAMServicesListOKBody) validateNext(formats strfmt.Registry) error { return nil } -func (o *IPAMServicesListOKBody) validatePrevious(formats strfmt.Registry) error { +func (o *IpamServicesListOKBody) validatePrevious(formats strfmt.Registry) error { if swag.IsZero(o.Previous) { // not required return nil @@ -167,7 +171,7 @@ func (o *IPAMServicesListOKBody) validatePrevious(formats strfmt.Registry) error return nil } -func (o *IPAMServicesListOKBody) validateResults(formats strfmt.Registry) error { +func (o *IpamServicesListOKBody) validateResults(formats strfmt.Registry) error { if err := validate.Required("ipamServicesListOK"+"."+"results", "body", o.Results); err != nil { return err @@ -193,7 +197,7 @@ func (o *IPAMServicesListOKBody) validateResults(formats strfmt.Registry) error } // MarshalBinary interface implementation -func (o *IPAMServicesListOKBody) MarshalBinary() ([]byte, error) { +func (o *IpamServicesListOKBody) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -201,8 +205,8 @@ func (o *IPAMServicesListOKBody) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *IPAMServicesListOKBody) UnmarshalBinary(b []byte) error { - var res IPAMServicesListOKBody +func (o *IpamServicesListOKBody) UnmarshalBinary(b []byte) error { + var res IpamServicesListOKBody if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/netbox/client/ipam/ip_a_m_services_partial_update_parameters.go b/netbox/client/ipam/ipam_services_partial_update_parameters.go similarity index 62% rename from netbox/client/ipam/ip_a_m_services_partial_update_parameters.go rename to netbox/client/ipam/ipam_services_partial_update_parameters.go index d84bf7b9693ac250454be0eb98908d96f90bff23..e212c3547ba84a9921aba4225fe1d47bf590fb17 100644 --- a/netbox/client/ipam/ip_a_m_services_partial_update_parameters.go +++ b/netbox/client/ipam/ipam_services_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMServicesPartialUpdateParams creates a new IPAMServicesPartialUpdateParams object +// NewIpamServicesPartialUpdateParams creates a new IpamServicesPartialUpdateParams object // with the default values initialized. -func NewIPAMServicesPartialUpdateParams() *IPAMServicesPartialUpdateParams { +func NewIpamServicesPartialUpdateParams() *IpamServicesPartialUpdateParams { var () - return &IPAMServicesPartialUpdateParams{ + return &IpamServicesPartialUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMServicesPartialUpdateParamsWithTimeout creates a new IPAMServicesPartialUpdateParams object +// NewIpamServicesPartialUpdateParamsWithTimeout creates a new IpamServicesPartialUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMServicesPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMServicesPartialUpdateParams { +func NewIpamServicesPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamServicesPartialUpdateParams { var () - return &IPAMServicesPartialUpdateParams{ + return &IpamServicesPartialUpdateParams{ timeout: timeout, } } -// NewIPAMServicesPartialUpdateParamsWithContext creates a new IPAMServicesPartialUpdateParams object +// NewIpamServicesPartialUpdateParamsWithContext creates a new IpamServicesPartialUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMServicesPartialUpdateParamsWithContext(ctx context.Context) *IPAMServicesPartialUpdateParams { +func NewIpamServicesPartialUpdateParamsWithContext(ctx context.Context) *IpamServicesPartialUpdateParams { var () - return &IPAMServicesPartialUpdateParams{ + return &IpamServicesPartialUpdateParams{ Context: ctx, } } -// NewIPAMServicesPartialUpdateParamsWithHTTPClient creates a new IPAMServicesPartialUpdateParams object +// NewIpamServicesPartialUpdateParamsWithHTTPClient creates a new IpamServicesPartialUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMServicesPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMServicesPartialUpdateParams { +func NewIpamServicesPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamServicesPartialUpdateParams { var () - return &IPAMServicesPartialUpdateParams{ + return &IpamServicesPartialUpdateParams{ HTTPClient: client, } } -/*IPAMServicesPartialUpdateParams contains all the parameters to send to the API endpoint +/*IpamServicesPartialUpdateParams contains all the parameters to send to the API endpoint for the ipam services partial update operation typically these are written to a http.Request */ -type IPAMServicesPartialUpdateParams struct { +type IpamServicesPartialUpdateParams struct { /*Data*/ Data *models.WritableService @@ -92,62 +93,62 @@ type IPAMServicesPartialUpdateParams struct { } // WithTimeout adds the timeout to the ipam services partial update params -func (o *IPAMServicesPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMServicesPartialUpdateParams { +func (o *IpamServicesPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamServicesPartialUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam services partial update params -func (o *IPAMServicesPartialUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamServicesPartialUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam services partial update params -func (o *IPAMServicesPartialUpdateParams) WithContext(ctx context.Context) *IPAMServicesPartialUpdateParams { +func (o *IpamServicesPartialUpdateParams) WithContext(ctx context.Context) *IpamServicesPartialUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam services partial update params -func (o *IPAMServicesPartialUpdateParams) SetContext(ctx context.Context) { +func (o *IpamServicesPartialUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam services partial update params -func (o *IPAMServicesPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMServicesPartialUpdateParams { +func (o *IpamServicesPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamServicesPartialUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam services partial update params -func (o *IPAMServicesPartialUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamServicesPartialUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam services partial update params -func (o *IPAMServicesPartialUpdateParams) WithData(data *models.WritableService) *IPAMServicesPartialUpdateParams { +func (o *IpamServicesPartialUpdateParams) WithData(data *models.WritableService) *IpamServicesPartialUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam services partial update params -func (o *IPAMServicesPartialUpdateParams) SetData(data *models.WritableService) { +func (o *IpamServicesPartialUpdateParams) SetData(data *models.WritableService) { o.Data = data } // WithID adds the id to the ipam services partial update params -func (o *IPAMServicesPartialUpdateParams) WithID(id int64) *IPAMServicesPartialUpdateParams { +func (o *IpamServicesPartialUpdateParams) WithID(id int64) *IpamServicesPartialUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam services partial update params -func (o *IPAMServicesPartialUpdateParams) SetID(id int64) { +func (o *IpamServicesPartialUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMServicesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamServicesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_services_partial_update_responses.go b/netbox/client/ipam/ipam_services_partial_update_responses.go similarity index 68% rename from netbox/client/ipam/ip_a_m_services_partial_update_responses.go rename to netbox/client/ipam/ipam_services_partial_update_responses.go index c6a03304771cb2ed46bc1cc7b332c7afc21767be..4215b6189a0e6aa77322d05fbf43c11b4463404c 100644 --- a/netbox/client/ipam/ip_a_m_services_partial_update_responses.go +++ b/netbox/client/ipam/ipam_services_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMServicesPartialUpdateReader is a Reader for the IPAMServicesPartialUpdate structure. -type IPAMServicesPartialUpdateReader struct { +// IpamServicesPartialUpdateReader is a Reader for the IpamServicesPartialUpdate structure. +type IpamServicesPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMServicesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamServicesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMServicesPartialUpdateOK() + result := NewIpamServicesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMServicesPartialUpdateReader) ReadResponse(response runtime.ClientRe } } -// NewIPAMServicesPartialUpdateOK creates a IPAMServicesPartialUpdateOK with default headers values -func NewIPAMServicesPartialUpdateOK() *IPAMServicesPartialUpdateOK { - return &IPAMServicesPartialUpdateOK{} +// NewIpamServicesPartialUpdateOK creates a IpamServicesPartialUpdateOK with default headers values +func NewIpamServicesPartialUpdateOK() *IpamServicesPartialUpdateOK { + return &IpamServicesPartialUpdateOK{} } -/*IPAMServicesPartialUpdateOK handles this case with default header values. +/*IpamServicesPartialUpdateOK handles this case with default header values. -IPAMServicesPartialUpdateOK ipam services partial update o k +IpamServicesPartialUpdateOK ipam services partial update o k */ -type IPAMServicesPartialUpdateOK struct { +type IpamServicesPartialUpdateOK struct { Payload *models.Service } -func (o *IPAMServicesPartialUpdateOK) Error() string { +func (o *IpamServicesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /ipam/services/{id}/][%d] ipamServicesPartialUpdateOK %+v", 200, o.Payload) } -func (o *IPAMServicesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamServicesPartialUpdateOK) GetPayload() *models.Service { + return o.Payload +} + +func (o *IpamServicesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Service) diff --git a/netbox/client/ipam/ip_a_m_services_read_parameters.go b/netbox/client/ipam/ipam_services_read_parameters.go similarity index 66% rename from netbox/client/ipam/ip_a_m_services_read_parameters.go rename to netbox/client/ipam/ipam_services_read_parameters.go index 67d6e071e3cdd09dfb9100ecd24312ce4923b911..70d5f1a2cb3bbc325d54cb2e9bed1c60c56b2ef6 100644 --- a/netbox/client/ipam/ip_a_m_services_read_parameters.go +++ b/netbox/client/ipam/ipam_services_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMServicesReadParams creates a new IPAMServicesReadParams object +// NewIpamServicesReadParams creates a new IpamServicesReadParams object // with the default values initialized. -func NewIPAMServicesReadParams() *IPAMServicesReadParams { +func NewIpamServicesReadParams() *IpamServicesReadParams { var () - return &IPAMServicesReadParams{ + return &IpamServicesReadParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMServicesReadParamsWithTimeout creates a new IPAMServicesReadParams object +// NewIpamServicesReadParamsWithTimeout creates a new IpamServicesReadParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMServicesReadParamsWithTimeout(timeout time.Duration) *IPAMServicesReadParams { +func NewIpamServicesReadParamsWithTimeout(timeout time.Duration) *IpamServicesReadParams { var () - return &IPAMServicesReadParams{ + return &IpamServicesReadParams{ timeout: timeout, } } -// NewIPAMServicesReadParamsWithContext creates a new IPAMServicesReadParams object +// NewIpamServicesReadParamsWithContext creates a new IpamServicesReadParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMServicesReadParamsWithContext(ctx context.Context) *IPAMServicesReadParams { +func NewIpamServicesReadParamsWithContext(ctx context.Context) *IpamServicesReadParams { var () - return &IPAMServicesReadParams{ + return &IpamServicesReadParams{ Context: ctx, } } -// NewIPAMServicesReadParamsWithHTTPClient creates a new IPAMServicesReadParams object +// NewIpamServicesReadParamsWithHTTPClient creates a new IpamServicesReadParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMServicesReadParamsWithHTTPClient(client *http.Client) *IPAMServicesReadParams { +func NewIpamServicesReadParamsWithHTTPClient(client *http.Client) *IpamServicesReadParams { var () - return &IPAMServicesReadParams{ + return &IpamServicesReadParams{ HTTPClient: client, } } -/*IPAMServicesReadParams contains all the parameters to send to the API endpoint +/*IpamServicesReadParams contains all the parameters to send to the API endpoint for the ipam services read operation typically these are written to a http.Request */ -type IPAMServicesReadParams struct { +type IpamServicesReadParams struct { /*ID A unique integer value identifying this service. @@ -88,51 +89,51 @@ type IPAMServicesReadParams struct { } // WithTimeout adds the timeout to the ipam services read params -func (o *IPAMServicesReadParams) WithTimeout(timeout time.Duration) *IPAMServicesReadParams { +func (o *IpamServicesReadParams) WithTimeout(timeout time.Duration) *IpamServicesReadParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam services read params -func (o *IPAMServicesReadParams) SetTimeout(timeout time.Duration) { +func (o *IpamServicesReadParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam services read params -func (o *IPAMServicesReadParams) WithContext(ctx context.Context) *IPAMServicesReadParams { +func (o *IpamServicesReadParams) WithContext(ctx context.Context) *IpamServicesReadParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam services read params -func (o *IPAMServicesReadParams) SetContext(ctx context.Context) { +func (o *IpamServicesReadParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam services read params -func (o *IPAMServicesReadParams) WithHTTPClient(client *http.Client) *IPAMServicesReadParams { +func (o *IpamServicesReadParams) WithHTTPClient(client *http.Client) *IpamServicesReadParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam services read params -func (o *IPAMServicesReadParams) SetHTTPClient(client *http.Client) { +func (o *IpamServicesReadParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam services read params -func (o *IPAMServicesReadParams) WithID(id int64) *IPAMServicesReadParams { +func (o *IpamServicesReadParams) WithID(id int64) *IpamServicesReadParams { o.SetID(id) return o } // SetID adds the id to the ipam services read params -func (o *IPAMServicesReadParams) SetID(id int64) { +func (o *IpamServicesReadParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMServicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamServicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_services_read_responses.go b/netbox/client/ipam/ipam_services_read_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_services_read_responses.go rename to netbox/client/ipam/ipam_services_read_responses.go index 4252429c7db0e0e7056cd7b6169035ca5208c1eb..ebe41d970a71059c0e8713d0bf365ab998780e08 100644 --- a/netbox/client/ipam/ip_a_m_services_read_responses.go +++ b/netbox/client/ipam/ipam_services_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMServicesReadReader is a Reader for the IPAMServicesRead structure. -type IPAMServicesReadReader struct { +// IpamServicesReadReader is a Reader for the IpamServicesRead structure. +type IpamServicesReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMServicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamServicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMServicesReadOK() + result := NewIpamServicesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMServicesReadReader) ReadResponse(response runtime.ClientResponse, c } } -// NewIPAMServicesReadOK creates a IPAMServicesReadOK with default headers values -func NewIPAMServicesReadOK() *IPAMServicesReadOK { - return &IPAMServicesReadOK{} +// NewIpamServicesReadOK creates a IpamServicesReadOK with default headers values +func NewIpamServicesReadOK() *IpamServicesReadOK { + return &IpamServicesReadOK{} } -/*IPAMServicesReadOK handles this case with default header values. +/*IpamServicesReadOK handles this case with default header values. -IPAMServicesReadOK ipam services read o k +IpamServicesReadOK ipam services read o k */ -type IPAMServicesReadOK struct { +type IpamServicesReadOK struct { Payload *models.Service } -func (o *IPAMServicesReadOK) Error() string { +func (o *IpamServicesReadOK) Error() string { return fmt.Sprintf("[GET /ipam/services/{id}/][%d] ipamServicesReadOK %+v", 200, o.Payload) } -func (o *IPAMServicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamServicesReadOK) GetPayload() *models.Service { + return o.Payload +} + +func (o *IpamServicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Service) diff --git a/netbox/client/ipam/ip_a_m_services_update_parameters.go b/netbox/client/ipam/ipam_services_update_parameters.go similarity index 65% rename from netbox/client/ipam/ip_a_m_services_update_parameters.go rename to netbox/client/ipam/ipam_services_update_parameters.go index 5e42b83cea4dc4691876804959edf4a43600ccf6..8aece20992bf0d3109aeebf8bbc93d5f3da10483 100644 --- a/netbox/client/ipam/ip_a_m_services_update_parameters.go +++ b/netbox/client/ipam/ipam_services_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMServicesUpdateParams creates a new IPAMServicesUpdateParams object +// NewIpamServicesUpdateParams creates a new IpamServicesUpdateParams object // with the default values initialized. -func NewIPAMServicesUpdateParams() *IPAMServicesUpdateParams { +func NewIpamServicesUpdateParams() *IpamServicesUpdateParams { var () - return &IPAMServicesUpdateParams{ + return &IpamServicesUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMServicesUpdateParamsWithTimeout creates a new IPAMServicesUpdateParams object +// NewIpamServicesUpdateParamsWithTimeout creates a new IpamServicesUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMServicesUpdateParamsWithTimeout(timeout time.Duration) *IPAMServicesUpdateParams { +func NewIpamServicesUpdateParamsWithTimeout(timeout time.Duration) *IpamServicesUpdateParams { var () - return &IPAMServicesUpdateParams{ + return &IpamServicesUpdateParams{ timeout: timeout, } } -// NewIPAMServicesUpdateParamsWithContext creates a new IPAMServicesUpdateParams object +// NewIpamServicesUpdateParamsWithContext creates a new IpamServicesUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMServicesUpdateParamsWithContext(ctx context.Context) *IPAMServicesUpdateParams { +func NewIpamServicesUpdateParamsWithContext(ctx context.Context) *IpamServicesUpdateParams { var () - return &IPAMServicesUpdateParams{ + return &IpamServicesUpdateParams{ Context: ctx, } } -// NewIPAMServicesUpdateParamsWithHTTPClient creates a new IPAMServicesUpdateParams object +// NewIpamServicesUpdateParamsWithHTTPClient creates a new IpamServicesUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMServicesUpdateParamsWithHTTPClient(client *http.Client) *IPAMServicesUpdateParams { +func NewIpamServicesUpdateParamsWithHTTPClient(client *http.Client) *IpamServicesUpdateParams { var () - return &IPAMServicesUpdateParams{ + return &IpamServicesUpdateParams{ HTTPClient: client, } } -/*IPAMServicesUpdateParams contains all the parameters to send to the API endpoint +/*IpamServicesUpdateParams contains all the parameters to send to the API endpoint for the ipam services update operation typically these are written to a http.Request */ -type IPAMServicesUpdateParams struct { +type IpamServicesUpdateParams struct { /*Data*/ Data *models.WritableService @@ -92,62 +93,62 @@ type IPAMServicesUpdateParams struct { } // WithTimeout adds the timeout to the ipam services update params -func (o *IPAMServicesUpdateParams) WithTimeout(timeout time.Duration) *IPAMServicesUpdateParams { +func (o *IpamServicesUpdateParams) WithTimeout(timeout time.Duration) *IpamServicesUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam services update params -func (o *IPAMServicesUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamServicesUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam services update params -func (o *IPAMServicesUpdateParams) WithContext(ctx context.Context) *IPAMServicesUpdateParams { +func (o *IpamServicesUpdateParams) WithContext(ctx context.Context) *IpamServicesUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam services update params -func (o *IPAMServicesUpdateParams) SetContext(ctx context.Context) { +func (o *IpamServicesUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam services update params -func (o *IPAMServicesUpdateParams) WithHTTPClient(client *http.Client) *IPAMServicesUpdateParams { +func (o *IpamServicesUpdateParams) WithHTTPClient(client *http.Client) *IpamServicesUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam services update params -func (o *IPAMServicesUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamServicesUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam services update params -func (o *IPAMServicesUpdateParams) WithData(data *models.WritableService) *IPAMServicesUpdateParams { +func (o *IpamServicesUpdateParams) WithData(data *models.WritableService) *IpamServicesUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam services update params -func (o *IPAMServicesUpdateParams) SetData(data *models.WritableService) { +func (o *IpamServicesUpdateParams) SetData(data *models.WritableService) { o.Data = data } // WithID adds the id to the ipam services update params -func (o *IPAMServicesUpdateParams) WithID(id int64) *IPAMServicesUpdateParams { +func (o *IpamServicesUpdateParams) WithID(id int64) *IpamServicesUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam services update params -func (o *IPAMServicesUpdateParams) SetID(id int64) { +func (o *IpamServicesUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMServicesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamServicesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_services_update_responses.go b/netbox/client/ipam/ipam_services_update_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_services_update_responses.go rename to netbox/client/ipam/ipam_services_update_responses.go index cd0d206d93886a2806e6f4698f57f127427475be..045959a673c929ba3040b2b72c6c34c350039755 100644 --- a/netbox/client/ipam/ip_a_m_services_update_responses.go +++ b/netbox/client/ipam/ipam_services_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMServicesUpdateReader is a Reader for the IPAMServicesUpdate structure. -type IPAMServicesUpdateReader struct { +// IpamServicesUpdateReader is a Reader for the IpamServicesUpdate structure. +type IpamServicesUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMServicesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamServicesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMServicesUpdateOK() + result := NewIpamServicesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMServicesUpdateReader) ReadResponse(response runtime.ClientResponse, } } -// NewIPAMServicesUpdateOK creates a IPAMServicesUpdateOK with default headers values -func NewIPAMServicesUpdateOK() *IPAMServicesUpdateOK { - return &IPAMServicesUpdateOK{} +// NewIpamServicesUpdateOK creates a IpamServicesUpdateOK with default headers values +func NewIpamServicesUpdateOK() *IpamServicesUpdateOK { + return &IpamServicesUpdateOK{} } -/*IPAMServicesUpdateOK handles this case with default header values. +/*IpamServicesUpdateOK handles this case with default header values. -IPAMServicesUpdateOK ipam services update o k +IpamServicesUpdateOK ipam services update o k */ -type IPAMServicesUpdateOK struct { +type IpamServicesUpdateOK struct { Payload *models.Service } -func (o *IPAMServicesUpdateOK) Error() string { +func (o *IpamServicesUpdateOK) Error() string { return fmt.Sprintf("[PUT /ipam/services/{id}/][%d] ipamServicesUpdateOK %+v", 200, o.Payload) } -func (o *IPAMServicesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamServicesUpdateOK) GetPayload() *models.Service { + return o.Payload +} + +func (o *IpamServicesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Service) diff --git a/netbox/client/ipam/ip_a_m_vlan_groups_create_parameters.go b/netbox/client/ipam/ipam_vlan_groups_create_parameters.go similarity index 63% rename from netbox/client/ipam/ip_a_m_vlan_groups_create_parameters.go rename to netbox/client/ipam/ipam_vlan_groups_create_parameters.go index f59d415a50f629b8bb46f151c8c61ce86f088847..e19bd229fe515c10b260f26391007188371f0fca 100644 --- a/netbox/client/ipam/ip_a_m_vlan_groups_create_parameters.go +++ b/netbox/client/ipam/ipam_vlan_groups_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -30,52 +31,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMVlanGroupsCreateParams creates a new IPAMVlanGroupsCreateParams object +// NewIpamVlanGroupsCreateParams creates a new IpamVlanGroupsCreateParams object // with the default values initialized. -func NewIPAMVlanGroupsCreateParams() *IPAMVlanGroupsCreateParams { +func NewIpamVlanGroupsCreateParams() *IpamVlanGroupsCreateParams { var () - return &IPAMVlanGroupsCreateParams{ + return &IpamVlanGroupsCreateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVlanGroupsCreateParamsWithTimeout creates a new IPAMVlanGroupsCreateParams object +// NewIpamVlanGroupsCreateParamsWithTimeout creates a new IpamVlanGroupsCreateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVlanGroupsCreateParamsWithTimeout(timeout time.Duration) *IPAMVlanGroupsCreateParams { +func NewIpamVlanGroupsCreateParamsWithTimeout(timeout time.Duration) *IpamVlanGroupsCreateParams { var () - return &IPAMVlanGroupsCreateParams{ + return &IpamVlanGroupsCreateParams{ timeout: timeout, } } -// NewIPAMVlanGroupsCreateParamsWithContext creates a new IPAMVlanGroupsCreateParams object +// NewIpamVlanGroupsCreateParamsWithContext creates a new IpamVlanGroupsCreateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVlanGroupsCreateParamsWithContext(ctx context.Context) *IPAMVlanGroupsCreateParams { +func NewIpamVlanGroupsCreateParamsWithContext(ctx context.Context) *IpamVlanGroupsCreateParams { var () - return &IPAMVlanGroupsCreateParams{ + return &IpamVlanGroupsCreateParams{ Context: ctx, } } -// NewIPAMVlanGroupsCreateParamsWithHTTPClient creates a new IPAMVlanGroupsCreateParams object +// NewIpamVlanGroupsCreateParamsWithHTTPClient creates a new IpamVlanGroupsCreateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVlanGroupsCreateParamsWithHTTPClient(client *http.Client) *IPAMVlanGroupsCreateParams { +func NewIpamVlanGroupsCreateParamsWithHTTPClient(client *http.Client) *IpamVlanGroupsCreateParams { var () - return &IPAMVlanGroupsCreateParams{ + return &IpamVlanGroupsCreateParams{ HTTPClient: client, } } -/*IPAMVlanGroupsCreateParams contains all the parameters to send to the API endpoint +/*IpamVlanGroupsCreateParams contains all the parameters to send to the API endpoint for the ipam vlan groups create operation typically these are written to a http.Request */ -type IPAMVlanGroupsCreateParams struct { +type IpamVlanGroupsCreateParams struct { /*Data*/ Data *models.WritableVLANGroup @@ -86,51 +87,51 @@ type IPAMVlanGroupsCreateParams struct { } // WithTimeout adds the timeout to the ipam vlan groups create params -func (o *IPAMVlanGroupsCreateParams) WithTimeout(timeout time.Duration) *IPAMVlanGroupsCreateParams { +func (o *IpamVlanGroupsCreateParams) WithTimeout(timeout time.Duration) *IpamVlanGroupsCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vlan groups create params -func (o *IPAMVlanGroupsCreateParams) SetTimeout(timeout time.Duration) { +func (o *IpamVlanGroupsCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vlan groups create params -func (o *IPAMVlanGroupsCreateParams) WithContext(ctx context.Context) *IPAMVlanGroupsCreateParams { +func (o *IpamVlanGroupsCreateParams) WithContext(ctx context.Context) *IpamVlanGroupsCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vlan groups create params -func (o *IPAMVlanGroupsCreateParams) SetContext(ctx context.Context) { +func (o *IpamVlanGroupsCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vlan groups create params -func (o *IPAMVlanGroupsCreateParams) WithHTTPClient(client *http.Client) *IPAMVlanGroupsCreateParams { +func (o *IpamVlanGroupsCreateParams) WithHTTPClient(client *http.Client) *IpamVlanGroupsCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vlan groups create params -func (o *IPAMVlanGroupsCreateParams) SetHTTPClient(client *http.Client) { +func (o *IpamVlanGroupsCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam vlan groups create params -func (o *IPAMVlanGroupsCreateParams) WithData(data *models.WritableVLANGroup) *IPAMVlanGroupsCreateParams { +func (o *IpamVlanGroupsCreateParams) WithData(data *models.WritableVLANGroup) *IpamVlanGroupsCreateParams { o.SetData(data) return o } // SetData adds the data to the ipam vlan groups create params -func (o *IPAMVlanGroupsCreateParams) SetData(data *models.WritableVLANGroup) { +func (o *IpamVlanGroupsCreateParams) SetData(data *models.WritableVLANGroup) { o.Data = data } // WriteToRequest writes these params to a swagger request -func (o *IPAMVlanGroupsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVlanGroupsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vlan_groups_create_responses.go b/netbox/client/ipam/ipam_vlan_groups_create_responses.go similarity index 68% rename from netbox/client/ipam/ip_a_m_vlan_groups_create_responses.go rename to netbox/client/ipam/ipam_vlan_groups_create_responses.go index 75ad7b9006886632f7be2842cc4f9fa34b685c88..d6c5f27b62a9b04ba66ebcaa9ced527c9fc4e226 100644 --- a/netbox/client/ipam/ip_a_m_vlan_groups_create_responses.go +++ b/netbox/client/ipam/ipam_vlan_groups_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVlanGroupsCreateReader is a Reader for the IPAMVlanGroupsCreate structure. -type IPAMVlanGroupsCreateReader struct { +// IpamVlanGroupsCreateReader is a Reader for the IpamVlanGroupsCreate structure. +type IpamVlanGroupsCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVlanGroupsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVlanGroupsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: - result := NewIPAMVlanGroupsCreateCreated() + result := NewIpamVlanGroupsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMVlanGroupsCreateReader) ReadResponse(response runtime.ClientRespons } } -// NewIPAMVlanGroupsCreateCreated creates a IPAMVlanGroupsCreateCreated with default headers values -func NewIPAMVlanGroupsCreateCreated() *IPAMVlanGroupsCreateCreated { - return &IPAMVlanGroupsCreateCreated{} +// NewIpamVlanGroupsCreateCreated creates a IpamVlanGroupsCreateCreated with default headers values +func NewIpamVlanGroupsCreateCreated() *IpamVlanGroupsCreateCreated { + return &IpamVlanGroupsCreateCreated{} } -/*IPAMVlanGroupsCreateCreated handles this case with default header values. +/*IpamVlanGroupsCreateCreated handles this case with default header values. -IPAMVlanGroupsCreateCreated ipam vlan groups create created +IpamVlanGroupsCreateCreated ipam vlan groups create created */ -type IPAMVlanGroupsCreateCreated struct { +type IpamVlanGroupsCreateCreated struct { Payload *models.VLANGroup } -func (o *IPAMVlanGroupsCreateCreated) Error() string { +func (o *IpamVlanGroupsCreateCreated) Error() string { return fmt.Sprintf("[POST /ipam/vlan-groups/][%d] ipamVlanGroupsCreateCreated %+v", 201, o.Payload) } -func (o *IPAMVlanGroupsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVlanGroupsCreateCreated) GetPayload() *models.VLANGroup { + return o.Payload +} + +func (o *IpamVlanGroupsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VLANGroup) diff --git a/netbox/client/ipam/ip_a_m_vlan_groups_delete_parameters.go b/netbox/client/ipam/ipam_vlan_groups_delete_parameters.go similarity index 65% rename from netbox/client/ipam/ip_a_m_vlan_groups_delete_parameters.go rename to netbox/client/ipam/ipam_vlan_groups_delete_parameters.go index 188d90905b0f3fe971ed6b56491dc5e5dacb8764..a1d4591aaad7b8c06980f40827876d972ce4b7ed 100644 --- a/netbox/client/ipam/ip_a_m_vlan_groups_delete_parameters.go +++ b/netbox/client/ipam/ipam_vlan_groups_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMVlanGroupsDeleteParams creates a new IPAMVlanGroupsDeleteParams object +// NewIpamVlanGroupsDeleteParams creates a new IpamVlanGroupsDeleteParams object // with the default values initialized. -func NewIPAMVlanGroupsDeleteParams() *IPAMVlanGroupsDeleteParams { +func NewIpamVlanGroupsDeleteParams() *IpamVlanGroupsDeleteParams { var () - return &IPAMVlanGroupsDeleteParams{ + return &IpamVlanGroupsDeleteParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVlanGroupsDeleteParamsWithTimeout creates a new IPAMVlanGroupsDeleteParams object +// NewIpamVlanGroupsDeleteParamsWithTimeout creates a new IpamVlanGroupsDeleteParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVlanGroupsDeleteParamsWithTimeout(timeout time.Duration) *IPAMVlanGroupsDeleteParams { +func NewIpamVlanGroupsDeleteParamsWithTimeout(timeout time.Duration) *IpamVlanGroupsDeleteParams { var () - return &IPAMVlanGroupsDeleteParams{ + return &IpamVlanGroupsDeleteParams{ timeout: timeout, } } -// NewIPAMVlanGroupsDeleteParamsWithContext creates a new IPAMVlanGroupsDeleteParams object +// NewIpamVlanGroupsDeleteParamsWithContext creates a new IpamVlanGroupsDeleteParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVlanGroupsDeleteParamsWithContext(ctx context.Context) *IPAMVlanGroupsDeleteParams { +func NewIpamVlanGroupsDeleteParamsWithContext(ctx context.Context) *IpamVlanGroupsDeleteParams { var () - return &IPAMVlanGroupsDeleteParams{ + return &IpamVlanGroupsDeleteParams{ Context: ctx, } } -// NewIPAMVlanGroupsDeleteParamsWithHTTPClient creates a new IPAMVlanGroupsDeleteParams object +// NewIpamVlanGroupsDeleteParamsWithHTTPClient creates a new IpamVlanGroupsDeleteParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVlanGroupsDeleteParamsWithHTTPClient(client *http.Client) *IPAMVlanGroupsDeleteParams { +func NewIpamVlanGroupsDeleteParamsWithHTTPClient(client *http.Client) *IpamVlanGroupsDeleteParams { var () - return &IPAMVlanGroupsDeleteParams{ + return &IpamVlanGroupsDeleteParams{ HTTPClient: client, } } -/*IPAMVlanGroupsDeleteParams contains all the parameters to send to the API endpoint +/*IpamVlanGroupsDeleteParams contains all the parameters to send to the API endpoint for the ipam vlan groups delete operation typically these are written to a http.Request */ -type IPAMVlanGroupsDeleteParams struct { +type IpamVlanGroupsDeleteParams struct { /*ID A unique integer value identifying this VLAN group. @@ -88,51 +89,51 @@ type IPAMVlanGroupsDeleteParams struct { } // WithTimeout adds the timeout to the ipam vlan groups delete params -func (o *IPAMVlanGroupsDeleteParams) WithTimeout(timeout time.Duration) *IPAMVlanGroupsDeleteParams { +func (o *IpamVlanGroupsDeleteParams) WithTimeout(timeout time.Duration) *IpamVlanGroupsDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vlan groups delete params -func (o *IPAMVlanGroupsDeleteParams) SetTimeout(timeout time.Duration) { +func (o *IpamVlanGroupsDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vlan groups delete params -func (o *IPAMVlanGroupsDeleteParams) WithContext(ctx context.Context) *IPAMVlanGroupsDeleteParams { +func (o *IpamVlanGroupsDeleteParams) WithContext(ctx context.Context) *IpamVlanGroupsDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vlan groups delete params -func (o *IPAMVlanGroupsDeleteParams) SetContext(ctx context.Context) { +func (o *IpamVlanGroupsDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vlan groups delete params -func (o *IPAMVlanGroupsDeleteParams) WithHTTPClient(client *http.Client) *IPAMVlanGroupsDeleteParams { +func (o *IpamVlanGroupsDeleteParams) WithHTTPClient(client *http.Client) *IpamVlanGroupsDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vlan groups delete params -func (o *IPAMVlanGroupsDeleteParams) SetHTTPClient(client *http.Client) { +func (o *IpamVlanGroupsDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam vlan groups delete params -func (o *IPAMVlanGroupsDeleteParams) WithID(id int64) *IPAMVlanGroupsDeleteParams { +func (o *IpamVlanGroupsDeleteParams) WithID(id int64) *IpamVlanGroupsDeleteParams { o.SetID(id) return o } // SetID adds the id to the ipam vlan groups delete params -func (o *IPAMVlanGroupsDeleteParams) SetID(id int64) { +func (o *IpamVlanGroupsDeleteParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMVlanGroupsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVlanGroupsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vlan_groups_delete_responses.go b/netbox/client/ipam/ipam_vlan_groups_delete_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_vlan_groups_delete_responses.go rename to netbox/client/ipam/ipam_vlan_groups_delete_responses.go index 2b529ce58b2fc5b21da018f6449f79be3f010546..4630ff3e3945588a1b2486a402ae9b8020371db6 100644 --- a/netbox/client/ipam/ip_a_m_vlan_groups_delete_responses.go +++ b/netbox/client/ipam/ipam_vlan_groups_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,17 +28,16 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// IPAMVlanGroupsDeleteReader is a Reader for the IPAMVlanGroupsDelete structure. -type IPAMVlanGroupsDeleteReader struct { +// IpamVlanGroupsDeleteReader is a Reader for the IpamVlanGroupsDelete structure. +type IpamVlanGroupsDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVlanGroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVlanGroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: - result := NewIPAMVlanGroupsDeleteNoContent() + result := NewIpamVlanGroupsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -48,23 +48,23 @@ func (o *IPAMVlanGroupsDeleteReader) ReadResponse(response runtime.ClientRespons } } -// NewIPAMVlanGroupsDeleteNoContent creates a IPAMVlanGroupsDeleteNoContent with default headers values -func NewIPAMVlanGroupsDeleteNoContent() *IPAMVlanGroupsDeleteNoContent { - return &IPAMVlanGroupsDeleteNoContent{} +// NewIpamVlanGroupsDeleteNoContent creates a IpamVlanGroupsDeleteNoContent with default headers values +func NewIpamVlanGroupsDeleteNoContent() *IpamVlanGroupsDeleteNoContent { + return &IpamVlanGroupsDeleteNoContent{} } -/*IPAMVlanGroupsDeleteNoContent handles this case with default header values. +/*IpamVlanGroupsDeleteNoContent handles this case with default header values. -IPAMVlanGroupsDeleteNoContent ipam vlan groups delete no content +IpamVlanGroupsDeleteNoContent ipam vlan groups delete no content */ -type IPAMVlanGroupsDeleteNoContent struct { +type IpamVlanGroupsDeleteNoContent struct { } -func (o *IPAMVlanGroupsDeleteNoContent) Error() string { +func (o *IpamVlanGroupsDeleteNoContent) Error() string { return fmt.Sprintf("[DELETE /ipam/vlan-groups/{id}/][%d] ipamVlanGroupsDeleteNoContent ", 204) } -func (o *IPAMVlanGroupsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVlanGroupsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/ipam/ip_a_m_vlan_groups_list_parameters.go b/netbox/client/ipam/ipam_vlan_groups_list_parameters.go similarity index 62% rename from netbox/client/ipam/ip_a_m_vlan_groups_list_parameters.go rename to netbox/client/ipam/ipam_vlan_groups_list_parameters.go index 80af4043c43a4f85a90c9a203d1ab10cc644142d..3039b716b2ccb6917336fb51d29813d473e7c16a 100644 --- a/netbox/client/ipam/ip_a_m_vlan_groups_list_parameters.go +++ b/netbox/client/ipam/ipam_vlan_groups_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMVlanGroupsListParams creates a new IPAMVlanGroupsListParams object +// NewIpamVlanGroupsListParams creates a new IpamVlanGroupsListParams object // with the default values initialized. -func NewIPAMVlanGroupsListParams() *IPAMVlanGroupsListParams { +func NewIpamVlanGroupsListParams() *IpamVlanGroupsListParams { var () - return &IPAMVlanGroupsListParams{ + return &IpamVlanGroupsListParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVlanGroupsListParamsWithTimeout creates a new IPAMVlanGroupsListParams object +// NewIpamVlanGroupsListParamsWithTimeout creates a new IpamVlanGroupsListParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVlanGroupsListParamsWithTimeout(timeout time.Duration) *IPAMVlanGroupsListParams { +func NewIpamVlanGroupsListParamsWithTimeout(timeout time.Duration) *IpamVlanGroupsListParams { var () - return &IPAMVlanGroupsListParams{ + return &IpamVlanGroupsListParams{ timeout: timeout, } } -// NewIPAMVlanGroupsListParamsWithContext creates a new IPAMVlanGroupsListParams object +// NewIpamVlanGroupsListParamsWithContext creates a new IpamVlanGroupsListParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVlanGroupsListParamsWithContext(ctx context.Context) *IPAMVlanGroupsListParams { +func NewIpamVlanGroupsListParamsWithContext(ctx context.Context) *IpamVlanGroupsListParams { var () - return &IPAMVlanGroupsListParams{ + return &IpamVlanGroupsListParams{ Context: ctx, } } -// NewIPAMVlanGroupsListParamsWithHTTPClient creates a new IPAMVlanGroupsListParams object +// NewIpamVlanGroupsListParamsWithHTTPClient creates a new IpamVlanGroupsListParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVlanGroupsListParamsWithHTTPClient(client *http.Client) *IPAMVlanGroupsListParams { +func NewIpamVlanGroupsListParamsWithHTTPClient(client *http.Client) *IpamVlanGroupsListParams { var () - return &IPAMVlanGroupsListParams{ + return &IpamVlanGroupsListParams{ HTTPClient: client, } } -/*IPAMVlanGroupsListParams contains all the parameters to send to the API endpoint +/*IpamVlanGroupsListParams contains all the parameters to send to the API endpoint for the ipam vlan groups list operation typically these are written to a http.Request */ -type IPAMVlanGroupsListParams struct { +type IpamVlanGroupsListParams struct { /*ID*/ ID *string @@ -92,6 +93,10 @@ type IPAMVlanGroupsListParams struct { Offset *int64 /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string /*Site*/ Site *string /*SiteID*/ @@ -105,128 +110,150 @@ type IPAMVlanGroupsListParams struct { } // WithTimeout adds the timeout to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) WithTimeout(timeout time.Duration) *IPAMVlanGroupsListParams { +func (o *IpamVlanGroupsListParams) WithTimeout(timeout time.Duration) *IpamVlanGroupsListParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) SetTimeout(timeout time.Duration) { +func (o *IpamVlanGroupsListParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) WithContext(ctx context.Context) *IPAMVlanGroupsListParams { +func (o *IpamVlanGroupsListParams) WithContext(ctx context.Context) *IpamVlanGroupsListParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) SetContext(ctx context.Context) { +func (o *IpamVlanGroupsListParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) WithHTTPClient(client *http.Client) *IPAMVlanGroupsListParams { +func (o *IpamVlanGroupsListParams) WithHTTPClient(client *http.Client) *IpamVlanGroupsListParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) SetHTTPClient(client *http.Client) { +func (o *IpamVlanGroupsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) WithID(id *string) *IPAMVlanGroupsListParams { +func (o *IpamVlanGroupsListParams) WithID(id *string) *IpamVlanGroupsListParams { o.SetID(id) return o } // SetID adds the id to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) SetID(id *string) { +func (o *IpamVlanGroupsListParams) SetID(id *string) { o.ID = id } // WithLimit adds the limit to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) WithLimit(limit *int64) *IPAMVlanGroupsListParams { +func (o *IpamVlanGroupsListParams) WithLimit(limit *int64) *IpamVlanGroupsListParams { o.SetLimit(limit) return o } // SetLimit adds the limit to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) SetLimit(limit *int64) { +func (o *IpamVlanGroupsListParams) SetLimit(limit *int64) { o.Limit = limit } // WithName adds the name to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) WithName(name *string) *IPAMVlanGroupsListParams { +func (o *IpamVlanGroupsListParams) WithName(name *string) *IpamVlanGroupsListParams { o.SetName(name) return o } // SetName adds the name to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) SetName(name *string) { +func (o *IpamVlanGroupsListParams) SetName(name *string) { o.Name = name } // WithOffset adds the offset to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) WithOffset(offset *int64) *IPAMVlanGroupsListParams { +func (o *IpamVlanGroupsListParams) WithOffset(offset *int64) *IpamVlanGroupsListParams { o.SetOffset(offset) return o } // SetOffset adds the offset to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) SetOffset(offset *int64) { +func (o *IpamVlanGroupsListParams) SetOffset(offset *int64) { o.Offset = offset } // WithQ adds the q to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) WithQ(q *string) *IPAMVlanGroupsListParams { +func (o *IpamVlanGroupsListParams) WithQ(q *string) *IpamVlanGroupsListParams { o.SetQ(q) return o } // SetQ adds the q to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) SetQ(q *string) { +func (o *IpamVlanGroupsListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithRegion(region *string) *IpamVlanGroupsListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithRegionID(regionID *string) *IpamVlanGroupsListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + // WithSite adds the site to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) WithSite(site *string) *IPAMVlanGroupsListParams { +func (o *IpamVlanGroupsListParams) WithSite(site *string) *IpamVlanGroupsListParams { o.SetSite(site) return o } // SetSite adds the site to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) SetSite(site *string) { +func (o *IpamVlanGroupsListParams) SetSite(site *string) { o.Site = site } // WithSiteID adds the siteID to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) WithSiteID(siteID *string) *IPAMVlanGroupsListParams { +func (o *IpamVlanGroupsListParams) WithSiteID(siteID *string) *IpamVlanGroupsListParams { o.SetSiteID(siteID) return o } // SetSiteID adds the siteId to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) SetSiteID(siteID *string) { +func (o *IpamVlanGroupsListParams) SetSiteID(siteID *string) { o.SiteID = siteID } // WithSlug adds the slug to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) WithSlug(slug *string) *IPAMVlanGroupsListParams { +func (o *IpamVlanGroupsListParams) WithSlug(slug *string) *IpamVlanGroupsListParams { o.SetSlug(slug) return o } // SetSlug adds the slug to the ipam vlan groups list params -func (o *IPAMVlanGroupsListParams) SetSlug(slug *string) { +func (o *IpamVlanGroupsListParams) SetSlug(slug *string) { o.Slug = slug } // WriteToRequest writes these params to a swagger request -func (o *IPAMVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err @@ -313,6 +340,38 @@ func (o *IPAMVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + if o.Site != nil { // query param site diff --git a/netbox/client/ipam/ip_a_m_vlan_groups_list_responses.go b/netbox/client/ipam/ipam_vlan_groups_list_responses.go similarity index 71% rename from netbox/client/ipam/ip_a_m_vlan_groups_list_responses.go rename to netbox/client/ipam/ipam_vlan_groups_list_responses.go index 1f9700f7552488ea7029dcd7264b57aa0cad173d..2c363a5863c41bd9bf85d22d563fb7b310760af6 100644 --- a/netbox/client/ipam/ip_a_m_vlan_groups_list_responses.go +++ b/netbox/client/ipam/ipam_vlan_groups_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,20 +32,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVlanGroupsListReader is a Reader for the IPAMVlanGroupsList structure. -type IPAMVlanGroupsListReader struct { +// IpamVlanGroupsListReader is a Reader for the IpamVlanGroupsList structure. +type IpamVlanGroupsListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVlanGroupsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVlanGroupsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMVlanGroupsListOK() + result := NewIpamVlanGroupsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -55,26 +55,30 @@ func (o *IPAMVlanGroupsListReader) ReadResponse(response runtime.ClientResponse, } } -// NewIPAMVlanGroupsListOK creates a IPAMVlanGroupsListOK with default headers values -func NewIPAMVlanGroupsListOK() *IPAMVlanGroupsListOK { - return &IPAMVlanGroupsListOK{} +// NewIpamVlanGroupsListOK creates a IpamVlanGroupsListOK with default headers values +func NewIpamVlanGroupsListOK() *IpamVlanGroupsListOK { + return &IpamVlanGroupsListOK{} } -/*IPAMVlanGroupsListOK handles this case with default header values. +/*IpamVlanGroupsListOK handles this case with default header values. -IPAMVlanGroupsListOK ipam vlan groups list o k +IpamVlanGroupsListOK ipam vlan groups list o k */ -type IPAMVlanGroupsListOK struct { - Payload *IPAMVlanGroupsListOKBody +type IpamVlanGroupsListOK struct { + Payload *IpamVlanGroupsListOKBody } -func (o *IPAMVlanGroupsListOK) Error() string { +func (o *IpamVlanGroupsListOK) Error() string { return fmt.Sprintf("[GET /ipam/vlan-groups/][%d] ipamVlanGroupsListOK %+v", 200, o.Payload) } -func (o *IPAMVlanGroupsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVlanGroupsListOK) GetPayload() *IpamVlanGroupsListOKBody { + return o.Payload +} + +func (o *IpamVlanGroupsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(IPAMVlanGroupsListOKBody) + o.Payload = new(IpamVlanGroupsListOKBody) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -84,10 +88,10 @@ func (o *IPAMVlanGroupsListOK) readResponse(response runtime.ClientResponse, con return nil } -/*IPAMVlanGroupsListOKBody IP a m vlan groups list o k body -swagger:model IPAMVlanGroupsListOKBody +/*IpamVlanGroupsListOKBody ipam vlan groups list o k body +swagger:model IpamVlanGroupsListOKBody */ -type IPAMVlanGroupsListOKBody struct { +type IpamVlanGroupsListOKBody struct { // count // Required: true @@ -106,8 +110,8 @@ type IPAMVlanGroupsListOKBody struct { Results []*models.VLANGroup `json:"results"` } -// Validate validates this IP a m vlan groups list o k body -func (o *IPAMVlanGroupsListOKBody) Validate(formats strfmt.Registry) error { +// Validate validates this ipam vlan groups list o k body +func (o *IpamVlanGroupsListOKBody) Validate(formats strfmt.Registry) error { var res []error if err := o.validateCount(formats); err != nil { @@ -132,7 +136,7 @@ func (o *IPAMVlanGroupsListOKBody) Validate(formats strfmt.Registry) error { return nil } -func (o *IPAMVlanGroupsListOKBody) validateCount(formats strfmt.Registry) error { +func (o *IpamVlanGroupsListOKBody) validateCount(formats strfmt.Registry) error { if err := validate.Required("ipamVlanGroupsListOK"+"."+"count", "body", o.Count); err != nil { return err @@ -141,7 +145,7 @@ func (o *IPAMVlanGroupsListOKBody) validateCount(formats strfmt.Registry) error return nil } -func (o *IPAMVlanGroupsListOKBody) validateNext(formats strfmt.Registry) error { +func (o *IpamVlanGroupsListOKBody) validateNext(formats strfmt.Registry) error { if swag.IsZero(o.Next) { // not required return nil @@ -154,7 +158,7 @@ func (o *IPAMVlanGroupsListOKBody) validateNext(formats strfmt.Registry) error { return nil } -func (o *IPAMVlanGroupsListOKBody) validatePrevious(formats strfmt.Registry) error { +func (o *IpamVlanGroupsListOKBody) validatePrevious(formats strfmt.Registry) error { if swag.IsZero(o.Previous) { // not required return nil @@ -167,7 +171,7 @@ func (o *IPAMVlanGroupsListOKBody) validatePrevious(formats strfmt.Registry) err return nil } -func (o *IPAMVlanGroupsListOKBody) validateResults(formats strfmt.Registry) error { +func (o *IpamVlanGroupsListOKBody) validateResults(formats strfmt.Registry) error { if err := validate.Required("ipamVlanGroupsListOK"+"."+"results", "body", o.Results); err != nil { return err @@ -193,7 +197,7 @@ func (o *IPAMVlanGroupsListOKBody) validateResults(formats strfmt.Registry) erro } // MarshalBinary interface implementation -func (o *IPAMVlanGroupsListOKBody) MarshalBinary() ([]byte, error) { +func (o *IpamVlanGroupsListOKBody) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -201,8 +205,8 @@ func (o *IPAMVlanGroupsListOKBody) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *IPAMVlanGroupsListOKBody) UnmarshalBinary(b []byte) error { - var res IPAMVlanGroupsListOKBody +func (o *IpamVlanGroupsListOKBody) UnmarshalBinary(b []byte) error { + var res IpamVlanGroupsListOKBody if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/netbox/client/ipam/ip_a_m_vlan_groups_partial_update_parameters.go b/netbox/client/ipam/ipam_vlan_groups_partial_update_parameters.go similarity index 62% rename from netbox/client/ipam/ip_a_m_vlan_groups_partial_update_parameters.go rename to netbox/client/ipam/ipam_vlan_groups_partial_update_parameters.go index 498475c224b5e03ee34a0b503dd3b821fd289a0b..aaacd3ac49396ff117644ae7158567b2a5cc5dce 100644 --- a/netbox/client/ipam/ip_a_m_vlan_groups_partial_update_parameters.go +++ b/netbox/client/ipam/ipam_vlan_groups_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMVlanGroupsPartialUpdateParams creates a new IPAMVlanGroupsPartialUpdateParams object +// NewIpamVlanGroupsPartialUpdateParams creates a new IpamVlanGroupsPartialUpdateParams object // with the default values initialized. -func NewIPAMVlanGroupsPartialUpdateParams() *IPAMVlanGroupsPartialUpdateParams { +func NewIpamVlanGroupsPartialUpdateParams() *IpamVlanGroupsPartialUpdateParams { var () - return &IPAMVlanGroupsPartialUpdateParams{ + return &IpamVlanGroupsPartialUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVlanGroupsPartialUpdateParamsWithTimeout creates a new IPAMVlanGroupsPartialUpdateParams object +// NewIpamVlanGroupsPartialUpdateParamsWithTimeout creates a new IpamVlanGroupsPartialUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVlanGroupsPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMVlanGroupsPartialUpdateParams { +func NewIpamVlanGroupsPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamVlanGroupsPartialUpdateParams { var () - return &IPAMVlanGroupsPartialUpdateParams{ + return &IpamVlanGroupsPartialUpdateParams{ timeout: timeout, } } -// NewIPAMVlanGroupsPartialUpdateParamsWithContext creates a new IPAMVlanGroupsPartialUpdateParams object +// NewIpamVlanGroupsPartialUpdateParamsWithContext creates a new IpamVlanGroupsPartialUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVlanGroupsPartialUpdateParamsWithContext(ctx context.Context) *IPAMVlanGroupsPartialUpdateParams { +func NewIpamVlanGroupsPartialUpdateParamsWithContext(ctx context.Context) *IpamVlanGroupsPartialUpdateParams { var () - return &IPAMVlanGroupsPartialUpdateParams{ + return &IpamVlanGroupsPartialUpdateParams{ Context: ctx, } } -// NewIPAMVlanGroupsPartialUpdateParamsWithHTTPClient creates a new IPAMVlanGroupsPartialUpdateParams object +// NewIpamVlanGroupsPartialUpdateParamsWithHTTPClient creates a new IpamVlanGroupsPartialUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVlanGroupsPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMVlanGroupsPartialUpdateParams { +func NewIpamVlanGroupsPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamVlanGroupsPartialUpdateParams { var () - return &IPAMVlanGroupsPartialUpdateParams{ + return &IpamVlanGroupsPartialUpdateParams{ HTTPClient: client, } } -/*IPAMVlanGroupsPartialUpdateParams contains all the parameters to send to the API endpoint +/*IpamVlanGroupsPartialUpdateParams contains all the parameters to send to the API endpoint for the ipam vlan groups partial update operation typically these are written to a http.Request */ -type IPAMVlanGroupsPartialUpdateParams struct { +type IpamVlanGroupsPartialUpdateParams struct { /*Data*/ Data *models.WritableVLANGroup @@ -92,62 +93,62 @@ type IPAMVlanGroupsPartialUpdateParams struct { } // WithTimeout adds the timeout to the ipam vlan groups partial update params -func (o *IPAMVlanGroupsPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMVlanGroupsPartialUpdateParams { +func (o *IpamVlanGroupsPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamVlanGroupsPartialUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vlan groups partial update params -func (o *IPAMVlanGroupsPartialUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamVlanGroupsPartialUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vlan groups partial update params -func (o *IPAMVlanGroupsPartialUpdateParams) WithContext(ctx context.Context) *IPAMVlanGroupsPartialUpdateParams { +func (o *IpamVlanGroupsPartialUpdateParams) WithContext(ctx context.Context) *IpamVlanGroupsPartialUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vlan groups partial update params -func (o *IPAMVlanGroupsPartialUpdateParams) SetContext(ctx context.Context) { +func (o *IpamVlanGroupsPartialUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vlan groups partial update params -func (o *IPAMVlanGroupsPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMVlanGroupsPartialUpdateParams { +func (o *IpamVlanGroupsPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamVlanGroupsPartialUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vlan groups partial update params -func (o *IPAMVlanGroupsPartialUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamVlanGroupsPartialUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam vlan groups partial update params -func (o *IPAMVlanGroupsPartialUpdateParams) WithData(data *models.WritableVLANGroup) *IPAMVlanGroupsPartialUpdateParams { +func (o *IpamVlanGroupsPartialUpdateParams) WithData(data *models.WritableVLANGroup) *IpamVlanGroupsPartialUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam vlan groups partial update params -func (o *IPAMVlanGroupsPartialUpdateParams) SetData(data *models.WritableVLANGroup) { +func (o *IpamVlanGroupsPartialUpdateParams) SetData(data *models.WritableVLANGroup) { o.Data = data } // WithID adds the id to the ipam vlan groups partial update params -func (o *IPAMVlanGroupsPartialUpdateParams) WithID(id int64) *IPAMVlanGroupsPartialUpdateParams { +func (o *IpamVlanGroupsPartialUpdateParams) WithID(id int64) *IpamVlanGroupsPartialUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam vlan groups partial update params -func (o *IPAMVlanGroupsPartialUpdateParams) SetID(id int64) { +func (o *IpamVlanGroupsPartialUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMVlanGroupsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVlanGroupsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vlan_groups_partial_update_responses.go b/netbox/client/ipam/ipam_vlan_groups_partial_update_responses.go similarity index 68% rename from netbox/client/ipam/ip_a_m_vlan_groups_partial_update_responses.go rename to netbox/client/ipam/ipam_vlan_groups_partial_update_responses.go index ea55a84fe359e7fbca40f5df5d9c87ec2e1b0dfb..11b9d7c2ec8d8689bc11d4c9d6d4b0ef15240b89 100644 --- a/netbox/client/ipam/ip_a_m_vlan_groups_partial_update_responses.go +++ b/netbox/client/ipam/ipam_vlan_groups_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVlanGroupsPartialUpdateReader is a Reader for the IPAMVlanGroupsPartialUpdate structure. -type IPAMVlanGroupsPartialUpdateReader struct { +// IpamVlanGroupsPartialUpdateReader is a Reader for the IpamVlanGroupsPartialUpdate structure. +type IpamVlanGroupsPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVlanGroupsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVlanGroupsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMVlanGroupsPartialUpdateOK() + result := NewIpamVlanGroupsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMVlanGroupsPartialUpdateReader) ReadResponse(response runtime.Client } } -// NewIPAMVlanGroupsPartialUpdateOK creates a IPAMVlanGroupsPartialUpdateOK with default headers values -func NewIPAMVlanGroupsPartialUpdateOK() *IPAMVlanGroupsPartialUpdateOK { - return &IPAMVlanGroupsPartialUpdateOK{} +// NewIpamVlanGroupsPartialUpdateOK creates a IpamVlanGroupsPartialUpdateOK with default headers values +func NewIpamVlanGroupsPartialUpdateOK() *IpamVlanGroupsPartialUpdateOK { + return &IpamVlanGroupsPartialUpdateOK{} } -/*IPAMVlanGroupsPartialUpdateOK handles this case with default header values. +/*IpamVlanGroupsPartialUpdateOK handles this case with default header values. -IPAMVlanGroupsPartialUpdateOK ipam vlan groups partial update o k +IpamVlanGroupsPartialUpdateOK ipam vlan groups partial update o k */ -type IPAMVlanGroupsPartialUpdateOK struct { +type IpamVlanGroupsPartialUpdateOK struct { Payload *models.VLANGroup } -func (o *IPAMVlanGroupsPartialUpdateOK) Error() string { +func (o *IpamVlanGroupsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /ipam/vlan-groups/{id}/][%d] ipamVlanGroupsPartialUpdateOK %+v", 200, o.Payload) } -func (o *IPAMVlanGroupsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVlanGroupsPartialUpdateOK) GetPayload() *models.VLANGroup { + return o.Payload +} + +func (o *IpamVlanGroupsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VLANGroup) diff --git a/netbox/client/ipam/ip_a_m_vlan_groups_read_parameters.go b/netbox/client/ipam/ipam_vlan_groups_read_parameters.go similarity index 66% rename from netbox/client/ipam/ip_a_m_vlan_groups_read_parameters.go rename to netbox/client/ipam/ipam_vlan_groups_read_parameters.go index 078baca768e80582f6e9bee3d0f27f02ca7b3a97..81c3f57326bb4d9f2e160a2c54505a5263bdb17f 100644 --- a/netbox/client/ipam/ip_a_m_vlan_groups_read_parameters.go +++ b/netbox/client/ipam/ipam_vlan_groups_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMVlanGroupsReadParams creates a new IPAMVlanGroupsReadParams object +// NewIpamVlanGroupsReadParams creates a new IpamVlanGroupsReadParams object // with the default values initialized. -func NewIPAMVlanGroupsReadParams() *IPAMVlanGroupsReadParams { +func NewIpamVlanGroupsReadParams() *IpamVlanGroupsReadParams { var () - return &IPAMVlanGroupsReadParams{ + return &IpamVlanGroupsReadParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVlanGroupsReadParamsWithTimeout creates a new IPAMVlanGroupsReadParams object +// NewIpamVlanGroupsReadParamsWithTimeout creates a new IpamVlanGroupsReadParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVlanGroupsReadParamsWithTimeout(timeout time.Duration) *IPAMVlanGroupsReadParams { +func NewIpamVlanGroupsReadParamsWithTimeout(timeout time.Duration) *IpamVlanGroupsReadParams { var () - return &IPAMVlanGroupsReadParams{ + return &IpamVlanGroupsReadParams{ timeout: timeout, } } -// NewIPAMVlanGroupsReadParamsWithContext creates a new IPAMVlanGroupsReadParams object +// NewIpamVlanGroupsReadParamsWithContext creates a new IpamVlanGroupsReadParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVlanGroupsReadParamsWithContext(ctx context.Context) *IPAMVlanGroupsReadParams { +func NewIpamVlanGroupsReadParamsWithContext(ctx context.Context) *IpamVlanGroupsReadParams { var () - return &IPAMVlanGroupsReadParams{ + return &IpamVlanGroupsReadParams{ Context: ctx, } } -// NewIPAMVlanGroupsReadParamsWithHTTPClient creates a new IPAMVlanGroupsReadParams object +// NewIpamVlanGroupsReadParamsWithHTTPClient creates a new IpamVlanGroupsReadParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVlanGroupsReadParamsWithHTTPClient(client *http.Client) *IPAMVlanGroupsReadParams { +func NewIpamVlanGroupsReadParamsWithHTTPClient(client *http.Client) *IpamVlanGroupsReadParams { var () - return &IPAMVlanGroupsReadParams{ + return &IpamVlanGroupsReadParams{ HTTPClient: client, } } -/*IPAMVlanGroupsReadParams contains all the parameters to send to the API endpoint +/*IpamVlanGroupsReadParams contains all the parameters to send to the API endpoint for the ipam vlan groups read operation typically these are written to a http.Request */ -type IPAMVlanGroupsReadParams struct { +type IpamVlanGroupsReadParams struct { /*ID A unique integer value identifying this VLAN group. @@ -88,51 +89,51 @@ type IPAMVlanGroupsReadParams struct { } // WithTimeout adds the timeout to the ipam vlan groups read params -func (o *IPAMVlanGroupsReadParams) WithTimeout(timeout time.Duration) *IPAMVlanGroupsReadParams { +func (o *IpamVlanGroupsReadParams) WithTimeout(timeout time.Duration) *IpamVlanGroupsReadParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vlan groups read params -func (o *IPAMVlanGroupsReadParams) SetTimeout(timeout time.Duration) { +func (o *IpamVlanGroupsReadParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vlan groups read params -func (o *IPAMVlanGroupsReadParams) WithContext(ctx context.Context) *IPAMVlanGroupsReadParams { +func (o *IpamVlanGroupsReadParams) WithContext(ctx context.Context) *IpamVlanGroupsReadParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vlan groups read params -func (o *IPAMVlanGroupsReadParams) SetContext(ctx context.Context) { +func (o *IpamVlanGroupsReadParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vlan groups read params -func (o *IPAMVlanGroupsReadParams) WithHTTPClient(client *http.Client) *IPAMVlanGroupsReadParams { +func (o *IpamVlanGroupsReadParams) WithHTTPClient(client *http.Client) *IpamVlanGroupsReadParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vlan groups read params -func (o *IPAMVlanGroupsReadParams) SetHTTPClient(client *http.Client) { +func (o *IpamVlanGroupsReadParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam vlan groups read params -func (o *IPAMVlanGroupsReadParams) WithID(id int64) *IPAMVlanGroupsReadParams { +func (o *IpamVlanGroupsReadParams) WithID(id int64) *IpamVlanGroupsReadParams { o.SetID(id) return o } // SetID adds the id to the ipam vlan groups read params -func (o *IPAMVlanGroupsReadParams) SetID(id int64) { +func (o *IpamVlanGroupsReadParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMVlanGroupsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVlanGroupsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vlan_groups_read_responses.go b/netbox/client/ipam/ipam_vlan_groups_read_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_vlan_groups_read_responses.go rename to netbox/client/ipam/ipam_vlan_groups_read_responses.go index b887b896a5b9e641ca3c7e1299dafbae43b63d16..71f742e6f007314733a2de5581fc78f6fd4c9ed6 100644 --- a/netbox/client/ipam/ip_a_m_vlan_groups_read_responses.go +++ b/netbox/client/ipam/ipam_vlan_groups_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVlanGroupsReadReader is a Reader for the IPAMVlanGroupsRead structure. -type IPAMVlanGroupsReadReader struct { +// IpamVlanGroupsReadReader is a Reader for the IpamVlanGroupsRead structure. +type IpamVlanGroupsReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVlanGroupsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVlanGroupsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMVlanGroupsReadOK() + result := NewIpamVlanGroupsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMVlanGroupsReadReader) ReadResponse(response runtime.ClientResponse, } } -// NewIPAMVlanGroupsReadOK creates a IPAMVlanGroupsReadOK with default headers values -func NewIPAMVlanGroupsReadOK() *IPAMVlanGroupsReadOK { - return &IPAMVlanGroupsReadOK{} +// NewIpamVlanGroupsReadOK creates a IpamVlanGroupsReadOK with default headers values +func NewIpamVlanGroupsReadOK() *IpamVlanGroupsReadOK { + return &IpamVlanGroupsReadOK{} } -/*IPAMVlanGroupsReadOK handles this case with default header values. +/*IpamVlanGroupsReadOK handles this case with default header values. -IPAMVlanGroupsReadOK ipam vlan groups read o k +IpamVlanGroupsReadOK ipam vlan groups read o k */ -type IPAMVlanGroupsReadOK struct { +type IpamVlanGroupsReadOK struct { Payload *models.VLANGroup } -func (o *IPAMVlanGroupsReadOK) Error() string { +func (o *IpamVlanGroupsReadOK) Error() string { return fmt.Sprintf("[GET /ipam/vlan-groups/{id}/][%d] ipamVlanGroupsReadOK %+v", 200, o.Payload) } -func (o *IPAMVlanGroupsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVlanGroupsReadOK) GetPayload() *models.VLANGroup { + return o.Payload +} + +func (o *IpamVlanGroupsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VLANGroup) diff --git a/netbox/client/ipam/ip_a_m_vlan_groups_update_parameters.go b/netbox/client/ipam/ipam_vlan_groups_update_parameters.go similarity index 64% rename from netbox/client/ipam/ip_a_m_vlan_groups_update_parameters.go rename to netbox/client/ipam/ipam_vlan_groups_update_parameters.go index 2a3bae42e0dd3b70cff36859f0e1cdbff02d209c..52fb727516c9d0e77786f1755888000241bb6a7e 100644 --- a/netbox/client/ipam/ip_a_m_vlan_groups_update_parameters.go +++ b/netbox/client/ipam/ipam_vlan_groups_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMVlanGroupsUpdateParams creates a new IPAMVlanGroupsUpdateParams object +// NewIpamVlanGroupsUpdateParams creates a new IpamVlanGroupsUpdateParams object // with the default values initialized. -func NewIPAMVlanGroupsUpdateParams() *IPAMVlanGroupsUpdateParams { +func NewIpamVlanGroupsUpdateParams() *IpamVlanGroupsUpdateParams { var () - return &IPAMVlanGroupsUpdateParams{ + return &IpamVlanGroupsUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVlanGroupsUpdateParamsWithTimeout creates a new IPAMVlanGroupsUpdateParams object +// NewIpamVlanGroupsUpdateParamsWithTimeout creates a new IpamVlanGroupsUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVlanGroupsUpdateParamsWithTimeout(timeout time.Duration) *IPAMVlanGroupsUpdateParams { +func NewIpamVlanGroupsUpdateParamsWithTimeout(timeout time.Duration) *IpamVlanGroupsUpdateParams { var () - return &IPAMVlanGroupsUpdateParams{ + return &IpamVlanGroupsUpdateParams{ timeout: timeout, } } -// NewIPAMVlanGroupsUpdateParamsWithContext creates a new IPAMVlanGroupsUpdateParams object +// NewIpamVlanGroupsUpdateParamsWithContext creates a new IpamVlanGroupsUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVlanGroupsUpdateParamsWithContext(ctx context.Context) *IPAMVlanGroupsUpdateParams { +func NewIpamVlanGroupsUpdateParamsWithContext(ctx context.Context) *IpamVlanGroupsUpdateParams { var () - return &IPAMVlanGroupsUpdateParams{ + return &IpamVlanGroupsUpdateParams{ Context: ctx, } } -// NewIPAMVlanGroupsUpdateParamsWithHTTPClient creates a new IPAMVlanGroupsUpdateParams object +// NewIpamVlanGroupsUpdateParamsWithHTTPClient creates a new IpamVlanGroupsUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVlanGroupsUpdateParamsWithHTTPClient(client *http.Client) *IPAMVlanGroupsUpdateParams { +func NewIpamVlanGroupsUpdateParamsWithHTTPClient(client *http.Client) *IpamVlanGroupsUpdateParams { var () - return &IPAMVlanGroupsUpdateParams{ + return &IpamVlanGroupsUpdateParams{ HTTPClient: client, } } -/*IPAMVlanGroupsUpdateParams contains all the parameters to send to the API endpoint +/*IpamVlanGroupsUpdateParams contains all the parameters to send to the API endpoint for the ipam vlan groups update operation typically these are written to a http.Request */ -type IPAMVlanGroupsUpdateParams struct { +type IpamVlanGroupsUpdateParams struct { /*Data*/ Data *models.WritableVLANGroup @@ -92,62 +93,62 @@ type IPAMVlanGroupsUpdateParams struct { } // WithTimeout adds the timeout to the ipam vlan groups update params -func (o *IPAMVlanGroupsUpdateParams) WithTimeout(timeout time.Duration) *IPAMVlanGroupsUpdateParams { +func (o *IpamVlanGroupsUpdateParams) WithTimeout(timeout time.Duration) *IpamVlanGroupsUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vlan groups update params -func (o *IPAMVlanGroupsUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamVlanGroupsUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vlan groups update params -func (o *IPAMVlanGroupsUpdateParams) WithContext(ctx context.Context) *IPAMVlanGroupsUpdateParams { +func (o *IpamVlanGroupsUpdateParams) WithContext(ctx context.Context) *IpamVlanGroupsUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vlan groups update params -func (o *IPAMVlanGroupsUpdateParams) SetContext(ctx context.Context) { +func (o *IpamVlanGroupsUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vlan groups update params -func (o *IPAMVlanGroupsUpdateParams) WithHTTPClient(client *http.Client) *IPAMVlanGroupsUpdateParams { +func (o *IpamVlanGroupsUpdateParams) WithHTTPClient(client *http.Client) *IpamVlanGroupsUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vlan groups update params -func (o *IPAMVlanGroupsUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamVlanGroupsUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam vlan groups update params -func (o *IPAMVlanGroupsUpdateParams) WithData(data *models.WritableVLANGroup) *IPAMVlanGroupsUpdateParams { +func (o *IpamVlanGroupsUpdateParams) WithData(data *models.WritableVLANGroup) *IpamVlanGroupsUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam vlan groups update params -func (o *IPAMVlanGroupsUpdateParams) SetData(data *models.WritableVLANGroup) { +func (o *IpamVlanGroupsUpdateParams) SetData(data *models.WritableVLANGroup) { o.Data = data } // WithID adds the id to the ipam vlan groups update params -func (o *IPAMVlanGroupsUpdateParams) WithID(id int64) *IPAMVlanGroupsUpdateParams { +func (o *IpamVlanGroupsUpdateParams) WithID(id int64) *IpamVlanGroupsUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam vlan groups update params -func (o *IPAMVlanGroupsUpdateParams) SetID(id int64) { +func (o *IpamVlanGroupsUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMVlanGroupsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVlanGroupsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vlan_groups_update_responses.go b/netbox/client/ipam/ipam_vlan_groups_update_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_vlan_groups_update_responses.go rename to netbox/client/ipam/ipam_vlan_groups_update_responses.go index f23f394d38831d874dfe28678c3be1cda3604771..d497a8837e143c2d595f6fe44b0cf876081aaef3 100644 --- a/netbox/client/ipam/ip_a_m_vlan_groups_update_responses.go +++ b/netbox/client/ipam/ipam_vlan_groups_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVlanGroupsUpdateReader is a Reader for the IPAMVlanGroupsUpdate structure. -type IPAMVlanGroupsUpdateReader struct { +// IpamVlanGroupsUpdateReader is a Reader for the IpamVlanGroupsUpdate structure. +type IpamVlanGroupsUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVlanGroupsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVlanGroupsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMVlanGroupsUpdateOK() + result := NewIpamVlanGroupsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMVlanGroupsUpdateReader) ReadResponse(response runtime.ClientRespons } } -// NewIPAMVlanGroupsUpdateOK creates a IPAMVlanGroupsUpdateOK with default headers values -func NewIPAMVlanGroupsUpdateOK() *IPAMVlanGroupsUpdateOK { - return &IPAMVlanGroupsUpdateOK{} +// NewIpamVlanGroupsUpdateOK creates a IpamVlanGroupsUpdateOK with default headers values +func NewIpamVlanGroupsUpdateOK() *IpamVlanGroupsUpdateOK { + return &IpamVlanGroupsUpdateOK{} } -/*IPAMVlanGroupsUpdateOK handles this case with default header values. +/*IpamVlanGroupsUpdateOK handles this case with default header values. -IPAMVlanGroupsUpdateOK ipam vlan groups update o k +IpamVlanGroupsUpdateOK ipam vlan groups update o k */ -type IPAMVlanGroupsUpdateOK struct { +type IpamVlanGroupsUpdateOK struct { Payload *models.VLANGroup } -func (o *IPAMVlanGroupsUpdateOK) Error() string { +func (o *IpamVlanGroupsUpdateOK) Error() string { return fmt.Sprintf("[PUT /ipam/vlan-groups/{id}/][%d] ipamVlanGroupsUpdateOK %+v", 200, o.Payload) } -func (o *IPAMVlanGroupsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVlanGroupsUpdateOK) GetPayload() *models.VLANGroup { + return o.Payload +} + +func (o *IpamVlanGroupsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VLANGroup) diff --git a/netbox/client/ipam/ip_a_m_vlans_create_parameters.go b/netbox/client/ipam/ipam_vlans_create_parameters.go similarity index 64% rename from netbox/client/ipam/ip_a_m_vlans_create_parameters.go rename to netbox/client/ipam/ipam_vlans_create_parameters.go index 1d9150eaba4bf90b3969025804d2f3af2865b2c2..5e140d6f4c0ab1d1331c04a021bfbbd1ed350e44 100644 --- a/netbox/client/ipam/ip_a_m_vlans_create_parameters.go +++ b/netbox/client/ipam/ipam_vlans_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -30,52 +31,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMVlansCreateParams creates a new IPAMVlansCreateParams object +// NewIpamVlansCreateParams creates a new IpamVlansCreateParams object // with the default values initialized. -func NewIPAMVlansCreateParams() *IPAMVlansCreateParams { +func NewIpamVlansCreateParams() *IpamVlansCreateParams { var () - return &IPAMVlansCreateParams{ + return &IpamVlansCreateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVlansCreateParamsWithTimeout creates a new IPAMVlansCreateParams object +// NewIpamVlansCreateParamsWithTimeout creates a new IpamVlansCreateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVlansCreateParamsWithTimeout(timeout time.Duration) *IPAMVlansCreateParams { +func NewIpamVlansCreateParamsWithTimeout(timeout time.Duration) *IpamVlansCreateParams { var () - return &IPAMVlansCreateParams{ + return &IpamVlansCreateParams{ timeout: timeout, } } -// NewIPAMVlansCreateParamsWithContext creates a new IPAMVlansCreateParams object +// NewIpamVlansCreateParamsWithContext creates a new IpamVlansCreateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVlansCreateParamsWithContext(ctx context.Context) *IPAMVlansCreateParams { +func NewIpamVlansCreateParamsWithContext(ctx context.Context) *IpamVlansCreateParams { var () - return &IPAMVlansCreateParams{ + return &IpamVlansCreateParams{ Context: ctx, } } -// NewIPAMVlansCreateParamsWithHTTPClient creates a new IPAMVlansCreateParams object +// NewIpamVlansCreateParamsWithHTTPClient creates a new IpamVlansCreateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVlansCreateParamsWithHTTPClient(client *http.Client) *IPAMVlansCreateParams { +func NewIpamVlansCreateParamsWithHTTPClient(client *http.Client) *IpamVlansCreateParams { var () - return &IPAMVlansCreateParams{ + return &IpamVlansCreateParams{ HTTPClient: client, } } -/*IPAMVlansCreateParams contains all the parameters to send to the API endpoint +/*IpamVlansCreateParams contains all the parameters to send to the API endpoint for the ipam vlans create operation typically these are written to a http.Request */ -type IPAMVlansCreateParams struct { +type IpamVlansCreateParams struct { /*Data*/ Data *models.WritableVLAN @@ -86,51 +87,51 @@ type IPAMVlansCreateParams struct { } // WithTimeout adds the timeout to the ipam vlans create params -func (o *IPAMVlansCreateParams) WithTimeout(timeout time.Duration) *IPAMVlansCreateParams { +func (o *IpamVlansCreateParams) WithTimeout(timeout time.Duration) *IpamVlansCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vlans create params -func (o *IPAMVlansCreateParams) SetTimeout(timeout time.Duration) { +func (o *IpamVlansCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vlans create params -func (o *IPAMVlansCreateParams) WithContext(ctx context.Context) *IPAMVlansCreateParams { +func (o *IpamVlansCreateParams) WithContext(ctx context.Context) *IpamVlansCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vlans create params -func (o *IPAMVlansCreateParams) SetContext(ctx context.Context) { +func (o *IpamVlansCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vlans create params -func (o *IPAMVlansCreateParams) WithHTTPClient(client *http.Client) *IPAMVlansCreateParams { +func (o *IpamVlansCreateParams) WithHTTPClient(client *http.Client) *IpamVlansCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vlans create params -func (o *IPAMVlansCreateParams) SetHTTPClient(client *http.Client) { +func (o *IpamVlansCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam vlans create params -func (o *IPAMVlansCreateParams) WithData(data *models.WritableVLAN) *IPAMVlansCreateParams { +func (o *IpamVlansCreateParams) WithData(data *models.WritableVLAN) *IpamVlansCreateParams { o.SetData(data) return o } // SetData adds the data to the ipam vlans create params -func (o *IPAMVlansCreateParams) SetData(data *models.WritableVLAN) { +func (o *IpamVlansCreateParams) SetData(data *models.WritableVLAN) { o.Data = data } // WriteToRequest writes these params to a swagger request -func (o *IPAMVlansCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVlansCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vlans_create_responses.go b/netbox/client/ipam/ipam_vlans_create_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_vlans_create_responses.go rename to netbox/client/ipam/ipam_vlans_create_responses.go index ad0c4855af4558a00fc0091d47a4913de3e47c64..77bca2b61cf2fd748da07211515e442293c11d16 100644 --- a/netbox/client/ipam/ip_a_m_vlans_create_responses.go +++ b/netbox/client/ipam/ipam_vlans_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVlansCreateReader is a Reader for the IPAMVlansCreate structure. -type IPAMVlansCreateReader struct { +// IpamVlansCreateReader is a Reader for the IpamVlansCreate structure. +type IpamVlansCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVlansCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVlansCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: - result := NewIPAMVlansCreateCreated() + result := NewIpamVlansCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMVlansCreateReader) ReadResponse(response runtime.ClientResponse, co } } -// NewIPAMVlansCreateCreated creates a IPAMVlansCreateCreated with default headers values -func NewIPAMVlansCreateCreated() *IPAMVlansCreateCreated { - return &IPAMVlansCreateCreated{} +// NewIpamVlansCreateCreated creates a IpamVlansCreateCreated with default headers values +func NewIpamVlansCreateCreated() *IpamVlansCreateCreated { + return &IpamVlansCreateCreated{} } -/*IPAMVlansCreateCreated handles this case with default header values. +/*IpamVlansCreateCreated handles this case with default header values. -IPAMVlansCreateCreated ipam vlans create created +IpamVlansCreateCreated ipam vlans create created */ -type IPAMVlansCreateCreated struct { +type IpamVlansCreateCreated struct { Payload *models.VLAN } -func (o *IPAMVlansCreateCreated) Error() string { +func (o *IpamVlansCreateCreated) Error() string { return fmt.Sprintf("[POST /ipam/vlans/][%d] ipamVlansCreateCreated %+v", 201, o.Payload) } -func (o *IPAMVlansCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVlansCreateCreated) GetPayload() *models.VLAN { + return o.Payload +} + +func (o *IpamVlansCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VLAN) diff --git a/netbox/client/ipam/ip_a_m_vlans_delete_parameters.go b/netbox/client/ipam/ipam_vlans_delete_parameters.go similarity index 66% rename from netbox/client/ipam/ip_a_m_vlans_delete_parameters.go rename to netbox/client/ipam/ipam_vlans_delete_parameters.go index 60d943aeaa6ada0e5a2f54054183e5af8ac826e4..7a81b4c22a83a2f7a578d8a9ed63006722685eb6 100644 --- a/netbox/client/ipam/ip_a_m_vlans_delete_parameters.go +++ b/netbox/client/ipam/ipam_vlans_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMVlansDeleteParams creates a new IPAMVlansDeleteParams object +// NewIpamVlansDeleteParams creates a new IpamVlansDeleteParams object // with the default values initialized. -func NewIPAMVlansDeleteParams() *IPAMVlansDeleteParams { +func NewIpamVlansDeleteParams() *IpamVlansDeleteParams { var () - return &IPAMVlansDeleteParams{ + return &IpamVlansDeleteParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVlansDeleteParamsWithTimeout creates a new IPAMVlansDeleteParams object +// NewIpamVlansDeleteParamsWithTimeout creates a new IpamVlansDeleteParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVlansDeleteParamsWithTimeout(timeout time.Duration) *IPAMVlansDeleteParams { +func NewIpamVlansDeleteParamsWithTimeout(timeout time.Duration) *IpamVlansDeleteParams { var () - return &IPAMVlansDeleteParams{ + return &IpamVlansDeleteParams{ timeout: timeout, } } -// NewIPAMVlansDeleteParamsWithContext creates a new IPAMVlansDeleteParams object +// NewIpamVlansDeleteParamsWithContext creates a new IpamVlansDeleteParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVlansDeleteParamsWithContext(ctx context.Context) *IPAMVlansDeleteParams { +func NewIpamVlansDeleteParamsWithContext(ctx context.Context) *IpamVlansDeleteParams { var () - return &IPAMVlansDeleteParams{ + return &IpamVlansDeleteParams{ Context: ctx, } } -// NewIPAMVlansDeleteParamsWithHTTPClient creates a new IPAMVlansDeleteParams object +// NewIpamVlansDeleteParamsWithHTTPClient creates a new IpamVlansDeleteParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVlansDeleteParamsWithHTTPClient(client *http.Client) *IPAMVlansDeleteParams { +func NewIpamVlansDeleteParamsWithHTTPClient(client *http.Client) *IpamVlansDeleteParams { var () - return &IPAMVlansDeleteParams{ + return &IpamVlansDeleteParams{ HTTPClient: client, } } -/*IPAMVlansDeleteParams contains all the parameters to send to the API endpoint +/*IpamVlansDeleteParams contains all the parameters to send to the API endpoint for the ipam vlans delete operation typically these are written to a http.Request */ -type IPAMVlansDeleteParams struct { +type IpamVlansDeleteParams struct { /*ID A unique integer value identifying this VLAN. @@ -88,51 +89,51 @@ type IPAMVlansDeleteParams struct { } // WithTimeout adds the timeout to the ipam vlans delete params -func (o *IPAMVlansDeleteParams) WithTimeout(timeout time.Duration) *IPAMVlansDeleteParams { +func (o *IpamVlansDeleteParams) WithTimeout(timeout time.Duration) *IpamVlansDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vlans delete params -func (o *IPAMVlansDeleteParams) SetTimeout(timeout time.Duration) { +func (o *IpamVlansDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vlans delete params -func (o *IPAMVlansDeleteParams) WithContext(ctx context.Context) *IPAMVlansDeleteParams { +func (o *IpamVlansDeleteParams) WithContext(ctx context.Context) *IpamVlansDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vlans delete params -func (o *IPAMVlansDeleteParams) SetContext(ctx context.Context) { +func (o *IpamVlansDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vlans delete params -func (o *IPAMVlansDeleteParams) WithHTTPClient(client *http.Client) *IPAMVlansDeleteParams { +func (o *IpamVlansDeleteParams) WithHTTPClient(client *http.Client) *IpamVlansDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vlans delete params -func (o *IPAMVlansDeleteParams) SetHTTPClient(client *http.Client) { +func (o *IpamVlansDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam vlans delete params -func (o *IPAMVlansDeleteParams) WithID(id int64) *IPAMVlansDeleteParams { +func (o *IpamVlansDeleteParams) WithID(id int64) *IpamVlansDeleteParams { o.SetID(id) return o } // SetID adds the id to the ipam vlans delete params -func (o *IPAMVlansDeleteParams) SetID(id int64) { +func (o *IpamVlansDeleteParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMVlansDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVlansDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vlans_delete_responses.go b/netbox/client/ipam/ipam_vlans_delete_responses.go similarity index 70% rename from netbox/client/ipam/ip_a_m_vlans_delete_responses.go rename to netbox/client/ipam/ipam_vlans_delete_responses.go index 11f22d4670614b930300f3f82128bd103113ed28..07c9dfcb279f5d9c199e090fb21c7d26cc103660 100644 --- a/netbox/client/ipam/ip_a_m_vlans_delete_responses.go +++ b/netbox/client/ipam/ipam_vlans_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,17 +28,16 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// IPAMVlansDeleteReader is a Reader for the IPAMVlansDelete structure. -type IPAMVlansDeleteReader struct { +// IpamVlansDeleteReader is a Reader for the IpamVlansDelete structure. +type IpamVlansDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVlansDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVlansDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: - result := NewIPAMVlansDeleteNoContent() + result := NewIpamVlansDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -48,23 +48,23 @@ func (o *IPAMVlansDeleteReader) ReadResponse(response runtime.ClientResponse, co } } -// NewIPAMVlansDeleteNoContent creates a IPAMVlansDeleteNoContent with default headers values -func NewIPAMVlansDeleteNoContent() *IPAMVlansDeleteNoContent { - return &IPAMVlansDeleteNoContent{} +// NewIpamVlansDeleteNoContent creates a IpamVlansDeleteNoContent with default headers values +func NewIpamVlansDeleteNoContent() *IpamVlansDeleteNoContent { + return &IpamVlansDeleteNoContent{} } -/*IPAMVlansDeleteNoContent handles this case with default header values. +/*IpamVlansDeleteNoContent handles this case with default header values. -IPAMVlansDeleteNoContent ipam vlans delete no content +IpamVlansDeleteNoContent ipam vlans delete no content */ -type IPAMVlansDeleteNoContent struct { +type IpamVlansDeleteNoContent struct { } -func (o *IPAMVlansDeleteNoContent) Error() string { +func (o *IpamVlansDeleteNoContent) Error() string { return fmt.Sprintf("[DELETE /ipam/vlans/{id}/][%d] ipamVlansDeleteNoContent ", 204) } -func (o *IPAMVlansDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVlansDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/ipam/ip_a_m_vlans_list_parameters.go b/netbox/client/ipam/ipam_vlans_list_parameters.go similarity index 54% rename from netbox/client/ipam/ip_a_m_vlans_list_parameters.go rename to netbox/client/ipam/ipam_vlans_list_parameters.go index 30a27c15eb6b295e8f73b8137860f06068ecbfa8..f5f03a756e60fca147363c5faab01d2e66917d5a 100644 --- a/netbox/client/ipam/ip_a_m_vlans_list_parameters.go +++ b/netbox/client/ipam/ipam_vlans_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,50 +33,56 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMVlansListParams creates a new IPAMVlansListParams object +// NewIpamVlansListParams creates a new IpamVlansListParams object // with the default values initialized. -func NewIPAMVlansListParams() *IPAMVlansListParams { +func NewIpamVlansListParams() *IpamVlansListParams { var () - return &IPAMVlansListParams{ + return &IpamVlansListParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVlansListParamsWithTimeout creates a new IPAMVlansListParams object +// NewIpamVlansListParamsWithTimeout creates a new IpamVlansListParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVlansListParamsWithTimeout(timeout time.Duration) *IPAMVlansListParams { +func NewIpamVlansListParamsWithTimeout(timeout time.Duration) *IpamVlansListParams { var () - return &IPAMVlansListParams{ + return &IpamVlansListParams{ timeout: timeout, } } -// NewIPAMVlansListParamsWithContext creates a new IPAMVlansListParams object +// NewIpamVlansListParamsWithContext creates a new IpamVlansListParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVlansListParamsWithContext(ctx context.Context) *IPAMVlansListParams { +func NewIpamVlansListParamsWithContext(ctx context.Context) *IpamVlansListParams { var () - return &IPAMVlansListParams{ + return &IpamVlansListParams{ Context: ctx, } } -// NewIPAMVlansListParamsWithHTTPClient creates a new IPAMVlansListParams object +// NewIpamVlansListParamsWithHTTPClient creates a new IpamVlansListParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVlansListParamsWithHTTPClient(client *http.Client) *IPAMVlansListParams { +func NewIpamVlansListParamsWithHTTPClient(client *http.Client) *IpamVlansListParams { var () - return &IPAMVlansListParams{ + return &IpamVlansListParams{ HTTPClient: client, } } -/*IPAMVlansListParams contains all the parameters to send to the API endpoint +/*IpamVlansListParams contains all the parameters to send to the API endpoint for the ipam vlans list operation typically these are written to a http.Request */ -type IPAMVlansListParams struct { - +type IpamVlansListParams struct { + + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*Group*/ Group *string /*GroupID*/ @@ -85,6 +92,12 @@ type IPAMVlansListParams struct { */ IDIn *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. @@ -99,6 +112,10 @@ type IPAMVlansListParams struct { Offset *int64 /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string /*Role*/ Role *string /*RoleID*/ @@ -128,244 +145,380 @@ type IPAMVlansListParams struct { } // WithTimeout adds the timeout to the ipam vlans list params -func (o *IPAMVlansListParams) WithTimeout(timeout time.Duration) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithTimeout(timeout time.Duration) *IpamVlansListParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vlans list params -func (o *IPAMVlansListParams) SetTimeout(timeout time.Duration) { +func (o *IpamVlansListParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vlans list params -func (o *IPAMVlansListParams) WithContext(ctx context.Context) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithContext(ctx context.Context) *IpamVlansListParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vlans list params -func (o *IPAMVlansListParams) SetContext(ctx context.Context) { +func (o *IpamVlansListParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vlans list params -func (o *IPAMVlansListParams) WithHTTPClient(client *http.Client) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithHTTPClient(client *http.Client) *IpamVlansListParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vlans list params -func (o *IPAMVlansListParams) SetHTTPClient(client *http.Client) { +func (o *IpamVlansListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithCreated adds the created to the ipam vlans list params +func (o *IpamVlansListParams) WithCreated(created *string) *IpamVlansListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the ipam vlans list params +func (o *IpamVlansListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the ipam vlans list params +func (o *IpamVlansListParams) WithCreatedGte(createdGte *string) *IpamVlansListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the ipam vlans list params +func (o *IpamVlansListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the ipam vlans list params +func (o *IpamVlansListParams) WithCreatedLte(createdLte *string) *IpamVlansListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the ipam vlans list params +func (o *IpamVlansListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + // WithGroup adds the group to the ipam vlans list params -func (o *IPAMVlansListParams) WithGroup(group *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithGroup(group *string) *IpamVlansListParams { o.SetGroup(group) return o } // SetGroup adds the group to the ipam vlans list params -func (o *IPAMVlansListParams) SetGroup(group *string) { +func (o *IpamVlansListParams) SetGroup(group *string) { o.Group = group } // WithGroupID adds the groupID to the ipam vlans list params -func (o *IPAMVlansListParams) WithGroupID(groupID *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithGroupID(groupID *string) *IpamVlansListParams { o.SetGroupID(groupID) return o } // SetGroupID adds the groupId to the ipam vlans list params -func (o *IPAMVlansListParams) SetGroupID(groupID *string) { +func (o *IpamVlansListParams) SetGroupID(groupID *string) { o.GroupID = groupID } // WithIDIn adds the iDIn to the ipam vlans list params -func (o *IPAMVlansListParams) WithIDIn(iDIn *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithIDIn(iDIn *string) *IpamVlansListParams { o.SetIDIn(iDIn) return o } // SetIDIn adds the idIn to the ipam vlans list params -func (o *IPAMVlansListParams) SetIDIn(iDIn *string) { +func (o *IpamVlansListParams) SetIDIn(iDIn *string) { o.IDIn = iDIn } +// WithLastUpdated adds the lastUpdated to the ipam vlans list params +func (o *IpamVlansListParams) WithLastUpdated(lastUpdated *string) *IpamVlansListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the ipam vlans list params +func (o *IpamVlansListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the ipam vlans list params +func (o *IpamVlansListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamVlansListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the ipam vlans list params +func (o *IpamVlansListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the ipam vlans list params +func (o *IpamVlansListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamVlansListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the ipam vlans list params +func (o *IpamVlansListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the ipam vlans list params -func (o *IPAMVlansListParams) WithLimit(limit *int64) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithLimit(limit *int64) *IpamVlansListParams { o.SetLimit(limit) return o } // SetLimit adds the limit to the ipam vlans list params -func (o *IPAMVlansListParams) SetLimit(limit *int64) { +func (o *IpamVlansListParams) SetLimit(limit *int64) { o.Limit = limit } // WithName adds the name to the ipam vlans list params -func (o *IPAMVlansListParams) WithName(name *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithName(name *string) *IpamVlansListParams { o.SetName(name) return o } // SetName adds the name to the ipam vlans list params -func (o *IPAMVlansListParams) SetName(name *string) { +func (o *IpamVlansListParams) SetName(name *string) { o.Name = name } // WithOffset adds the offset to the ipam vlans list params -func (o *IPAMVlansListParams) WithOffset(offset *int64) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithOffset(offset *int64) *IpamVlansListParams { o.SetOffset(offset) return o } // SetOffset adds the offset to the ipam vlans list params -func (o *IPAMVlansListParams) SetOffset(offset *int64) { +func (o *IpamVlansListParams) SetOffset(offset *int64) { o.Offset = offset } // WithQ adds the q to the ipam vlans list params -func (o *IPAMVlansListParams) WithQ(q *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithQ(q *string) *IpamVlansListParams { o.SetQ(q) return o } // SetQ adds the q to the ipam vlans list params -func (o *IPAMVlansListParams) SetQ(q *string) { +func (o *IpamVlansListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the ipam vlans list params +func (o *IpamVlansListParams) WithRegion(region *string) *IpamVlansListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the ipam vlans list params +func (o *IpamVlansListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the ipam vlans list params +func (o *IpamVlansListParams) WithRegionID(regionID *string) *IpamVlansListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the ipam vlans list params +func (o *IpamVlansListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + // WithRole adds the role to the ipam vlans list params -func (o *IPAMVlansListParams) WithRole(role *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithRole(role *string) *IpamVlansListParams { o.SetRole(role) return o } // SetRole adds the role to the ipam vlans list params -func (o *IPAMVlansListParams) SetRole(role *string) { +func (o *IpamVlansListParams) SetRole(role *string) { o.Role = role } // WithRoleID adds the roleID to the ipam vlans list params -func (o *IPAMVlansListParams) WithRoleID(roleID *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithRoleID(roleID *string) *IpamVlansListParams { o.SetRoleID(roleID) return o } // SetRoleID adds the roleId to the ipam vlans list params -func (o *IPAMVlansListParams) SetRoleID(roleID *string) { +func (o *IpamVlansListParams) SetRoleID(roleID *string) { o.RoleID = roleID } // WithSite adds the site to the ipam vlans list params -func (o *IPAMVlansListParams) WithSite(site *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithSite(site *string) *IpamVlansListParams { o.SetSite(site) return o } // SetSite adds the site to the ipam vlans list params -func (o *IPAMVlansListParams) SetSite(site *string) { +func (o *IpamVlansListParams) SetSite(site *string) { o.Site = site } // WithSiteID adds the siteID to the ipam vlans list params -func (o *IPAMVlansListParams) WithSiteID(siteID *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithSiteID(siteID *string) *IpamVlansListParams { o.SetSiteID(siteID) return o } // SetSiteID adds the siteId to the ipam vlans list params -func (o *IPAMVlansListParams) SetSiteID(siteID *string) { +func (o *IpamVlansListParams) SetSiteID(siteID *string) { o.SiteID = siteID } // WithStatus adds the status to the ipam vlans list params -func (o *IPAMVlansListParams) WithStatus(status *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithStatus(status *string) *IpamVlansListParams { o.SetStatus(status) return o } // SetStatus adds the status to the ipam vlans list params -func (o *IPAMVlansListParams) SetStatus(status *string) { +func (o *IpamVlansListParams) SetStatus(status *string) { o.Status = status } // WithTag adds the tag to the ipam vlans list params -func (o *IPAMVlansListParams) WithTag(tag *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithTag(tag *string) *IpamVlansListParams { o.SetTag(tag) return o } // SetTag adds the tag to the ipam vlans list params -func (o *IPAMVlansListParams) SetTag(tag *string) { +func (o *IpamVlansListParams) SetTag(tag *string) { o.Tag = tag } // WithTenant adds the tenant to the ipam vlans list params -func (o *IPAMVlansListParams) WithTenant(tenant *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithTenant(tenant *string) *IpamVlansListParams { o.SetTenant(tenant) return o } // SetTenant adds the tenant to the ipam vlans list params -func (o *IPAMVlansListParams) SetTenant(tenant *string) { +func (o *IpamVlansListParams) SetTenant(tenant *string) { o.Tenant = tenant } // WithTenantGroup adds the tenantGroup to the ipam vlans list params -func (o *IPAMVlansListParams) WithTenantGroup(tenantGroup *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithTenantGroup(tenantGroup *string) *IpamVlansListParams { o.SetTenantGroup(tenantGroup) return o } // SetTenantGroup adds the tenantGroup to the ipam vlans list params -func (o *IPAMVlansListParams) SetTenantGroup(tenantGroup *string) { +func (o *IpamVlansListParams) SetTenantGroup(tenantGroup *string) { o.TenantGroup = tenantGroup } // WithTenantGroupID adds the tenantGroupID to the ipam vlans list params -func (o *IPAMVlansListParams) WithTenantGroupID(tenantGroupID *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithTenantGroupID(tenantGroupID *string) *IpamVlansListParams { o.SetTenantGroupID(tenantGroupID) return o } // SetTenantGroupID adds the tenantGroupId to the ipam vlans list params -func (o *IPAMVlansListParams) SetTenantGroupID(tenantGroupID *string) { +func (o *IpamVlansListParams) SetTenantGroupID(tenantGroupID *string) { o.TenantGroupID = tenantGroupID } // WithTenantID adds the tenantID to the ipam vlans list params -func (o *IPAMVlansListParams) WithTenantID(tenantID *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithTenantID(tenantID *string) *IpamVlansListParams { o.SetTenantID(tenantID) return o } // SetTenantID adds the tenantId to the ipam vlans list params -func (o *IPAMVlansListParams) SetTenantID(tenantID *string) { +func (o *IpamVlansListParams) SetTenantID(tenantID *string) { o.TenantID = tenantID } // WithVid adds the vid to the ipam vlans list params -func (o *IPAMVlansListParams) WithVid(vid *string) *IPAMVlansListParams { +func (o *IpamVlansListParams) WithVid(vid *string) *IpamVlansListParams { o.SetVid(vid) return o } // SetVid adds the vid to the ipam vlans list params -func (o *IPAMVlansListParams) SetVid(vid *string) { +func (o *IpamVlansListParams) SetVid(vid *string) { o.Vid = vid } // WriteToRequest writes these params to a swagger request -func (o *IPAMVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error + if o.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.Group != nil { // query param group @@ -414,6 +567,54 @@ func (o *IPAMVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } + 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 @@ -478,6 +679,38 @@ func (o *IPAMVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + if o.Role != nil { // query param role diff --git a/netbox/client/ipam/ip_a_m_vlans_list_responses.go b/netbox/client/ipam/ipam_vlans_list_responses.go similarity index 72% rename from netbox/client/ipam/ip_a_m_vlans_list_responses.go rename to netbox/client/ipam/ipam_vlans_list_responses.go index d55f9516b01a1e3bdf7b136ded22fb2f90174f20..e5e425d6cb584a2df54ac8828e21ce3808251564 100644 --- a/netbox/client/ipam/ip_a_m_vlans_list_responses.go +++ b/netbox/client/ipam/ipam_vlans_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,20 +32,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVlansListReader is a Reader for the IPAMVlansList structure. -type IPAMVlansListReader struct { +// IpamVlansListReader is a Reader for the IpamVlansList structure. +type IpamVlansListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVlansListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVlansListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMVlansListOK() + result := NewIpamVlansListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -55,26 +55,30 @@ func (o *IPAMVlansListReader) ReadResponse(response runtime.ClientResponse, cons } } -// NewIPAMVlansListOK creates a IPAMVlansListOK with default headers values -func NewIPAMVlansListOK() *IPAMVlansListOK { - return &IPAMVlansListOK{} +// NewIpamVlansListOK creates a IpamVlansListOK with default headers values +func NewIpamVlansListOK() *IpamVlansListOK { + return &IpamVlansListOK{} } -/*IPAMVlansListOK handles this case with default header values. +/*IpamVlansListOK handles this case with default header values. -IPAMVlansListOK ipam vlans list o k +IpamVlansListOK ipam vlans list o k */ -type IPAMVlansListOK struct { - Payload *IPAMVlansListOKBody +type IpamVlansListOK struct { + Payload *IpamVlansListOKBody } -func (o *IPAMVlansListOK) Error() string { +func (o *IpamVlansListOK) Error() string { return fmt.Sprintf("[GET /ipam/vlans/][%d] ipamVlansListOK %+v", 200, o.Payload) } -func (o *IPAMVlansListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVlansListOK) GetPayload() *IpamVlansListOKBody { + return o.Payload +} + +func (o *IpamVlansListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(IPAMVlansListOKBody) + o.Payload = new(IpamVlansListOKBody) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -84,10 +88,10 @@ func (o *IPAMVlansListOK) readResponse(response runtime.ClientResponse, consumer return nil } -/*IPAMVlansListOKBody IP a m vlans list o k body -swagger:model IPAMVlansListOKBody +/*IpamVlansListOKBody ipam vlans list o k body +swagger:model IpamVlansListOKBody */ -type IPAMVlansListOKBody struct { +type IpamVlansListOKBody struct { // count // Required: true @@ -106,8 +110,8 @@ type IPAMVlansListOKBody struct { Results []*models.VLAN `json:"results"` } -// Validate validates this IP a m vlans list o k body -func (o *IPAMVlansListOKBody) Validate(formats strfmt.Registry) error { +// Validate validates this ipam vlans list o k body +func (o *IpamVlansListOKBody) Validate(formats strfmt.Registry) error { var res []error if err := o.validateCount(formats); err != nil { @@ -132,7 +136,7 @@ func (o *IPAMVlansListOKBody) Validate(formats strfmt.Registry) error { return nil } -func (o *IPAMVlansListOKBody) validateCount(formats strfmt.Registry) error { +func (o *IpamVlansListOKBody) validateCount(formats strfmt.Registry) error { if err := validate.Required("ipamVlansListOK"+"."+"count", "body", o.Count); err != nil { return err @@ -141,7 +145,7 @@ func (o *IPAMVlansListOKBody) validateCount(formats strfmt.Registry) error { return nil } -func (o *IPAMVlansListOKBody) validateNext(formats strfmt.Registry) error { +func (o *IpamVlansListOKBody) validateNext(formats strfmt.Registry) error { if swag.IsZero(o.Next) { // not required return nil @@ -154,7 +158,7 @@ func (o *IPAMVlansListOKBody) validateNext(formats strfmt.Registry) error { return nil } -func (o *IPAMVlansListOKBody) validatePrevious(formats strfmt.Registry) error { +func (o *IpamVlansListOKBody) validatePrevious(formats strfmt.Registry) error { if swag.IsZero(o.Previous) { // not required return nil @@ -167,7 +171,7 @@ func (o *IPAMVlansListOKBody) validatePrevious(formats strfmt.Registry) error { return nil } -func (o *IPAMVlansListOKBody) validateResults(formats strfmt.Registry) error { +func (o *IpamVlansListOKBody) validateResults(formats strfmt.Registry) error { if err := validate.Required("ipamVlansListOK"+"."+"results", "body", o.Results); err != nil { return err @@ -193,7 +197,7 @@ func (o *IPAMVlansListOKBody) validateResults(formats strfmt.Registry) error { } // MarshalBinary interface implementation -func (o *IPAMVlansListOKBody) MarshalBinary() ([]byte, error) { +func (o *IpamVlansListOKBody) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -201,8 +205,8 @@ func (o *IPAMVlansListOKBody) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *IPAMVlansListOKBody) UnmarshalBinary(b []byte) error { - var res IPAMVlansListOKBody +func (o *IpamVlansListOKBody) UnmarshalBinary(b []byte) error { + var res IpamVlansListOKBody if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/netbox/client/ipam/ip_a_m_vlans_partial_update_parameters.go b/netbox/client/ipam/ipam_vlans_partial_update_parameters.go similarity index 64% rename from netbox/client/ipam/ip_a_m_vlans_partial_update_parameters.go rename to netbox/client/ipam/ipam_vlans_partial_update_parameters.go index 82bfc6003151f10180dea4d4652dd4a113ab61fc..5fc09349232bee62ca5d9ca4859539eabe2879a1 100644 --- a/netbox/client/ipam/ip_a_m_vlans_partial_update_parameters.go +++ b/netbox/client/ipam/ipam_vlans_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMVlansPartialUpdateParams creates a new IPAMVlansPartialUpdateParams object +// NewIpamVlansPartialUpdateParams creates a new IpamVlansPartialUpdateParams object // with the default values initialized. -func NewIPAMVlansPartialUpdateParams() *IPAMVlansPartialUpdateParams { +func NewIpamVlansPartialUpdateParams() *IpamVlansPartialUpdateParams { var () - return &IPAMVlansPartialUpdateParams{ + return &IpamVlansPartialUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVlansPartialUpdateParamsWithTimeout creates a new IPAMVlansPartialUpdateParams object +// NewIpamVlansPartialUpdateParamsWithTimeout creates a new IpamVlansPartialUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVlansPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMVlansPartialUpdateParams { +func NewIpamVlansPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamVlansPartialUpdateParams { var () - return &IPAMVlansPartialUpdateParams{ + return &IpamVlansPartialUpdateParams{ timeout: timeout, } } -// NewIPAMVlansPartialUpdateParamsWithContext creates a new IPAMVlansPartialUpdateParams object +// NewIpamVlansPartialUpdateParamsWithContext creates a new IpamVlansPartialUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVlansPartialUpdateParamsWithContext(ctx context.Context) *IPAMVlansPartialUpdateParams { +func NewIpamVlansPartialUpdateParamsWithContext(ctx context.Context) *IpamVlansPartialUpdateParams { var () - return &IPAMVlansPartialUpdateParams{ + return &IpamVlansPartialUpdateParams{ Context: ctx, } } -// NewIPAMVlansPartialUpdateParamsWithHTTPClient creates a new IPAMVlansPartialUpdateParams object +// NewIpamVlansPartialUpdateParamsWithHTTPClient creates a new IpamVlansPartialUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVlansPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMVlansPartialUpdateParams { +func NewIpamVlansPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamVlansPartialUpdateParams { var () - return &IPAMVlansPartialUpdateParams{ + return &IpamVlansPartialUpdateParams{ HTTPClient: client, } } -/*IPAMVlansPartialUpdateParams contains all the parameters to send to the API endpoint +/*IpamVlansPartialUpdateParams contains all the parameters to send to the API endpoint for the ipam vlans partial update operation typically these are written to a http.Request */ -type IPAMVlansPartialUpdateParams struct { +type IpamVlansPartialUpdateParams struct { /*Data*/ Data *models.WritableVLAN @@ -92,62 +93,62 @@ type IPAMVlansPartialUpdateParams struct { } // WithTimeout adds the timeout to the ipam vlans partial update params -func (o *IPAMVlansPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMVlansPartialUpdateParams { +func (o *IpamVlansPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamVlansPartialUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vlans partial update params -func (o *IPAMVlansPartialUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamVlansPartialUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vlans partial update params -func (o *IPAMVlansPartialUpdateParams) WithContext(ctx context.Context) *IPAMVlansPartialUpdateParams { +func (o *IpamVlansPartialUpdateParams) WithContext(ctx context.Context) *IpamVlansPartialUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vlans partial update params -func (o *IPAMVlansPartialUpdateParams) SetContext(ctx context.Context) { +func (o *IpamVlansPartialUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vlans partial update params -func (o *IPAMVlansPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMVlansPartialUpdateParams { +func (o *IpamVlansPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamVlansPartialUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vlans partial update params -func (o *IPAMVlansPartialUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamVlansPartialUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam vlans partial update params -func (o *IPAMVlansPartialUpdateParams) WithData(data *models.WritableVLAN) *IPAMVlansPartialUpdateParams { +func (o *IpamVlansPartialUpdateParams) WithData(data *models.WritableVLAN) *IpamVlansPartialUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam vlans partial update params -func (o *IPAMVlansPartialUpdateParams) SetData(data *models.WritableVLAN) { +func (o *IpamVlansPartialUpdateParams) SetData(data *models.WritableVLAN) { o.Data = data } // WithID adds the id to the ipam vlans partial update params -func (o *IPAMVlansPartialUpdateParams) WithID(id int64) *IPAMVlansPartialUpdateParams { +func (o *IpamVlansPartialUpdateParams) WithID(id int64) *IpamVlansPartialUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam vlans partial update params -func (o *IPAMVlansPartialUpdateParams) SetID(id int64) { +func (o *IpamVlansPartialUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMVlansPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVlansPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vlans_partial_update_responses.go b/netbox/client/ipam/ipam_vlans_partial_update_responses.go similarity index 68% rename from netbox/client/ipam/ip_a_m_vlans_partial_update_responses.go rename to netbox/client/ipam/ipam_vlans_partial_update_responses.go index b5cbce81c8b5b9fe2d10cc1e36816f1c6bfda96e..5bfc75aa586b9ab7ab6493300db35000230013c4 100644 --- a/netbox/client/ipam/ip_a_m_vlans_partial_update_responses.go +++ b/netbox/client/ipam/ipam_vlans_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVlansPartialUpdateReader is a Reader for the IPAMVlansPartialUpdate structure. -type IPAMVlansPartialUpdateReader struct { +// IpamVlansPartialUpdateReader is a Reader for the IpamVlansPartialUpdate structure. +type IpamVlansPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVlansPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVlansPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMVlansPartialUpdateOK() + result := NewIpamVlansPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMVlansPartialUpdateReader) ReadResponse(response runtime.ClientRespo } } -// NewIPAMVlansPartialUpdateOK creates a IPAMVlansPartialUpdateOK with default headers values -func NewIPAMVlansPartialUpdateOK() *IPAMVlansPartialUpdateOK { - return &IPAMVlansPartialUpdateOK{} +// NewIpamVlansPartialUpdateOK creates a IpamVlansPartialUpdateOK with default headers values +func NewIpamVlansPartialUpdateOK() *IpamVlansPartialUpdateOK { + return &IpamVlansPartialUpdateOK{} } -/*IPAMVlansPartialUpdateOK handles this case with default header values. +/*IpamVlansPartialUpdateOK handles this case with default header values. -IPAMVlansPartialUpdateOK ipam vlans partial update o k +IpamVlansPartialUpdateOK ipam vlans partial update o k */ -type IPAMVlansPartialUpdateOK struct { +type IpamVlansPartialUpdateOK struct { Payload *models.VLAN } -func (o *IPAMVlansPartialUpdateOK) Error() string { +func (o *IpamVlansPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /ipam/vlans/{id}/][%d] ipamVlansPartialUpdateOK %+v", 200, o.Payload) } -func (o *IPAMVlansPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVlansPartialUpdateOK) GetPayload() *models.VLAN { + return o.Payload +} + +func (o *IpamVlansPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VLAN) diff --git a/netbox/client/ipam/ip_a_m_vlans_read_parameters.go b/netbox/client/ipam/ipam_vlans_read_parameters.go similarity index 66% rename from netbox/client/ipam/ip_a_m_vlans_read_parameters.go rename to netbox/client/ipam/ipam_vlans_read_parameters.go index db8ff773af6a04d13c0fe7d387e69511f632f8b6..524b26d43822d64bf29883ec2bded418aa94677c 100644 --- a/netbox/client/ipam/ip_a_m_vlans_read_parameters.go +++ b/netbox/client/ipam/ipam_vlans_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMVlansReadParams creates a new IPAMVlansReadParams object +// NewIpamVlansReadParams creates a new IpamVlansReadParams object // with the default values initialized. -func NewIPAMVlansReadParams() *IPAMVlansReadParams { +func NewIpamVlansReadParams() *IpamVlansReadParams { var () - return &IPAMVlansReadParams{ + return &IpamVlansReadParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVlansReadParamsWithTimeout creates a new IPAMVlansReadParams object +// NewIpamVlansReadParamsWithTimeout creates a new IpamVlansReadParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVlansReadParamsWithTimeout(timeout time.Duration) *IPAMVlansReadParams { +func NewIpamVlansReadParamsWithTimeout(timeout time.Duration) *IpamVlansReadParams { var () - return &IPAMVlansReadParams{ + return &IpamVlansReadParams{ timeout: timeout, } } -// NewIPAMVlansReadParamsWithContext creates a new IPAMVlansReadParams object +// NewIpamVlansReadParamsWithContext creates a new IpamVlansReadParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVlansReadParamsWithContext(ctx context.Context) *IPAMVlansReadParams { +func NewIpamVlansReadParamsWithContext(ctx context.Context) *IpamVlansReadParams { var () - return &IPAMVlansReadParams{ + return &IpamVlansReadParams{ Context: ctx, } } -// NewIPAMVlansReadParamsWithHTTPClient creates a new IPAMVlansReadParams object +// NewIpamVlansReadParamsWithHTTPClient creates a new IpamVlansReadParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVlansReadParamsWithHTTPClient(client *http.Client) *IPAMVlansReadParams { +func NewIpamVlansReadParamsWithHTTPClient(client *http.Client) *IpamVlansReadParams { var () - return &IPAMVlansReadParams{ + return &IpamVlansReadParams{ HTTPClient: client, } } -/*IPAMVlansReadParams contains all the parameters to send to the API endpoint +/*IpamVlansReadParams contains all the parameters to send to the API endpoint for the ipam vlans read operation typically these are written to a http.Request */ -type IPAMVlansReadParams struct { +type IpamVlansReadParams struct { /*ID A unique integer value identifying this VLAN. @@ -88,51 +89,51 @@ type IPAMVlansReadParams struct { } // WithTimeout adds the timeout to the ipam vlans read params -func (o *IPAMVlansReadParams) WithTimeout(timeout time.Duration) *IPAMVlansReadParams { +func (o *IpamVlansReadParams) WithTimeout(timeout time.Duration) *IpamVlansReadParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vlans read params -func (o *IPAMVlansReadParams) SetTimeout(timeout time.Duration) { +func (o *IpamVlansReadParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vlans read params -func (o *IPAMVlansReadParams) WithContext(ctx context.Context) *IPAMVlansReadParams { +func (o *IpamVlansReadParams) WithContext(ctx context.Context) *IpamVlansReadParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vlans read params -func (o *IPAMVlansReadParams) SetContext(ctx context.Context) { +func (o *IpamVlansReadParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vlans read params -func (o *IPAMVlansReadParams) WithHTTPClient(client *http.Client) *IPAMVlansReadParams { +func (o *IpamVlansReadParams) WithHTTPClient(client *http.Client) *IpamVlansReadParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vlans read params -func (o *IPAMVlansReadParams) SetHTTPClient(client *http.Client) { +func (o *IpamVlansReadParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam vlans read params -func (o *IPAMVlansReadParams) WithID(id int64) *IPAMVlansReadParams { +func (o *IpamVlansReadParams) WithID(id int64) *IpamVlansReadParams { o.SetID(id) return o } // SetID adds the id to the ipam vlans read params -func (o *IPAMVlansReadParams) SetID(id int64) { +func (o *IpamVlansReadParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMVlansReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVlansReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vlans_read_responses.go b/netbox/client/ipam/ipam_vlans_read_responses.go similarity index 70% rename from netbox/client/ipam/ip_a_m_vlans_read_responses.go rename to netbox/client/ipam/ipam_vlans_read_responses.go index 56556a726f591b8806f23fd60ca6cd9f9a697fb9..85b43a553198cade53e282c91b7085228d74787a 100644 --- a/netbox/client/ipam/ip_a_m_vlans_read_responses.go +++ b/netbox/client/ipam/ipam_vlans_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVlansReadReader is a Reader for the IPAMVlansRead structure. -type IPAMVlansReadReader struct { +// IpamVlansReadReader is a Reader for the IpamVlansRead structure. +type IpamVlansReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVlansReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVlansReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMVlansReadOK() + result := NewIpamVlansReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMVlansReadReader) ReadResponse(response runtime.ClientResponse, cons } } -// NewIPAMVlansReadOK creates a IPAMVlansReadOK with default headers values -func NewIPAMVlansReadOK() *IPAMVlansReadOK { - return &IPAMVlansReadOK{} +// NewIpamVlansReadOK creates a IpamVlansReadOK with default headers values +func NewIpamVlansReadOK() *IpamVlansReadOK { + return &IpamVlansReadOK{} } -/*IPAMVlansReadOK handles this case with default header values. +/*IpamVlansReadOK handles this case with default header values. -IPAMVlansReadOK ipam vlans read o k +IpamVlansReadOK ipam vlans read o k */ -type IPAMVlansReadOK struct { +type IpamVlansReadOK struct { Payload *models.VLAN } -func (o *IPAMVlansReadOK) Error() string { +func (o *IpamVlansReadOK) Error() string { return fmt.Sprintf("[GET /ipam/vlans/{id}/][%d] ipamVlansReadOK %+v", 200, o.Payload) } -func (o *IPAMVlansReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVlansReadOK) GetPayload() *models.VLAN { + return o.Payload +} + +func (o *IpamVlansReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VLAN) diff --git a/netbox/client/ipam/ip_a_m_vlans_update_parameters.go b/netbox/client/ipam/ipam_vlans_update_parameters.go similarity index 65% rename from netbox/client/ipam/ip_a_m_vlans_update_parameters.go rename to netbox/client/ipam/ipam_vlans_update_parameters.go index b25b28996f53f80dc1664ae8dd693091b27d089a..6af7a5c410e45861812de4def92e3395eba64014 100644 --- a/netbox/client/ipam/ip_a_m_vlans_update_parameters.go +++ b/netbox/client/ipam/ipam_vlans_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMVlansUpdateParams creates a new IPAMVlansUpdateParams object +// NewIpamVlansUpdateParams creates a new IpamVlansUpdateParams object // with the default values initialized. -func NewIPAMVlansUpdateParams() *IPAMVlansUpdateParams { +func NewIpamVlansUpdateParams() *IpamVlansUpdateParams { var () - return &IPAMVlansUpdateParams{ + return &IpamVlansUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVlansUpdateParamsWithTimeout creates a new IPAMVlansUpdateParams object +// NewIpamVlansUpdateParamsWithTimeout creates a new IpamVlansUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVlansUpdateParamsWithTimeout(timeout time.Duration) *IPAMVlansUpdateParams { +func NewIpamVlansUpdateParamsWithTimeout(timeout time.Duration) *IpamVlansUpdateParams { var () - return &IPAMVlansUpdateParams{ + return &IpamVlansUpdateParams{ timeout: timeout, } } -// NewIPAMVlansUpdateParamsWithContext creates a new IPAMVlansUpdateParams object +// NewIpamVlansUpdateParamsWithContext creates a new IpamVlansUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVlansUpdateParamsWithContext(ctx context.Context) *IPAMVlansUpdateParams { +func NewIpamVlansUpdateParamsWithContext(ctx context.Context) *IpamVlansUpdateParams { var () - return &IPAMVlansUpdateParams{ + return &IpamVlansUpdateParams{ Context: ctx, } } -// NewIPAMVlansUpdateParamsWithHTTPClient creates a new IPAMVlansUpdateParams object +// NewIpamVlansUpdateParamsWithHTTPClient creates a new IpamVlansUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVlansUpdateParamsWithHTTPClient(client *http.Client) *IPAMVlansUpdateParams { +func NewIpamVlansUpdateParamsWithHTTPClient(client *http.Client) *IpamVlansUpdateParams { var () - return &IPAMVlansUpdateParams{ + return &IpamVlansUpdateParams{ HTTPClient: client, } } -/*IPAMVlansUpdateParams contains all the parameters to send to the API endpoint +/*IpamVlansUpdateParams contains all the parameters to send to the API endpoint for the ipam vlans update operation typically these are written to a http.Request */ -type IPAMVlansUpdateParams struct { +type IpamVlansUpdateParams struct { /*Data*/ Data *models.WritableVLAN @@ -92,62 +93,62 @@ type IPAMVlansUpdateParams struct { } // WithTimeout adds the timeout to the ipam vlans update params -func (o *IPAMVlansUpdateParams) WithTimeout(timeout time.Duration) *IPAMVlansUpdateParams { +func (o *IpamVlansUpdateParams) WithTimeout(timeout time.Duration) *IpamVlansUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vlans update params -func (o *IPAMVlansUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamVlansUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vlans update params -func (o *IPAMVlansUpdateParams) WithContext(ctx context.Context) *IPAMVlansUpdateParams { +func (o *IpamVlansUpdateParams) WithContext(ctx context.Context) *IpamVlansUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vlans update params -func (o *IPAMVlansUpdateParams) SetContext(ctx context.Context) { +func (o *IpamVlansUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vlans update params -func (o *IPAMVlansUpdateParams) WithHTTPClient(client *http.Client) *IPAMVlansUpdateParams { +func (o *IpamVlansUpdateParams) WithHTTPClient(client *http.Client) *IpamVlansUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vlans update params -func (o *IPAMVlansUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamVlansUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam vlans update params -func (o *IPAMVlansUpdateParams) WithData(data *models.WritableVLAN) *IPAMVlansUpdateParams { +func (o *IpamVlansUpdateParams) WithData(data *models.WritableVLAN) *IpamVlansUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam vlans update params -func (o *IPAMVlansUpdateParams) SetData(data *models.WritableVLAN) { +func (o *IpamVlansUpdateParams) SetData(data *models.WritableVLAN) { o.Data = data } // WithID adds the id to the ipam vlans update params -func (o *IPAMVlansUpdateParams) WithID(id int64) *IPAMVlansUpdateParams { +func (o *IpamVlansUpdateParams) WithID(id int64) *IpamVlansUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam vlans update params -func (o *IPAMVlansUpdateParams) SetID(id int64) { +func (o *IpamVlansUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMVlansUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVlansUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vlans_update_responses.go b/netbox/client/ipam/ipam_vlans_update_responses.go similarity index 70% rename from netbox/client/ipam/ip_a_m_vlans_update_responses.go rename to netbox/client/ipam/ipam_vlans_update_responses.go index 051d980b45cbf87c545d65e424d8730894cea7ce..1b23fd79ea911fa41c36730a6d44d7621d33716f 100644 --- a/netbox/client/ipam/ip_a_m_vlans_update_responses.go +++ b/netbox/client/ipam/ipam_vlans_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVlansUpdateReader is a Reader for the IPAMVlansUpdate structure. -type IPAMVlansUpdateReader struct { +// IpamVlansUpdateReader is a Reader for the IpamVlansUpdate structure. +type IpamVlansUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVlansUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVlansUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMVlansUpdateOK() + result := NewIpamVlansUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMVlansUpdateReader) ReadResponse(response runtime.ClientResponse, co } } -// NewIPAMVlansUpdateOK creates a IPAMVlansUpdateOK with default headers values -func NewIPAMVlansUpdateOK() *IPAMVlansUpdateOK { - return &IPAMVlansUpdateOK{} +// NewIpamVlansUpdateOK creates a IpamVlansUpdateOK with default headers values +func NewIpamVlansUpdateOK() *IpamVlansUpdateOK { + return &IpamVlansUpdateOK{} } -/*IPAMVlansUpdateOK handles this case with default header values. +/*IpamVlansUpdateOK handles this case with default header values. -IPAMVlansUpdateOK ipam vlans update o k +IpamVlansUpdateOK ipam vlans update o k */ -type IPAMVlansUpdateOK struct { +type IpamVlansUpdateOK struct { Payload *models.VLAN } -func (o *IPAMVlansUpdateOK) Error() string { +func (o *IpamVlansUpdateOK) Error() string { return fmt.Sprintf("[PUT /ipam/vlans/{id}/][%d] ipamVlansUpdateOK %+v", 200, o.Payload) } -func (o *IPAMVlansUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVlansUpdateOK) GetPayload() *models.VLAN { + return o.Payload +} + +func (o *IpamVlansUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VLAN) diff --git a/netbox/client/ipam/ip_a_m_vrfs_create_parameters.go b/netbox/client/ipam/ipam_vrfs_create_parameters.go similarity index 64% rename from netbox/client/ipam/ip_a_m_vrfs_create_parameters.go rename to netbox/client/ipam/ipam_vrfs_create_parameters.go index 3384f375fb89cf78e872b9cf61051dae800abe96..e2bfdc35656fe2433c9ff04909b4cfd5f2d93214 100644 --- a/netbox/client/ipam/ip_a_m_vrfs_create_parameters.go +++ b/netbox/client/ipam/ipam_vrfs_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -30,52 +31,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMVrfsCreateParams creates a new IPAMVrfsCreateParams object +// NewIpamVrfsCreateParams creates a new IpamVrfsCreateParams object // with the default values initialized. -func NewIPAMVrfsCreateParams() *IPAMVrfsCreateParams { +func NewIpamVrfsCreateParams() *IpamVrfsCreateParams { var () - return &IPAMVrfsCreateParams{ + return &IpamVrfsCreateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVrfsCreateParamsWithTimeout creates a new IPAMVrfsCreateParams object +// NewIpamVrfsCreateParamsWithTimeout creates a new IpamVrfsCreateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVrfsCreateParamsWithTimeout(timeout time.Duration) *IPAMVrfsCreateParams { +func NewIpamVrfsCreateParamsWithTimeout(timeout time.Duration) *IpamVrfsCreateParams { var () - return &IPAMVrfsCreateParams{ + return &IpamVrfsCreateParams{ timeout: timeout, } } -// NewIPAMVrfsCreateParamsWithContext creates a new IPAMVrfsCreateParams object +// NewIpamVrfsCreateParamsWithContext creates a new IpamVrfsCreateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVrfsCreateParamsWithContext(ctx context.Context) *IPAMVrfsCreateParams { +func NewIpamVrfsCreateParamsWithContext(ctx context.Context) *IpamVrfsCreateParams { var () - return &IPAMVrfsCreateParams{ + return &IpamVrfsCreateParams{ Context: ctx, } } -// NewIPAMVrfsCreateParamsWithHTTPClient creates a new IPAMVrfsCreateParams object +// NewIpamVrfsCreateParamsWithHTTPClient creates a new IpamVrfsCreateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVrfsCreateParamsWithHTTPClient(client *http.Client) *IPAMVrfsCreateParams { +func NewIpamVrfsCreateParamsWithHTTPClient(client *http.Client) *IpamVrfsCreateParams { var () - return &IPAMVrfsCreateParams{ + return &IpamVrfsCreateParams{ HTTPClient: client, } } -/*IPAMVrfsCreateParams contains all the parameters to send to the API endpoint +/*IpamVrfsCreateParams contains all the parameters to send to the API endpoint for the ipam vrfs create operation typically these are written to a http.Request */ -type IPAMVrfsCreateParams struct { +type IpamVrfsCreateParams struct { /*Data*/ Data *models.WritableVRF @@ -86,51 +87,51 @@ type IPAMVrfsCreateParams struct { } // WithTimeout adds the timeout to the ipam vrfs create params -func (o *IPAMVrfsCreateParams) WithTimeout(timeout time.Duration) *IPAMVrfsCreateParams { +func (o *IpamVrfsCreateParams) WithTimeout(timeout time.Duration) *IpamVrfsCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vrfs create params -func (o *IPAMVrfsCreateParams) SetTimeout(timeout time.Duration) { +func (o *IpamVrfsCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vrfs create params -func (o *IPAMVrfsCreateParams) WithContext(ctx context.Context) *IPAMVrfsCreateParams { +func (o *IpamVrfsCreateParams) WithContext(ctx context.Context) *IpamVrfsCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vrfs create params -func (o *IPAMVrfsCreateParams) SetContext(ctx context.Context) { +func (o *IpamVrfsCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vrfs create params -func (o *IPAMVrfsCreateParams) WithHTTPClient(client *http.Client) *IPAMVrfsCreateParams { +func (o *IpamVrfsCreateParams) WithHTTPClient(client *http.Client) *IpamVrfsCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vrfs create params -func (o *IPAMVrfsCreateParams) SetHTTPClient(client *http.Client) { +func (o *IpamVrfsCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam vrfs create params -func (o *IPAMVrfsCreateParams) WithData(data *models.WritableVRF) *IPAMVrfsCreateParams { +func (o *IpamVrfsCreateParams) WithData(data *models.WritableVRF) *IpamVrfsCreateParams { o.SetData(data) return o } // SetData adds the data to the ipam vrfs create params -func (o *IPAMVrfsCreateParams) SetData(data *models.WritableVRF) { +func (o *IpamVrfsCreateParams) SetData(data *models.WritableVRF) { o.Data = data } // WriteToRequest writes these params to a swagger request -func (o *IPAMVrfsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVrfsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vrfs_create_responses.go b/netbox/client/ipam/ipam_vrfs_create_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_vrfs_create_responses.go rename to netbox/client/ipam/ipam_vrfs_create_responses.go index 4929c36156775a3192c57e990a8c21d48308c2ba..5d12d67e188c6159e849218847850b8093a59bba 100644 --- a/netbox/client/ipam/ip_a_m_vrfs_create_responses.go +++ b/netbox/client/ipam/ipam_vrfs_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVrfsCreateReader is a Reader for the IPAMVrfsCreate structure. -type IPAMVrfsCreateReader struct { +// IpamVrfsCreateReader is a Reader for the IpamVrfsCreate structure. +type IpamVrfsCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVrfsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVrfsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: - result := NewIPAMVrfsCreateCreated() + result := NewIpamVrfsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMVrfsCreateReader) ReadResponse(response runtime.ClientResponse, con } } -// NewIPAMVrfsCreateCreated creates a IPAMVrfsCreateCreated with default headers values -func NewIPAMVrfsCreateCreated() *IPAMVrfsCreateCreated { - return &IPAMVrfsCreateCreated{} +// NewIpamVrfsCreateCreated creates a IpamVrfsCreateCreated with default headers values +func NewIpamVrfsCreateCreated() *IpamVrfsCreateCreated { + return &IpamVrfsCreateCreated{} } -/*IPAMVrfsCreateCreated handles this case with default header values. +/*IpamVrfsCreateCreated handles this case with default header values. -IPAMVrfsCreateCreated ipam vrfs create created +IpamVrfsCreateCreated ipam vrfs create created */ -type IPAMVrfsCreateCreated struct { +type IpamVrfsCreateCreated struct { Payload *models.VRF } -func (o *IPAMVrfsCreateCreated) Error() string { +func (o *IpamVrfsCreateCreated) Error() string { return fmt.Sprintf("[POST /ipam/vrfs/][%d] ipamVrfsCreateCreated %+v", 201, o.Payload) } -func (o *IPAMVrfsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVrfsCreateCreated) GetPayload() *models.VRF { + return o.Payload +} + +func (o *IpamVrfsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VRF) diff --git a/netbox/client/ipam/ip_a_m_vrfs_delete_parameters.go b/netbox/client/ipam/ipam_vrfs_delete_parameters.go similarity index 66% rename from netbox/client/ipam/ip_a_m_vrfs_delete_parameters.go rename to netbox/client/ipam/ipam_vrfs_delete_parameters.go index 04c617e2c7436bb34b751fe4fe3e1235310708da..1fd39d74bd4f8c44b1273280b0327e1a72db64ac 100644 --- a/netbox/client/ipam/ip_a_m_vrfs_delete_parameters.go +++ b/netbox/client/ipam/ipam_vrfs_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMVrfsDeleteParams creates a new IPAMVrfsDeleteParams object +// NewIpamVrfsDeleteParams creates a new IpamVrfsDeleteParams object // with the default values initialized. -func NewIPAMVrfsDeleteParams() *IPAMVrfsDeleteParams { +func NewIpamVrfsDeleteParams() *IpamVrfsDeleteParams { var () - return &IPAMVrfsDeleteParams{ + return &IpamVrfsDeleteParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVrfsDeleteParamsWithTimeout creates a new IPAMVrfsDeleteParams object +// NewIpamVrfsDeleteParamsWithTimeout creates a new IpamVrfsDeleteParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVrfsDeleteParamsWithTimeout(timeout time.Duration) *IPAMVrfsDeleteParams { +func NewIpamVrfsDeleteParamsWithTimeout(timeout time.Duration) *IpamVrfsDeleteParams { var () - return &IPAMVrfsDeleteParams{ + return &IpamVrfsDeleteParams{ timeout: timeout, } } -// NewIPAMVrfsDeleteParamsWithContext creates a new IPAMVrfsDeleteParams object +// NewIpamVrfsDeleteParamsWithContext creates a new IpamVrfsDeleteParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVrfsDeleteParamsWithContext(ctx context.Context) *IPAMVrfsDeleteParams { +func NewIpamVrfsDeleteParamsWithContext(ctx context.Context) *IpamVrfsDeleteParams { var () - return &IPAMVrfsDeleteParams{ + return &IpamVrfsDeleteParams{ Context: ctx, } } -// NewIPAMVrfsDeleteParamsWithHTTPClient creates a new IPAMVrfsDeleteParams object +// NewIpamVrfsDeleteParamsWithHTTPClient creates a new IpamVrfsDeleteParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVrfsDeleteParamsWithHTTPClient(client *http.Client) *IPAMVrfsDeleteParams { +func NewIpamVrfsDeleteParamsWithHTTPClient(client *http.Client) *IpamVrfsDeleteParams { var () - return &IPAMVrfsDeleteParams{ + return &IpamVrfsDeleteParams{ HTTPClient: client, } } -/*IPAMVrfsDeleteParams contains all the parameters to send to the API endpoint +/*IpamVrfsDeleteParams contains all the parameters to send to the API endpoint for the ipam vrfs delete operation typically these are written to a http.Request */ -type IPAMVrfsDeleteParams struct { +type IpamVrfsDeleteParams struct { /*ID A unique integer value identifying this VRF. @@ -88,51 +89,51 @@ type IPAMVrfsDeleteParams struct { } // WithTimeout adds the timeout to the ipam vrfs delete params -func (o *IPAMVrfsDeleteParams) WithTimeout(timeout time.Duration) *IPAMVrfsDeleteParams { +func (o *IpamVrfsDeleteParams) WithTimeout(timeout time.Duration) *IpamVrfsDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vrfs delete params -func (o *IPAMVrfsDeleteParams) SetTimeout(timeout time.Duration) { +func (o *IpamVrfsDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vrfs delete params -func (o *IPAMVrfsDeleteParams) WithContext(ctx context.Context) *IPAMVrfsDeleteParams { +func (o *IpamVrfsDeleteParams) WithContext(ctx context.Context) *IpamVrfsDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vrfs delete params -func (o *IPAMVrfsDeleteParams) SetContext(ctx context.Context) { +func (o *IpamVrfsDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vrfs delete params -func (o *IPAMVrfsDeleteParams) WithHTTPClient(client *http.Client) *IPAMVrfsDeleteParams { +func (o *IpamVrfsDeleteParams) WithHTTPClient(client *http.Client) *IpamVrfsDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vrfs delete params -func (o *IPAMVrfsDeleteParams) SetHTTPClient(client *http.Client) { +func (o *IpamVrfsDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam vrfs delete params -func (o *IPAMVrfsDeleteParams) WithID(id int64) *IPAMVrfsDeleteParams { +func (o *IpamVrfsDeleteParams) WithID(id int64) *IpamVrfsDeleteParams { o.SetID(id) return o } // SetID adds the id to the ipam vrfs delete params -func (o *IPAMVrfsDeleteParams) SetID(id int64) { +func (o *IpamVrfsDeleteParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMVrfsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVrfsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vrfs_delete_responses.go b/netbox/client/ipam/ipam_vrfs_delete_responses.go similarity index 70% rename from netbox/client/ipam/ip_a_m_vrfs_delete_responses.go rename to netbox/client/ipam/ipam_vrfs_delete_responses.go index 4dc69500946bc38b0f7cb13c8695646997a4eace..439da400163afe89bc45a6e90ee21370d7876f49 100644 --- a/netbox/client/ipam/ip_a_m_vrfs_delete_responses.go +++ b/netbox/client/ipam/ipam_vrfs_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,17 +28,16 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// IPAMVrfsDeleteReader is a Reader for the IPAMVrfsDelete structure. -type IPAMVrfsDeleteReader struct { +// IpamVrfsDeleteReader is a Reader for the IpamVrfsDelete structure. +type IpamVrfsDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVrfsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVrfsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: - result := NewIPAMVrfsDeleteNoContent() + result := NewIpamVrfsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -48,23 +48,23 @@ func (o *IPAMVrfsDeleteReader) ReadResponse(response runtime.ClientResponse, con } } -// NewIPAMVrfsDeleteNoContent creates a IPAMVrfsDeleteNoContent with default headers values -func NewIPAMVrfsDeleteNoContent() *IPAMVrfsDeleteNoContent { - return &IPAMVrfsDeleteNoContent{} +// NewIpamVrfsDeleteNoContent creates a IpamVrfsDeleteNoContent with default headers values +func NewIpamVrfsDeleteNoContent() *IpamVrfsDeleteNoContent { + return &IpamVrfsDeleteNoContent{} } -/*IPAMVrfsDeleteNoContent handles this case with default header values. +/*IpamVrfsDeleteNoContent handles this case with default header values. -IPAMVrfsDeleteNoContent ipam vrfs delete no content +IpamVrfsDeleteNoContent ipam vrfs delete no content */ -type IPAMVrfsDeleteNoContent struct { +type IpamVrfsDeleteNoContent struct { } -func (o *IPAMVrfsDeleteNoContent) Error() string { +func (o *IpamVrfsDeleteNoContent) Error() string { return fmt.Sprintf("[DELETE /ipam/vrfs/{id}/][%d] ipamVrfsDeleteNoContent ", 204) } -func (o *IPAMVrfsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVrfsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/ipam/ip_a_m_vrfs_list_parameters.go b/netbox/client/ipam/ipam_vrfs_list_parameters.go similarity index 54% rename from netbox/client/ipam/ip_a_m_vrfs_list_parameters.go rename to netbox/client/ipam/ipam_vrfs_list_parameters.go index 255492185429ae33c083ac1733b3ab392445dfca..97ef2692e98f91ff8141e6863e2c730f41b9164f 100644 --- a/netbox/client/ipam/ip_a_m_vrfs_list_parameters.go +++ b/netbox/client/ipam/ipam_vrfs_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,50 +33,56 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMVrfsListParams creates a new IPAMVrfsListParams object +// NewIpamVrfsListParams creates a new IpamVrfsListParams object // with the default values initialized. -func NewIPAMVrfsListParams() *IPAMVrfsListParams { +func NewIpamVrfsListParams() *IpamVrfsListParams { var () - return &IPAMVrfsListParams{ + return &IpamVrfsListParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVrfsListParamsWithTimeout creates a new IPAMVrfsListParams object +// NewIpamVrfsListParamsWithTimeout creates a new IpamVrfsListParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVrfsListParamsWithTimeout(timeout time.Duration) *IPAMVrfsListParams { +func NewIpamVrfsListParamsWithTimeout(timeout time.Duration) *IpamVrfsListParams { var () - return &IPAMVrfsListParams{ + return &IpamVrfsListParams{ timeout: timeout, } } -// NewIPAMVrfsListParamsWithContext creates a new IPAMVrfsListParams object +// NewIpamVrfsListParamsWithContext creates a new IpamVrfsListParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVrfsListParamsWithContext(ctx context.Context) *IPAMVrfsListParams { +func NewIpamVrfsListParamsWithContext(ctx context.Context) *IpamVrfsListParams { var () - return &IPAMVrfsListParams{ + return &IpamVrfsListParams{ Context: ctx, } } -// NewIPAMVrfsListParamsWithHTTPClient creates a new IPAMVrfsListParams object +// NewIpamVrfsListParamsWithHTTPClient creates a new IpamVrfsListParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVrfsListParamsWithHTTPClient(client *http.Client) *IPAMVrfsListParams { +func NewIpamVrfsListParamsWithHTTPClient(client *http.Client) *IpamVrfsListParams { var () - return &IPAMVrfsListParams{ + return &IpamVrfsListParams{ HTTPClient: client, } } -/*IPAMVrfsListParams contains all the parameters to send to the API endpoint +/*IpamVrfsListParams contains all the parameters to send to the API endpoint for the ipam vrfs list operation typically these are written to a http.Request */ -type IPAMVrfsListParams struct { - +type IpamVrfsListParams struct { + + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*EnforceUnique*/ EnforceUnique *string /*IDIn @@ -83,6 +90,12 @@ type IPAMVrfsListParams struct { */ IDIn *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. @@ -116,178 +129,292 @@ type IPAMVrfsListParams struct { } // WithTimeout adds the timeout to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithTimeout(timeout time.Duration) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithTimeout(timeout time.Duration) *IpamVrfsListParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetTimeout(timeout time.Duration) { +func (o *IpamVrfsListParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithContext(ctx context.Context) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithContext(ctx context.Context) *IpamVrfsListParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetContext(ctx context.Context) { +func (o *IpamVrfsListParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithHTTPClient(client *http.Client) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithHTTPClient(client *http.Client) *IpamVrfsListParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetHTTPClient(client *http.Client) { +func (o *IpamVrfsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithCreated adds the created to the ipam vrfs list params +func (o *IpamVrfsListParams) WithCreated(created *string) *IpamVrfsListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the ipam vrfs list params +func (o *IpamVrfsListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the ipam vrfs list params +func (o *IpamVrfsListParams) WithCreatedGte(createdGte *string) *IpamVrfsListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the ipam vrfs list params +func (o *IpamVrfsListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the ipam vrfs list params +func (o *IpamVrfsListParams) WithCreatedLte(createdLte *string) *IpamVrfsListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the ipam vrfs list params +func (o *IpamVrfsListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + // WithEnforceUnique adds the enforceUnique to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithEnforceUnique(enforceUnique *string) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithEnforceUnique(enforceUnique *string) *IpamVrfsListParams { o.SetEnforceUnique(enforceUnique) return o } // SetEnforceUnique adds the enforceUnique to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetEnforceUnique(enforceUnique *string) { +func (o *IpamVrfsListParams) SetEnforceUnique(enforceUnique *string) { o.EnforceUnique = enforceUnique } // WithIDIn adds the iDIn to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithIDIn(iDIn *string) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithIDIn(iDIn *string) *IpamVrfsListParams { o.SetIDIn(iDIn) return o } // SetIDIn adds the idIn to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetIDIn(iDIn *string) { +func (o *IpamVrfsListParams) SetIDIn(iDIn *string) { o.IDIn = iDIn } +// WithLastUpdated adds the lastUpdated to the ipam vrfs list params +func (o *IpamVrfsListParams) WithLastUpdated(lastUpdated *string) *IpamVrfsListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the ipam vrfs list params +func (o *IpamVrfsListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the ipam vrfs list params +func (o *IpamVrfsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamVrfsListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the ipam vrfs list params +func (o *IpamVrfsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the ipam vrfs list params +func (o *IpamVrfsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamVrfsListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the ipam vrfs list params +func (o *IpamVrfsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithLimit(limit *int64) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithLimit(limit *int64) *IpamVrfsListParams { o.SetLimit(limit) return o } // SetLimit adds the limit to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetLimit(limit *int64) { +func (o *IpamVrfsListParams) SetLimit(limit *int64) { o.Limit = limit } // WithName adds the name to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithName(name *string) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithName(name *string) *IpamVrfsListParams { o.SetName(name) return o } // SetName adds the name to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetName(name *string) { +func (o *IpamVrfsListParams) SetName(name *string) { o.Name = name } // WithOffset adds the offset to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithOffset(offset *int64) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithOffset(offset *int64) *IpamVrfsListParams { o.SetOffset(offset) return o } // SetOffset adds the offset to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetOffset(offset *int64) { +func (o *IpamVrfsListParams) SetOffset(offset *int64) { o.Offset = offset } // WithQ adds the q to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithQ(q *string) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithQ(q *string) *IpamVrfsListParams { o.SetQ(q) return o } // SetQ adds the q to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetQ(q *string) { +func (o *IpamVrfsListParams) SetQ(q *string) { o.Q = q } // WithRd adds the rd to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithRd(rd *string) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithRd(rd *string) *IpamVrfsListParams { o.SetRd(rd) return o } // SetRd adds the rd to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetRd(rd *string) { +func (o *IpamVrfsListParams) SetRd(rd *string) { o.Rd = rd } // WithTag adds the tag to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithTag(tag *string) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithTag(tag *string) *IpamVrfsListParams { o.SetTag(tag) return o } // SetTag adds the tag to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetTag(tag *string) { +func (o *IpamVrfsListParams) SetTag(tag *string) { o.Tag = tag } // WithTenant adds the tenant to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithTenant(tenant *string) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithTenant(tenant *string) *IpamVrfsListParams { o.SetTenant(tenant) return o } // SetTenant adds the tenant to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetTenant(tenant *string) { +func (o *IpamVrfsListParams) SetTenant(tenant *string) { o.Tenant = tenant } // WithTenantGroup adds the tenantGroup to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithTenantGroup(tenantGroup *string) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithTenantGroup(tenantGroup *string) *IpamVrfsListParams { o.SetTenantGroup(tenantGroup) return o } // SetTenantGroup adds the tenantGroup to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetTenantGroup(tenantGroup *string) { +func (o *IpamVrfsListParams) SetTenantGroup(tenantGroup *string) { o.TenantGroup = tenantGroup } // WithTenantGroupID adds the tenantGroupID to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithTenantGroupID(tenantGroupID *string) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithTenantGroupID(tenantGroupID *string) *IpamVrfsListParams { o.SetTenantGroupID(tenantGroupID) return o } // SetTenantGroupID adds the tenantGroupId to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetTenantGroupID(tenantGroupID *string) { +func (o *IpamVrfsListParams) SetTenantGroupID(tenantGroupID *string) { o.TenantGroupID = tenantGroupID } // WithTenantID adds the tenantID to the ipam vrfs list params -func (o *IPAMVrfsListParams) WithTenantID(tenantID *string) *IPAMVrfsListParams { +func (o *IpamVrfsListParams) WithTenantID(tenantID *string) *IpamVrfsListParams { o.SetTenantID(tenantID) return o } // SetTenantID adds the tenantId to the ipam vrfs list params -func (o *IPAMVrfsListParams) SetTenantID(tenantID *string) { +func (o *IpamVrfsListParams) SetTenantID(tenantID *string) { o.TenantID = tenantID } // WriteToRequest writes these params to a swagger request -func (o *IPAMVrfsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVrfsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error + if o.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.EnforceUnique != nil { // query param enforce_unique @@ -320,6 +447,54 @@ func (o *IPAMVrfsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } + 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 diff --git a/netbox/client/ipam/ip_a_m_vrfs_list_responses.go b/netbox/client/ipam/ipam_vrfs_list_responses.go similarity index 72% rename from netbox/client/ipam/ip_a_m_vrfs_list_responses.go rename to netbox/client/ipam/ipam_vrfs_list_responses.go index c1cbfcc610f1092de66ee7a22520048303247b77..1729f5ee1be112727306bd17a4cef3d65535627b 100644 --- a/netbox/client/ipam/ip_a_m_vrfs_list_responses.go +++ b/netbox/client/ipam/ipam_vrfs_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,20 +32,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVrfsListReader is a Reader for the IPAMVrfsList structure. -type IPAMVrfsListReader struct { +// IpamVrfsListReader is a Reader for the IpamVrfsList structure. +type IpamVrfsListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVrfsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVrfsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMVrfsListOK() + result := NewIpamVrfsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -55,26 +55,30 @@ func (o *IPAMVrfsListReader) ReadResponse(response runtime.ClientResponse, consu } } -// NewIPAMVrfsListOK creates a IPAMVrfsListOK with default headers values -func NewIPAMVrfsListOK() *IPAMVrfsListOK { - return &IPAMVrfsListOK{} +// NewIpamVrfsListOK creates a IpamVrfsListOK with default headers values +func NewIpamVrfsListOK() *IpamVrfsListOK { + return &IpamVrfsListOK{} } -/*IPAMVrfsListOK handles this case with default header values. +/*IpamVrfsListOK handles this case with default header values. -IPAMVrfsListOK ipam vrfs list o k +IpamVrfsListOK ipam vrfs list o k */ -type IPAMVrfsListOK struct { - Payload *IPAMVrfsListOKBody +type IpamVrfsListOK struct { + Payload *IpamVrfsListOKBody } -func (o *IPAMVrfsListOK) Error() string { +func (o *IpamVrfsListOK) Error() string { return fmt.Sprintf("[GET /ipam/vrfs/][%d] ipamVrfsListOK %+v", 200, o.Payload) } -func (o *IPAMVrfsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVrfsListOK) GetPayload() *IpamVrfsListOKBody { + return o.Payload +} + +func (o *IpamVrfsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(IPAMVrfsListOKBody) + o.Payload = new(IpamVrfsListOKBody) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -84,10 +88,10 @@ func (o *IPAMVrfsListOK) readResponse(response runtime.ClientResponse, consumer return nil } -/*IPAMVrfsListOKBody IP a m vrfs list o k body -swagger:model IPAMVrfsListOKBody +/*IpamVrfsListOKBody ipam vrfs list o k body +swagger:model IpamVrfsListOKBody */ -type IPAMVrfsListOKBody struct { +type IpamVrfsListOKBody struct { // count // Required: true @@ -106,8 +110,8 @@ type IPAMVrfsListOKBody struct { Results []*models.VRF `json:"results"` } -// Validate validates this IP a m vrfs list o k body -func (o *IPAMVrfsListOKBody) Validate(formats strfmt.Registry) error { +// Validate validates this ipam vrfs list o k body +func (o *IpamVrfsListOKBody) Validate(formats strfmt.Registry) error { var res []error if err := o.validateCount(formats); err != nil { @@ -132,7 +136,7 @@ func (o *IPAMVrfsListOKBody) Validate(formats strfmt.Registry) error { return nil } -func (o *IPAMVrfsListOKBody) validateCount(formats strfmt.Registry) error { +func (o *IpamVrfsListOKBody) validateCount(formats strfmt.Registry) error { if err := validate.Required("ipamVrfsListOK"+"."+"count", "body", o.Count); err != nil { return err @@ -141,7 +145,7 @@ func (o *IPAMVrfsListOKBody) validateCount(formats strfmt.Registry) error { return nil } -func (o *IPAMVrfsListOKBody) validateNext(formats strfmt.Registry) error { +func (o *IpamVrfsListOKBody) validateNext(formats strfmt.Registry) error { if swag.IsZero(o.Next) { // not required return nil @@ -154,7 +158,7 @@ func (o *IPAMVrfsListOKBody) validateNext(formats strfmt.Registry) error { return nil } -func (o *IPAMVrfsListOKBody) validatePrevious(formats strfmt.Registry) error { +func (o *IpamVrfsListOKBody) validatePrevious(formats strfmt.Registry) error { if swag.IsZero(o.Previous) { // not required return nil @@ -167,7 +171,7 @@ func (o *IPAMVrfsListOKBody) validatePrevious(formats strfmt.Registry) error { return nil } -func (o *IPAMVrfsListOKBody) validateResults(formats strfmt.Registry) error { +func (o *IpamVrfsListOKBody) validateResults(formats strfmt.Registry) error { if err := validate.Required("ipamVrfsListOK"+"."+"results", "body", o.Results); err != nil { return err @@ -193,7 +197,7 @@ func (o *IPAMVrfsListOKBody) validateResults(formats strfmt.Registry) error { } // MarshalBinary interface implementation -func (o *IPAMVrfsListOKBody) MarshalBinary() ([]byte, error) { +func (o *IpamVrfsListOKBody) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -201,8 +205,8 @@ func (o *IPAMVrfsListOKBody) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *IPAMVrfsListOKBody) UnmarshalBinary(b []byte) error { - var res IPAMVrfsListOKBody +func (o *IpamVrfsListOKBody) UnmarshalBinary(b []byte) error { + var res IpamVrfsListOKBody if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/netbox/client/ipam/ip_a_m_vrfs_partial_update_parameters.go b/netbox/client/ipam/ipam_vrfs_partial_update_parameters.go similarity index 64% rename from netbox/client/ipam/ip_a_m_vrfs_partial_update_parameters.go rename to netbox/client/ipam/ipam_vrfs_partial_update_parameters.go index acdf235a8853d49a600b4535efcb147f22319346..e63e7748ff2fecd96f81c9eaf20862db3cf65282 100644 --- a/netbox/client/ipam/ip_a_m_vrfs_partial_update_parameters.go +++ b/netbox/client/ipam/ipam_vrfs_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMVrfsPartialUpdateParams creates a new IPAMVrfsPartialUpdateParams object +// NewIpamVrfsPartialUpdateParams creates a new IpamVrfsPartialUpdateParams object // with the default values initialized. -func NewIPAMVrfsPartialUpdateParams() *IPAMVrfsPartialUpdateParams { +func NewIpamVrfsPartialUpdateParams() *IpamVrfsPartialUpdateParams { var () - return &IPAMVrfsPartialUpdateParams{ + return &IpamVrfsPartialUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVrfsPartialUpdateParamsWithTimeout creates a new IPAMVrfsPartialUpdateParams object +// NewIpamVrfsPartialUpdateParamsWithTimeout creates a new IpamVrfsPartialUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVrfsPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMVrfsPartialUpdateParams { +func NewIpamVrfsPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamVrfsPartialUpdateParams { var () - return &IPAMVrfsPartialUpdateParams{ + return &IpamVrfsPartialUpdateParams{ timeout: timeout, } } -// NewIPAMVrfsPartialUpdateParamsWithContext creates a new IPAMVrfsPartialUpdateParams object +// NewIpamVrfsPartialUpdateParamsWithContext creates a new IpamVrfsPartialUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVrfsPartialUpdateParamsWithContext(ctx context.Context) *IPAMVrfsPartialUpdateParams { +func NewIpamVrfsPartialUpdateParamsWithContext(ctx context.Context) *IpamVrfsPartialUpdateParams { var () - return &IPAMVrfsPartialUpdateParams{ + return &IpamVrfsPartialUpdateParams{ Context: ctx, } } -// NewIPAMVrfsPartialUpdateParamsWithHTTPClient creates a new IPAMVrfsPartialUpdateParams object +// NewIpamVrfsPartialUpdateParamsWithHTTPClient creates a new IpamVrfsPartialUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVrfsPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMVrfsPartialUpdateParams { +func NewIpamVrfsPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamVrfsPartialUpdateParams { var () - return &IPAMVrfsPartialUpdateParams{ + return &IpamVrfsPartialUpdateParams{ HTTPClient: client, } } -/*IPAMVrfsPartialUpdateParams contains all the parameters to send to the API endpoint +/*IpamVrfsPartialUpdateParams contains all the parameters to send to the API endpoint for the ipam vrfs partial update operation typically these are written to a http.Request */ -type IPAMVrfsPartialUpdateParams struct { +type IpamVrfsPartialUpdateParams struct { /*Data*/ Data *models.WritableVRF @@ -92,62 +93,62 @@ type IPAMVrfsPartialUpdateParams struct { } // WithTimeout adds the timeout to the ipam vrfs partial update params -func (o *IPAMVrfsPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMVrfsPartialUpdateParams { +func (o *IpamVrfsPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamVrfsPartialUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vrfs partial update params -func (o *IPAMVrfsPartialUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamVrfsPartialUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vrfs partial update params -func (o *IPAMVrfsPartialUpdateParams) WithContext(ctx context.Context) *IPAMVrfsPartialUpdateParams { +func (o *IpamVrfsPartialUpdateParams) WithContext(ctx context.Context) *IpamVrfsPartialUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vrfs partial update params -func (o *IPAMVrfsPartialUpdateParams) SetContext(ctx context.Context) { +func (o *IpamVrfsPartialUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vrfs partial update params -func (o *IPAMVrfsPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMVrfsPartialUpdateParams { +func (o *IpamVrfsPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamVrfsPartialUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vrfs partial update params -func (o *IPAMVrfsPartialUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamVrfsPartialUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam vrfs partial update params -func (o *IPAMVrfsPartialUpdateParams) WithData(data *models.WritableVRF) *IPAMVrfsPartialUpdateParams { +func (o *IpamVrfsPartialUpdateParams) WithData(data *models.WritableVRF) *IpamVrfsPartialUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam vrfs partial update params -func (o *IPAMVrfsPartialUpdateParams) SetData(data *models.WritableVRF) { +func (o *IpamVrfsPartialUpdateParams) SetData(data *models.WritableVRF) { o.Data = data } // WithID adds the id to the ipam vrfs partial update params -func (o *IPAMVrfsPartialUpdateParams) WithID(id int64) *IPAMVrfsPartialUpdateParams { +func (o *IpamVrfsPartialUpdateParams) WithID(id int64) *IpamVrfsPartialUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam vrfs partial update params -func (o *IPAMVrfsPartialUpdateParams) SetID(id int64) { +func (o *IpamVrfsPartialUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMVrfsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVrfsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vrfs_partial_update_responses.go b/netbox/client/ipam/ipam_vrfs_partial_update_responses.go similarity index 69% rename from netbox/client/ipam/ip_a_m_vrfs_partial_update_responses.go rename to netbox/client/ipam/ipam_vrfs_partial_update_responses.go index a5a49ebf2beec4588c57fbccb81dde1db5996fdf..1c21b68e53683a1bd472f5778bb0bd77bcd340f3 100644 --- a/netbox/client/ipam/ip_a_m_vrfs_partial_update_responses.go +++ b/netbox/client/ipam/ipam_vrfs_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVrfsPartialUpdateReader is a Reader for the IPAMVrfsPartialUpdate structure. -type IPAMVrfsPartialUpdateReader struct { +// IpamVrfsPartialUpdateReader is a Reader for the IpamVrfsPartialUpdate structure. +type IpamVrfsPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVrfsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVrfsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMVrfsPartialUpdateOK() + result := NewIpamVrfsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMVrfsPartialUpdateReader) ReadResponse(response runtime.ClientRespon } } -// NewIPAMVrfsPartialUpdateOK creates a IPAMVrfsPartialUpdateOK with default headers values -func NewIPAMVrfsPartialUpdateOK() *IPAMVrfsPartialUpdateOK { - return &IPAMVrfsPartialUpdateOK{} +// NewIpamVrfsPartialUpdateOK creates a IpamVrfsPartialUpdateOK with default headers values +func NewIpamVrfsPartialUpdateOK() *IpamVrfsPartialUpdateOK { + return &IpamVrfsPartialUpdateOK{} } -/*IPAMVrfsPartialUpdateOK handles this case with default header values. +/*IpamVrfsPartialUpdateOK handles this case with default header values. -IPAMVrfsPartialUpdateOK ipam vrfs partial update o k +IpamVrfsPartialUpdateOK ipam vrfs partial update o k */ -type IPAMVrfsPartialUpdateOK struct { +type IpamVrfsPartialUpdateOK struct { Payload *models.VRF } -func (o *IPAMVrfsPartialUpdateOK) Error() string { +func (o *IpamVrfsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /ipam/vrfs/{id}/][%d] ipamVrfsPartialUpdateOK %+v", 200, o.Payload) } -func (o *IPAMVrfsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVrfsPartialUpdateOK) GetPayload() *models.VRF { + return o.Payload +} + +func (o *IpamVrfsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VRF) diff --git a/netbox/client/ipam/ip_a_m_vrfs_read_parameters.go b/netbox/client/ipam/ipam_vrfs_read_parameters.go similarity index 67% rename from netbox/client/ipam/ip_a_m_vrfs_read_parameters.go rename to netbox/client/ipam/ipam_vrfs_read_parameters.go index 9d162e8749da583c92cb65a35958506b24d76c40..e5858876f0779771f253e35fcaa2c9c67606b4e4 100644 --- a/netbox/client/ipam/ip_a_m_vrfs_read_parameters.go +++ b/netbox/client/ipam/ipam_vrfs_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -32,49 +33,49 @@ import ( strfmt "github.com/go-openapi/strfmt" ) -// NewIPAMVrfsReadParams creates a new IPAMVrfsReadParams object +// NewIpamVrfsReadParams creates a new IpamVrfsReadParams object // with the default values initialized. -func NewIPAMVrfsReadParams() *IPAMVrfsReadParams { +func NewIpamVrfsReadParams() *IpamVrfsReadParams { var () - return &IPAMVrfsReadParams{ + return &IpamVrfsReadParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVrfsReadParamsWithTimeout creates a new IPAMVrfsReadParams object +// NewIpamVrfsReadParamsWithTimeout creates a new IpamVrfsReadParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVrfsReadParamsWithTimeout(timeout time.Duration) *IPAMVrfsReadParams { +func NewIpamVrfsReadParamsWithTimeout(timeout time.Duration) *IpamVrfsReadParams { var () - return &IPAMVrfsReadParams{ + return &IpamVrfsReadParams{ timeout: timeout, } } -// NewIPAMVrfsReadParamsWithContext creates a new IPAMVrfsReadParams object +// NewIpamVrfsReadParamsWithContext creates a new IpamVrfsReadParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVrfsReadParamsWithContext(ctx context.Context) *IPAMVrfsReadParams { +func NewIpamVrfsReadParamsWithContext(ctx context.Context) *IpamVrfsReadParams { var () - return &IPAMVrfsReadParams{ + return &IpamVrfsReadParams{ Context: ctx, } } -// NewIPAMVrfsReadParamsWithHTTPClient creates a new IPAMVrfsReadParams object +// NewIpamVrfsReadParamsWithHTTPClient creates a new IpamVrfsReadParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVrfsReadParamsWithHTTPClient(client *http.Client) *IPAMVrfsReadParams { +func NewIpamVrfsReadParamsWithHTTPClient(client *http.Client) *IpamVrfsReadParams { var () - return &IPAMVrfsReadParams{ + return &IpamVrfsReadParams{ HTTPClient: client, } } -/*IPAMVrfsReadParams contains all the parameters to send to the API endpoint +/*IpamVrfsReadParams contains all the parameters to send to the API endpoint for the ipam vrfs read operation typically these are written to a http.Request */ -type IPAMVrfsReadParams struct { +type IpamVrfsReadParams struct { /*ID A unique integer value identifying this VRF. @@ -88,51 +89,51 @@ type IPAMVrfsReadParams struct { } // WithTimeout adds the timeout to the ipam vrfs read params -func (o *IPAMVrfsReadParams) WithTimeout(timeout time.Duration) *IPAMVrfsReadParams { +func (o *IpamVrfsReadParams) WithTimeout(timeout time.Duration) *IpamVrfsReadParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vrfs read params -func (o *IPAMVrfsReadParams) SetTimeout(timeout time.Duration) { +func (o *IpamVrfsReadParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vrfs read params -func (o *IPAMVrfsReadParams) WithContext(ctx context.Context) *IPAMVrfsReadParams { +func (o *IpamVrfsReadParams) WithContext(ctx context.Context) *IpamVrfsReadParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vrfs read params -func (o *IPAMVrfsReadParams) SetContext(ctx context.Context) { +func (o *IpamVrfsReadParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vrfs read params -func (o *IPAMVrfsReadParams) WithHTTPClient(client *http.Client) *IPAMVrfsReadParams { +func (o *IpamVrfsReadParams) WithHTTPClient(client *http.Client) *IpamVrfsReadParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vrfs read params -func (o *IPAMVrfsReadParams) SetHTTPClient(client *http.Client) { +func (o *IpamVrfsReadParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithID adds the id to the ipam vrfs read params -func (o *IPAMVrfsReadParams) WithID(id int64) *IPAMVrfsReadParams { +func (o *IpamVrfsReadParams) WithID(id int64) *IpamVrfsReadParams { o.SetID(id) return o } // SetID adds the id to the ipam vrfs read params -func (o *IPAMVrfsReadParams) SetID(id int64) { +func (o *IpamVrfsReadParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMVrfsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVrfsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vrfs_read_responses.go b/netbox/client/ipam/ipam_vrfs_read_responses.go similarity index 70% rename from netbox/client/ipam/ip_a_m_vrfs_read_responses.go rename to netbox/client/ipam/ipam_vrfs_read_responses.go index 2b6be306cf8c49b49a9f8e3f1ef8840c22c14b98..57e8b53d14c67ac46fbc18c381cfb56fb68023a9 100644 --- a/netbox/client/ipam/ip_a_m_vrfs_read_responses.go +++ b/netbox/client/ipam/ipam_vrfs_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVrfsReadReader is a Reader for the IPAMVrfsRead structure. -type IPAMVrfsReadReader struct { +// IpamVrfsReadReader is a Reader for the IpamVrfsRead structure. +type IpamVrfsReadReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVrfsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVrfsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMVrfsReadOK() + result := NewIpamVrfsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMVrfsReadReader) ReadResponse(response runtime.ClientResponse, consu } } -// NewIPAMVrfsReadOK creates a IPAMVrfsReadOK with default headers values -func NewIPAMVrfsReadOK() *IPAMVrfsReadOK { - return &IPAMVrfsReadOK{} +// NewIpamVrfsReadOK creates a IpamVrfsReadOK with default headers values +func NewIpamVrfsReadOK() *IpamVrfsReadOK { + return &IpamVrfsReadOK{} } -/*IPAMVrfsReadOK handles this case with default header values. +/*IpamVrfsReadOK handles this case with default header values. -IPAMVrfsReadOK ipam vrfs read o k +IpamVrfsReadOK ipam vrfs read o k */ -type IPAMVrfsReadOK struct { +type IpamVrfsReadOK struct { Payload *models.VRF } -func (o *IPAMVrfsReadOK) Error() string { +func (o *IpamVrfsReadOK) Error() string { return fmt.Sprintf("[GET /ipam/vrfs/{id}/][%d] ipamVrfsReadOK %+v", 200, o.Payload) } -func (o *IPAMVrfsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVrfsReadOK) GetPayload() *models.VRF { + return o.Payload +} + +func (o *IpamVrfsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VRF) diff --git a/netbox/client/ipam/ip_a_m_vrfs_update_parameters.go b/netbox/client/ipam/ipam_vrfs_update_parameters.go similarity index 65% rename from netbox/client/ipam/ip_a_m_vrfs_update_parameters.go rename to netbox/client/ipam/ipam_vrfs_update_parameters.go index 1b7c1853dd75d9ea7b699e126e8b9f8f5805673b..cbe86e25d53ab577f6e44c2a612642d85fd5199e 100644 --- a/netbox/client/ipam/ip_a_m_vrfs_update_parameters.go +++ b/netbox/client/ipam/ipam_vrfs_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,52 +32,52 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// NewIPAMVrfsUpdateParams creates a new IPAMVrfsUpdateParams object +// NewIpamVrfsUpdateParams creates a new IpamVrfsUpdateParams object // with the default values initialized. -func NewIPAMVrfsUpdateParams() *IPAMVrfsUpdateParams { +func NewIpamVrfsUpdateParams() *IpamVrfsUpdateParams { var () - return &IPAMVrfsUpdateParams{ + return &IpamVrfsUpdateParams{ timeout: cr.DefaultTimeout, } } -// NewIPAMVrfsUpdateParamsWithTimeout creates a new IPAMVrfsUpdateParams object +// NewIpamVrfsUpdateParamsWithTimeout creates a new IpamVrfsUpdateParams object // with the default values initialized, and the ability to set a timeout on a request -func NewIPAMVrfsUpdateParamsWithTimeout(timeout time.Duration) *IPAMVrfsUpdateParams { +func NewIpamVrfsUpdateParamsWithTimeout(timeout time.Duration) *IpamVrfsUpdateParams { var () - return &IPAMVrfsUpdateParams{ + return &IpamVrfsUpdateParams{ timeout: timeout, } } -// NewIPAMVrfsUpdateParamsWithContext creates a new IPAMVrfsUpdateParams object +// NewIpamVrfsUpdateParamsWithContext creates a new IpamVrfsUpdateParams object // with the default values initialized, and the ability to set a context for a request -func NewIPAMVrfsUpdateParamsWithContext(ctx context.Context) *IPAMVrfsUpdateParams { +func NewIpamVrfsUpdateParamsWithContext(ctx context.Context) *IpamVrfsUpdateParams { var () - return &IPAMVrfsUpdateParams{ + return &IpamVrfsUpdateParams{ Context: ctx, } } -// NewIPAMVrfsUpdateParamsWithHTTPClient creates a new IPAMVrfsUpdateParams object +// NewIpamVrfsUpdateParamsWithHTTPClient creates a new IpamVrfsUpdateParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewIPAMVrfsUpdateParamsWithHTTPClient(client *http.Client) *IPAMVrfsUpdateParams { +func NewIpamVrfsUpdateParamsWithHTTPClient(client *http.Client) *IpamVrfsUpdateParams { var () - return &IPAMVrfsUpdateParams{ + return &IpamVrfsUpdateParams{ HTTPClient: client, } } -/*IPAMVrfsUpdateParams contains all the parameters to send to the API endpoint +/*IpamVrfsUpdateParams contains all the parameters to send to the API endpoint for the ipam vrfs update operation typically these are written to a http.Request */ -type IPAMVrfsUpdateParams struct { +type IpamVrfsUpdateParams struct { /*Data*/ Data *models.WritableVRF @@ -92,62 +93,62 @@ type IPAMVrfsUpdateParams struct { } // WithTimeout adds the timeout to the ipam vrfs update params -func (o *IPAMVrfsUpdateParams) WithTimeout(timeout time.Duration) *IPAMVrfsUpdateParams { +func (o *IpamVrfsUpdateParams) WithTimeout(timeout time.Duration) *IpamVrfsUpdateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the ipam vrfs update params -func (o *IPAMVrfsUpdateParams) SetTimeout(timeout time.Duration) { +func (o *IpamVrfsUpdateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the ipam vrfs update params -func (o *IPAMVrfsUpdateParams) WithContext(ctx context.Context) *IPAMVrfsUpdateParams { +func (o *IpamVrfsUpdateParams) WithContext(ctx context.Context) *IpamVrfsUpdateParams { o.SetContext(ctx) return o } // SetContext adds the context to the ipam vrfs update params -func (o *IPAMVrfsUpdateParams) SetContext(ctx context.Context) { +func (o *IpamVrfsUpdateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the ipam vrfs update params -func (o *IPAMVrfsUpdateParams) WithHTTPClient(client *http.Client) *IPAMVrfsUpdateParams { +func (o *IpamVrfsUpdateParams) WithHTTPClient(client *http.Client) *IpamVrfsUpdateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the ipam vrfs update params -func (o *IPAMVrfsUpdateParams) SetHTTPClient(client *http.Client) { +func (o *IpamVrfsUpdateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithData adds the data to the ipam vrfs update params -func (o *IPAMVrfsUpdateParams) WithData(data *models.WritableVRF) *IPAMVrfsUpdateParams { +func (o *IpamVrfsUpdateParams) WithData(data *models.WritableVRF) *IpamVrfsUpdateParams { o.SetData(data) return o } // SetData adds the data to the ipam vrfs update params -func (o *IPAMVrfsUpdateParams) SetData(data *models.WritableVRF) { +func (o *IpamVrfsUpdateParams) SetData(data *models.WritableVRF) { o.Data = data } // WithID adds the id to the ipam vrfs update params -func (o *IPAMVrfsUpdateParams) WithID(id int64) *IPAMVrfsUpdateParams { +func (o *IpamVrfsUpdateParams) WithID(id int64) *IpamVrfsUpdateParams { o.SetID(id) return o } // SetID adds the id to the ipam vrfs update params -func (o *IPAMVrfsUpdateParams) SetID(id int64) { +func (o *IpamVrfsUpdateParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IPAMVrfsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamVrfsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ip_a_m_vrfs_update_responses.go b/netbox/client/ipam/ipam_vrfs_update_responses.go similarity index 70% rename from netbox/client/ipam/ip_a_m_vrfs_update_responses.go rename to netbox/client/ipam/ipam_vrfs_update_responses.go index c20993571b29a7a0f52463ac04175033b23e851f..086d1073c7eec08fc86a36ecf6d9f4a71b82eae7 100644 --- a/netbox/client/ipam/ip_a_m_vrfs_update_responses.go +++ b/netbox/client/ipam/ipam_vrfs_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,20 +28,19 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) -// IPAMVrfsUpdateReader is a Reader for the IPAMVrfsUpdate structure. -type IPAMVrfsUpdateReader struct { +// IpamVrfsUpdateReader is a Reader for the IpamVrfsUpdate structure. +type IpamVrfsUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IPAMVrfsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamVrfsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: - result := NewIPAMVrfsUpdateOK() + result := NewIpamVrfsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -51,24 +51,28 @@ func (o *IPAMVrfsUpdateReader) ReadResponse(response runtime.ClientResponse, con } } -// NewIPAMVrfsUpdateOK creates a IPAMVrfsUpdateOK with default headers values -func NewIPAMVrfsUpdateOK() *IPAMVrfsUpdateOK { - return &IPAMVrfsUpdateOK{} +// NewIpamVrfsUpdateOK creates a IpamVrfsUpdateOK with default headers values +func NewIpamVrfsUpdateOK() *IpamVrfsUpdateOK { + return &IpamVrfsUpdateOK{} } -/*IPAMVrfsUpdateOK handles this case with default header values. +/*IpamVrfsUpdateOK handles this case with default header values. -IPAMVrfsUpdateOK ipam vrfs update o k +IpamVrfsUpdateOK ipam vrfs update o k */ -type IPAMVrfsUpdateOK struct { +type IpamVrfsUpdateOK struct { Payload *models.VRF } -func (o *IPAMVrfsUpdateOK) Error() string { +func (o *IpamVrfsUpdateOK) Error() string { return fmt.Sprintf("[PUT /ipam/vrfs/{id}/][%d] ipamVrfsUpdateOK %+v", 200, o.Payload) } -func (o *IPAMVrfsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamVrfsUpdateOK) GetPayload() *models.VRF { + return o.Payload +} + +func (o *IpamVrfsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VRF) diff --git a/netbox/client/netbox_client.go b/netbox/client/net_box_client.go similarity index 91% rename from netbox/client/netbox_client.go rename to netbox/client/net_box_client.go index 72b3349734e372521892833b180c3361da40349a..7ee89280075757244de3484b6d03d3640a8e9277 100644 --- a/netbox/client/netbox_client.go +++ b/netbox/client/net_box_client.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package client @@ -20,10 +21,10 @@ package client // Editing this file might prove futile when you re-run the swagger generate command import ( - "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" "github.com/netbox-community/go-netbox/netbox/client/circuits" "github.com/netbox-community/go-netbox/netbox/client/dcim" @@ -40,14 +41,14 @@ var Default = NewHTTPClient(nil) const ( // DefaultHost is the default Host // found in Meta (info) section of spec file - DefaultHost string = "netbox.net" + DefaultHost string = "netbox.fbi.h-da.de" // DefaultBasePath is the default BasePath // found in Meta (info) section of spec file DefaultBasePath string = "/api" ) // DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"http"} +var DefaultSchemes = []string{"https"} // NewHTTPClient creates a new net box HTTP client. func NewHTTPClient(formats strfmt.Registry) *NetBox { @@ -76,21 +77,13 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *NetBox { cli := new(NetBox) cli.Transport = transport - cli.Circuits = circuits.New(transport, formats) - cli.Dcim = dcim.New(transport, formats) - cli.Extras = extras.New(transport, formats) - - cli.IPAM = ipam.New(transport, formats) - + cli.Ipam = ipam.New(transport, formats) cli.Secrets = secrets.New(transport, formats) - cli.Tenancy = tenancy.New(transport, formats) - cli.Virtualization = virtualization.New(transport, formats) - return cli } @@ -135,19 +128,19 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // NetBox is a client for net box type NetBox struct { - Circuits *circuits.Client + Circuits circuits.ClientService - Dcim *dcim.Client + Dcim dcim.ClientService - Extras *extras.Client + Extras extras.ClientService - IPAM *ipam.Client + Ipam ipam.ClientService - Secrets *secrets.Client + Secrets secrets.ClientService - Tenancy *tenancy.Client + Tenancy tenancy.ClientService - Virtualization *virtualization.Client + Virtualization virtualization.ClientService Transport runtime.ClientTransport } @@ -155,19 +148,11 @@ type NetBox struct { // SetTransport changes the transport on the client and all its subresources func (c *NetBox) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.Circuits.SetTransport(transport) - c.Dcim.SetTransport(transport) - c.Extras.SetTransport(transport) - - c.IPAM.SetTransport(transport) - + c.Ipam.SetTransport(transport) c.Secrets.SetTransport(transport) - c.Tenancy.SetTransport(transport) - c.Virtualization.SetTransport(transport) - } diff --git a/netbox/client/secrets/secrets_choices_list_parameters.go b/netbox/client/secrets/secrets_choices_list_parameters.go index 8012099f5433e12496a070d17e7478bd490d3e14..4706fda98deef18396e7b62a1ef6cc4be7365051 100644 --- a/netbox/client/secrets/secrets_choices_list_parameters.go +++ b/netbox/client/secrets/secrets_choices_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 diff --git a/netbox/client/secrets/secrets_choices_list_responses.go b/netbox/client/secrets/secrets_choices_list_responses.go index 6990d01af81a11e81b242ecf59f89b7f3d049762..a1a5a811dfe6f8e570f9fad7858eadadc9689bba 100644 --- a/netbox/client/secrets/secrets_choices_list_responses.go +++ b/netbox/client/secrets/secrets_choices_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -35,7 +36,6 @@ type SecretsChoicesListReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewSecretsChoicesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/secrets/secrets_choices_read_parameters.go b/netbox/client/secrets/secrets_choices_read_parameters.go index 595fbd121f5900009ccf150bf61c5c3444f1436d..b0b6bf7a2a5281193f920d5da69966ab2fd2b6bd 100644 --- a/netbox/client/secrets/secrets_choices_read_parameters.go +++ b/netbox/client/secrets/secrets_choices_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 diff --git a/netbox/client/secrets/secrets_choices_read_responses.go b/netbox/client/secrets/secrets_choices_read_responses.go index e85f4f53f238a5fce976a4834c7bde94d2a1318c..a1edaecf753796d444650ce6d6a0aca1b57d022a 100644 --- a/netbox/client/secrets/secrets_choices_read_responses.go +++ b/netbox/client/secrets/secrets_choices_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -35,7 +36,6 @@ type SecretsChoicesReadReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewSecretsChoicesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/secrets/secrets_client.go b/netbox/client/secrets/secrets_client.go index dda11a9f35b25253d400fe5443693bbf1e9fd234..c64bc3add2fcb427917da77e2c00e68c12b04178 100644 --- a/netbox/client/secrets/secrets_client.go +++ b/netbox/client/secrets/secrets_client.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -20,13 +21,14 @@ package secrets // Editing this file might prove futile when you re-run the swagger generate command import ( - "github.com/go-openapi/runtime" + "fmt" - strfmt "github.com/go-openapi/strfmt" + "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) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } @@ -38,8 +40,45 @@ type Client struct { formats strfmt.Registry } +// ClientService is the interface for Client methods +type ClientService interface { + SecretsChoicesList(params *SecretsChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsChoicesListOK, error) + + SecretsChoicesRead(params *SecretsChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsChoicesReadOK, error) + + SecretsGenerateRsaKeyPairList(params *SecretsGenerateRsaKeyPairListParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsGenerateRsaKeyPairListOK, error) + + SecretsGetSessionKeyCreate(params *SecretsGetSessionKeyCreateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsGetSessionKeyCreateCreated, error) + + SecretsSecretRolesCreate(params *SecretsSecretRolesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesCreateCreated, error) + + SecretsSecretRolesDelete(params *SecretsSecretRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesDeleteNoContent, error) + + SecretsSecretRolesList(params *SecretsSecretRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesListOK, error) + + SecretsSecretRolesPartialUpdate(params *SecretsSecretRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesPartialUpdateOK, error) + + SecretsSecretRolesRead(params *SecretsSecretRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesReadOK, error) + + SecretsSecretRolesUpdate(params *SecretsSecretRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesUpdateOK, error) + + SecretsSecretsCreate(params *SecretsSecretsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsCreateCreated, error) + + SecretsSecretsDelete(params *SecretsSecretsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsDeleteNoContent, error) + + SecretsSecretsList(params *SecretsSecretsListParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsListOK, error) + + SecretsSecretsPartialUpdate(params *SecretsSecretsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsPartialUpdateOK, error) + + SecretsSecretsRead(params *SecretsSecretsReadParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsReadOK, error) + + SecretsSecretsUpdate(params *SecretsSecretsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsUpdateOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* -SecretsChoicesList secrets choices list API + SecretsChoicesList secrets choices list API */ func (a *Client) SecretsChoicesList(params *SecretsChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsChoicesListOK, error) { // TODO: Validate the params before sending @@ -53,7 +92,7 @@ func (a *Client) SecretsChoicesList(params *SecretsChoicesListParams, authInfo r PathPattern: "/secrets/_choices/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsChoicesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -63,12 +102,18 @@ func (a *Client) SecretsChoicesList(params *SecretsChoicesListParams, authInfo r if err != nil { return nil, err } - return result.(*SecretsChoicesListOK), nil - + success, ok := result.(*SecretsChoicesListOK) + 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__choices_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -SecretsChoicesRead secrets choices read API + SecretsChoicesRead secrets choices read API */ func (a *Client) SecretsChoicesRead(params *SecretsChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsChoicesReadOK, error) { // TODO: Validate the params before sending @@ -82,7 +127,7 @@ func (a *Client) SecretsChoicesRead(params *SecretsChoicesReadParams, authInfo r PathPattern: "/secrets/_choices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsChoicesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -92,14 +137,20 @@ func (a *Client) SecretsChoicesRead(params *SecretsChoicesReadParams, authInfo r if err != nil { return nil, err } - return result.(*SecretsChoicesReadOK), nil - + success, ok := result.(*SecretsChoicesReadOK) + 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__choices_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -SecretsGenerateRsaKeyPairList this endpoint can be used to generate a new r s a key pair the keys are returned in p e m format + 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": "<public key>", "private_key": "<private key>" } @@ -116,7 +167,7 @@ func (a *Client) SecretsGenerateRsaKeyPairList(params *SecretsGenerateRsaKeyPair PathPattern: "/secrets/generate-rsa-key-pair/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsGenerateRsaKeyPairListReader{formats: a.formats}, AuthInfo: authInfo, @@ -126,12 +177,18 @@ func (a *Client) SecretsGenerateRsaKeyPairList(params *SecretsGenerateRsaKeyPair if err != nil { return nil, err } - return result.(*SecretsGenerateRsaKeyPairListOK), nil - + 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 + SecretsGetSessionKeyCreate Retrieve a temporary session key to use for encrypting and decrypting secrets via the API. The user's private RSA key is POSTed with the name `private_key`. An example: curl -v -X POST -H "Authorization: Token <token>" -H "Accept: application/json; indent=4" \ @@ -158,7 +215,7 @@ func (a *Client) SecretsGetSessionKeyCreate(params *SecretsGetSessionKeyCreatePa PathPattern: "/secrets/get-session-key/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsGetSessionKeyCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -168,12 +225,18 @@ func (a *Client) SecretsGetSessionKeyCreate(params *SecretsGetSessionKeyCreatePa if err != nil { return nil, err } - return result.(*SecretsGetSessionKeyCreateCreated), nil - + 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) } /* -SecretsSecretRolesCreate secrets secret roles create API + SecretsSecretRolesCreate secrets secret roles create API */ func (a *Client) SecretsSecretRolesCreate(params *SecretsSecretRolesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesCreateCreated, error) { // TODO: Validate the params before sending @@ -187,7 +250,7 @@ func (a *Client) SecretsSecretRolesCreate(params *SecretsSecretRolesCreateParams PathPattern: "/secrets/secret-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsSecretRolesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -197,12 +260,18 @@ func (a *Client) SecretsSecretRolesCreate(params *SecretsSecretRolesCreateParams if err != nil { return nil, err } - return result.(*SecretsSecretRolesCreateCreated), nil - + 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 + SecretsSecretRolesDelete secrets secret roles delete API */ func (a *Client) SecretsSecretRolesDelete(params *SecretsSecretRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -216,7 +285,7 @@ func (a *Client) SecretsSecretRolesDelete(params *SecretsSecretRolesDeleteParams PathPattern: "/secrets/secret-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsSecretRolesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -226,12 +295,18 @@ func (a *Client) SecretsSecretRolesDelete(params *SecretsSecretRolesDeleteParams if err != nil { return nil, err } - return result.(*SecretsSecretRolesDeleteNoContent), nil - + 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 Call to super to allow for caching + SecretsSecretRolesList Call to super to allow for caching */ func (a *Client) SecretsSecretRolesList(params *SecretsSecretRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesListOK, error) { // TODO: Validate the params before sending @@ -245,7 +320,7 @@ func (a *Client) SecretsSecretRolesList(params *SecretsSecretRolesListParams, au PathPattern: "/secrets/secret-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsSecretRolesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -255,12 +330,18 @@ func (a *Client) SecretsSecretRolesList(params *SecretsSecretRolesListParams, au if err != nil { return nil, err } - return result.(*SecretsSecretRolesListOK), nil - + 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 + SecretsSecretRolesPartialUpdate secrets secret roles partial update API */ func (a *Client) SecretsSecretRolesPartialUpdate(params *SecretsSecretRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -274,7 +355,7 @@ func (a *Client) SecretsSecretRolesPartialUpdate(params *SecretsSecretRolesParti PathPattern: "/secrets/secret-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsSecretRolesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -284,12 +365,18 @@ func (a *Client) SecretsSecretRolesPartialUpdate(params *SecretsSecretRolesParti if err != nil { return nil, err } - return result.(*SecretsSecretRolesPartialUpdateOK), nil - + 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 Call to super to allow for caching + SecretsSecretRolesRead Call to super to allow for caching */ func (a *Client) SecretsSecretRolesRead(params *SecretsSecretRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesReadOK, error) { // TODO: Validate the params before sending @@ -303,7 +390,7 @@ func (a *Client) SecretsSecretRolesRead(params *SecretsSecretRolesReadParams, au PathPattern: "/secrets/secret-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsSecretRolesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -313,12 +400,18 @@ func (a *Client) SecretsSecretRolesRead(params *SecretsSecretRolesReadParams, au if err != nil { return nil, err } - return result.(*SecretsSecretRolesReadOK), nil - + 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 + SecretsSecretRolesUpdate secrets secret roles update API */ func (a *Client) SecretsSecretRolesUpdate(params *SecretsSecretRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesUpdateOK, error) { // TODO: Validate the params before sending @@ -332,7 +425,7 @@ func (a *Client) SecretsSecretRolesUpdate(params *SecretsSecretRolesUpdateParams PathPattern: "/secrets/secret-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsSecretRolesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -342,12 +435,18 @@ func (a *Client) SecretsSecretRolesUpdate(params *SecretsSecretRolesUpdateParams if err != nil { return nil, err } - return result.(*SecretsSecretRolesUpdateOK), nil - + 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) } /* -SecretsSecretsCreate secrets secrets create API + SecretsSecretsCreate secrets secrets create API */ func (a *Client) SecretsSecretsCreate(params *SecretsSecretsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsCreateCreated, error) { // TODO: Validate the params before sending @@ -361,7 +460,7 @@ func (a *Client) SecretsSecretsCreate(params *SecretsSecretsCreateParams, authIn PathPattern: "/secrets/secrets/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsSecretsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -371,12 +470,18 @@ func (a *Client) SecretsSecretsCreate(params *SecretsSecretsCreateParams, authIn if err != nil { return nil, err } - return result.(*SecretsSecretsCreateCreated), nil - + 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 + SecretsSecretsDelete secrets secrets delete API */ func (a *Client) SecretsSecretsDelete(params *SecretsSecretsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -390,7 +495,7 @@ func (a *Client) SecretsSecretsDelete(params *SecretsSecretsDeleteParams, authIn PathPattern: "/secrets/secrets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsSecretsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -400,12 +505,18 @@ func (a *Client) SecretsSecretsDelete(params *SecretsSecretsDeleteParams, authIn if err != nil { return nil, err } - return result.(*SecretsSecretsDeleteNoContent), nil - + 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 + SecretsSecretsList secrets secrets list API */ func (a *Client) SecretsSecretsList(params *SecretsSecretsListParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsListOK, error) { // TODO: Validate the params before sending @@ -419,7 +530,7 @@ func (a *Client) SecretsSecretsList(params *SecretsSecretsListParams, authInfo r PathPattern: "/secrets/secrets/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsSecretsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -429,12 +540,18 @@ func (a *Client) SecretsSecretsList(params *SecretsSecretsListParams, authInfo r if err != nil { return nil, err } - return result.(*SecretsSecretsListOK), nil - + 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 + SecretsSecretsPartialUpdate secrets secrets partial update API */ func (a *Client) SecretsSecretsPartialUpdate(params *SecretsSecretsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -448,7 +565,7 @@ func (a *Client) SecretsSecretsPartialUpdate(params *SecretsSecretsPartialUpdate PathPattern: "/secrets/secrets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsSecretsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -458,12 +575,18 @@ func (a *Client) SecretsSecretsPartialUpdate(params *SecretsSecretsPartialUpdate if err != nil { return nil, err } - return result.(*SecretsSecretsPartialUpdateOK), nil - + 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 + SecretsSecretsRead secrets secrets read API */ func (a *Client) SecretsSecretsRead(params *SecretsSecretsReadParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsReadOK, error) { // TODO: Validate the params before sending @@ -477,7 +600,7 @@ func (a *Client) SecretsSecretsRead(params *SecretsSecretsReadParams, authInfo r PathPattern: "/secrets/secrets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsSecretsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -487,12 +610,18 @@ func (a *Client) SecretsSecretsRead(params *SecretsSecretsReadParams, authInfo r if err != nil { return nil, err } - return result.(*SecretsSecretsReadOK), nil - + 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 + SecretsSecretsUpdate secrets secrets update API */ func (a *Client) SecretsSecretsUpdate(params *SecretsSecretsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsUpdateOK, error) { // TODO: Validate the params before sending @@ -506,7 +635,7 @@ func (a *Client) SecretsSecretsUpdate(params *SecretsSecretsUpdateParams, authIn PathPattern: "/secrets/secrets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &SecretsSecretsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -516,8 +645,14 @@ func (a *Client) SecretsSecretsUpdate(params *SecretsSecretsUpdateParams, authIn if err != nil { return nil, err } - return result.(*SecretsSecretsUpdateOK), nil - + 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 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 index 26bca5eb94305938c8a2b1eff7487622574c1c5b..a8f47816c47eff4f9983f8ed3a47316d4d93c0fa 100644 --- a/netbox/client/secrets/secrets_generate_rsa_key_pair_list_parameters.go +++ b/netbox/client/secrets/secrets_generate_rsa_key_pair_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 diff --git a/netbox/client/secrets/secrets_generate_rsa_key_pair_list_responses.go b/netbox/client/secrets/secrets_generate_rsa_key_pair_list_responses.go index eac11287c0a653453edc4b531b755a18dab4510d..351b050ab0a1b7efe1ed6dc74f4c7efc1e0bc62a 100644 --- a/netbox/client/secrets/secrets_generate_rsa_key_pair_list_responses.go +++ b/netbox/client/secrets/secrets_generate_rsa_key_pair_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -35,7 +36,6 @@ type SecretsGenerateRsaKeyPairListReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsGenerateRsaKeyPairListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewSecretsGenerateRsaKeyPairListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/secrets/secrets_get_session_key_create_parameters.go b/netbox/client/secrets/secrets_get_session_key_create_parameters.go index bc454ad7913e8590564f95a53aa4fdb32dae7b1b..4701feb4d84774dbb1f0ecac2a30b4cefbcf7976 100644 --- a/netbox/client/secrets/secrets_get_session_key_create_parameters.go +++ b/netbox/client/secrets/secrets_get_session_key_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 diff --git a/netbox/client/secrets/secrets_get_session_key_create_responses.go b/netbox/client/secrets/secrets_get_session_key_create_responses.go index 5e68480fb55c17ea5d1a7ae34bd58a4d2aaae52b..83a27180355ce06295faf1a8a301226e612f561f 100644 --- a/netbox/client/secrets/secrets_get_session_key_create_responses.go +++ b/netbox/client/secrets/secrets_get_session_key_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -35,7 +36,6 @@ type SecretsGetSessionKeyCreateReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsGetSessionKeyCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewSecretsGetSessionKeyCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/secrets/secrets_secret_roles_create_parameters.go b/netbox/client/secrets/secrets_secret_roles_create_parameters.go index bf23afeeddc4c001bd4a73ac9c6f4869951e2257..2fb0c9188f434261eac768e3e354ea48a5ae0de7 100644 --- a/netbox/client/secrets/secrets_secret_roles_create_parameters.go +++ b/netbox/client/secrets/secrets_secret_roles_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewSecretsSecretRolesCreateParams creates a new SecretsSecretRolesCreateParams object diff --git a/netbox/client/secrets/secrets_secret_roles_create_responses.go b/netbox/client/secrets/secrets_secret_roles_create_responses.go index 130734ffa27f276cd06d585ea61bc0efe2ac62fb..27d37e6b7ebfb32582b8f35b7cc0903535fd1012 100644 --- a/netbox/client/secrets/secrets_secret_roles_create_responses.go +++ b/netbox/client/secrets/secrets_secret_roles_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // SecretsSecretRolesCreateReader is a Reader for the SecretsSecretRolesCreate structure. @@ -38,7 +39,6 @@ type SecretsSecretRolesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsSecretRolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewSecretsSecretRolesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *SecretsSecretRolesCreateCreated) Error() string { return fmt.Sprintf("[POST /secrets/secret-roles/][%d] secretsSecretRolesCreateCreated %+v", 201, o.Payload) } +func (o *SecretsSecretRolesCreateCreated) GetPayload() *models.SecretRole { + return o.Payload +} + func (o *SecretsSecretRolesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SecretRole) diff --git a/netbox/client/secrets/secrets_secret_roles_delete_parameters.go b/netbox/client/secrets/secrets_secret_roles_delete_parameters.go index a6553fb1233df531290f95c2f2e4245894ffdc7b..31d5375e5aa1c446691fae9ecb02313e152a89dd 100644 --- a/netbox/client/secrets/secrets_secret_roles_delete_parameters.go +++ b/netbox/client/secrets/secrets_secret_roles_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 diff --git a/netbox/client/secrets/secrets_secret_roles_delete_responses.go b/netbox/client/secrets/secrets_secret_roles_delete_responses.go index e8691faf87b6762f526732a7de3e2d8fb7345cb8..b86a0a40531e859c995900e491db433e1da3bbd8 100644 --- a/netbox/client/secrets/secrets_secret_roles_delete_responses.go +++ b/netbox/client/secrets/secrets_secret_roles_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -35,7 +36,6 @@ type SecretsSecretRolesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsSecretRolesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewSecretsSecretRolesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/secrets/secrets_secret_roles_list_parameters.go b/netbox/client/secrets/secrets_secret_roles_list_parameters.go index 6f5fb649839a744f33c3a1b9e020817ca12204fc..64de5c6cfb72a87a16b188cbd2d238043b161c96 100644 --- a/netbox/client/secrets/secrets_secret_roles_list_parameters.go +++ b/netbox/client/secrets/secrets_secret_roles_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 diff --git a/netbox/client/secrets/secrets_secret_roles_list_responses.go b/netbox/client/secrets/secrets_secret_roles_list_responses.go index 34fd8fa70021426bc93b7d75e80f6476c2ee452b..d09618d31b998afd2bbe5056ebbd362b6ae352f5 100644 --- a/netbox/client/secrets/secrets_secret_roles_list_responses.go +++ b/netbox/client/secrets/secrets_secret_roles_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // SecretsSecretRolesListReader is a Reader for the SecretsSecretRolesList structure. @@ -42,7 +43,6 @@ type SecretsSecretRolesListReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsSecretRolesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewSecretsSecretRolesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *SecretsSecretRolesListOK) Error() string { return fmt.Sprintf("[GET /secrets/secret-roles/][%d] secretsSecretRolesListOK %+v", 200, o.Payload) } +func (o *SecretsSecretRolesListOK) GetPayload() *SecretsSecretRolesListOKBody { + return o.Payload +} + func (o *SecretsSecretRolesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(SecretsSecretRolesListOKBody) diff --git a/netbox/client/secrets/secrets_secret_roles_partial_update_parameters.go b/netbox/client/secrets/secrets_secret_roles_partial_update_parameters.go index ab51babfd397cd897ab40d29f8904c642319163d..caf67697f156184a4369d81acd94987038aa85dc 100644 --- a/netbox/client/secrets/secrets_secret_roles_partial_update_parameters.go +++ b/netbox/client/secrets/secrets_secret_roles_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewSecretsSecretRolesPartialUpdateParams creates a new SecretsSecretRolesPartialUpdateParams object diff --git a/netbox/client/secrets/secrets_secret_roles_partial_update_responses.go b/netbox/client/secrets/secrets_secret_roles_partial_update_responses.go index 9e9c406b58c7225b98e8419ac0a1424724f1b40e..4d11b8ec8cab7f27996fba28b5b00129f51a94c6 100644 --- a/netbox/client/secrets/secrets_secret_roles_partial_update_responses.go +++ b/netbox/client/secrets/secrets_secret_roles_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // SecretsSecretRolesPartialUpdateReader is a Reader for the SecretsSecretRolesPartialUpdate structure. @@ -38,7 +39,6 @@ type SecretsSecretRolesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsSecretRolesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewSecretsSecretRolesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *SecretsSecretRolesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /secrets/secret-roles/{id}/][%d] secretsSecretRolesPartialUpdateOK %+v", 200, o.Payload) } +func (o *SecretsSecretRolesPartialUpdateOK) GetPayload() *models.SecretRole { + return o.Payload +} + func (o *SecretsSecretRolesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SecretRole) diff --git a/netbox/client/secrets/secrets_secret_roles_read_parameters.go b/netbox/client/secrets/secrets_secret_roles_read_parameters.go index d36d7f95ae1bfa72441870e5968f7d4cf15c42fc..b9493f0c2e4a002193db6fb2648eadad0c07044f 100644 --- a/netbox/client/secrets/secrets_secret_roles_read_parameters.go +++ b/netbox/client/secrets/secrets_secret_roles_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 diff --git a/netbox/client/secrets/secrets_secret_roles_read_responses.go b/netbox/client/secrets/secrets_secret_roles_read_responses.go index a2564eccc92ee47fb04d41666fd8aa2b9a1518b4..ab869a3e33189dbf54cb186d5d77719572f90022 100644 --- a/netbox/client/secrets/secrets_secret_roles_read_responses.go +++ b/netbox/client/secrets/secrets_secret_roles_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // SecretsSecretRolesReadReader is a Reader for the SecretsSecretRolesRead structure. @@ -38,7 +39,6 @@ type SecretsSecretRolesReadReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsSecretRolesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewSecretsSecretRolesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *SecretsSecretRolesReadOK) Error() string { return fmt.Sprintf("[GET /secrets/secret-roles/{id}/][%d] secretsSecretRolesReadOK %+v", 200, o.Payload) } +func (o *SecretsSecretRolesReadOK) GetPayload() *models.SecretRole { + return o.Payload +} + func (o *SecretsSecretRolesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SecretRole) diff --git a/netbox/client/secrets/secrets_secret_roles_update_parameters.go b/netbox/client/secrets/secrets_secret_roles_update_parameters.go index 520daeecbc24c524d1ca4ee1ebe81805c26019df..572e8a2ee2935243b0f667bf7ba33de90d6fddde 100644 --- a/netbox/client/secrets/secrets_secret_roles_update_parameters.go +++ b/netbox/client/secrets/secrets_secret_roles_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewSecretsSecretRolesUpdateParams creates a new SecretsSecretRolesUpdateParams object diff --git a/netbox/client/secrets/secrets_secret_roles_update_responses.go b/netbox/client/secrets/secrets_secret_roles_update_responses.go index 6bd82b46327861595e38dc695578660cb6b29d3e..fd2ef1278ce7cb71adf222057fc69a8558557270 100644 --- a/netbox/client/secrets/secrets_secret_roles_update_responses.go +++ b/netbox/client/secrets/secrets_secret_roles_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // SecretsSecretRolesUpdateReader is a Reader for the SecretsSecretRolesUpdate structure. @@ -38,7 +39,6 @@ type SecretsSecretRolesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsSecretRolesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewSecretsSecretRolesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *SecretsSecretRolesUpdateOK) Error() string { return fmt.Sprintf("[PUT /secrets/secret-roles/{id}/][%d] secretsSecretRolesUpdateOK %+v", 200, o.Payload) } +func (o *SecretsSecretRolesUpdateOK) GetPayload() *models.SecretRole { + return o.Payload +} + func (o *SecretsSecretRolesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SecretRole) diff --git a/netbox/client/secrets/secrets_secrets_create_parameters.go b/netbox/client/secrets/secrets_secrets_create_parameters.go index 1457cd19c8974fd58f0de793738b29e9b7604ac8..b88b6c32f9715248868461d494ed9968984dba1d 100644 --- a/netbox/client/secrets/secrets_secrets_create_parameters.go +++ b/netbox/client/secrets/secrets_secrets_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewSecretsSecretsCreateParams creates a new SecretsSecretsCreateParams object diff --git a/netbox/client/secrets/secrets_secrets_create_responses.go b/netbox/client/secrets/secrets_secrets_create_responses.go index 051eb49cb8d562316d55faffb32ca0a7c8695bd9..14db177c1375c00a7190340b979617ceb5e36eb1 100644 --- a/netbox/client/secrets/secrets_secrets_create_responses.go +++ b/netbox/client/secrets/secrets_secrets_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // SecretsSecretsCreateReader is a Reader for the SecretsSecretsCreate structure. @@ -38,7 +39,6 @@ type SecretsSecretsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsSecretsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewSecretsSecretsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *SecretsSecretsCreateCreated) Error() string { return fmt.Sprintf("[POST /secrets/secrets/][%d] secretsSecretsCreateCreated %+v", 201, o.Payload) } +func (o *SecretsSecretsCreateCreated) GetPayload() *models.Secret { + return o.Payload +} + func (o *SecretsSecretsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Secret) diff --git a/netbox/client/secrets/secrets_secrets_delete_parameters.go b/netbox/client/secrets/secrets_secrets_delete_parameters.go index e959851515f059bf6ab8b85719453719ddcf66e3..90813e6fa15606d480951591fec978cb6233f890 100644 --- a/netbox/client/secrets/secrets_secrets_delete_parameters.go +++ b/netbox/client/secrets/secrets_secrets_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 diff --git a/netbox/client/secrets/secrets_secrets_delete_responses.go b/netbox/client/secrets/secrets_secrets_delete_responses.go index d4f3a922ba96ba139006eebd208ad239181b1489..5c024c87e47c1406effb28d0a87406aa1a4d327f 100644 --- a/netbox/client/secrets/secrets_secrets_delete_responses.go +++ b/netbox/client/secrets/secrets_secrets_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -35,7 +36,6 @@ type SecretsSecretsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsSecretsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewSecretsSecretsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/secrets/secrets_secrets_list_parameters.go b/netbox/client/secrets/secrets_secrets_list_parameters.go index 6fe1509150c5ed7489da66e4cb90ea7359604b74..8b4daa860281c693d1117a3e5228d19558c5d95e 100644 --- a/netbox/client/secrets/secrets_secrets_list_parameters.go +++ b/netbox/client/secrets/secrets_secrets_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -76,6 +77,12 @@ for the secrets secrets list operation typically these are written to a http.Req */ type SecretsSecretsListParams struct { + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*Device*/ Device *string /*DeviceID*/ @@ -85,6 +92,12 @@ type SecretsSecretsListParams struct { */ IDIn *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. @@ -144,6 +157,39 @@ 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) @@ -177,6 +223,39 @@ func (o *SecretsSecretsListParams) SetIDIn(iDIn *string) { o.IDIn = iDIn } +// 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) @@ -262,6 +341,54 @@ func (o *SecretsSecretsListParams) WriteToRequest(r runtime.ClientRequest, reg s } 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 @@ -310,6 +437,54 @@ func (o *SecretsSecretsListParams) WriteToRequest(r runtime.ClientRequest, reg s } + 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 diff --git a/netbox/client/secrets/secrets_secrets_list_responses.go b/netbox/client/secrets/secrets_secrets_list_responses.go index 568494595106030e88fb7986e1265d436fbd226c..4723f58eac24556bc814c71118c670dde7f0d4f9 100644 --- a/netbox/client/secrets/secrets_secrets_list_responses.go +++ b/netbox/client/secrets/secrets_secrets_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // SecretsSecretsListReader is a Reader for the SecretsSecretsList structure. @@ -42,7 +43,6 @@ type SecretsSecretsListReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsSecretsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewSecretsSecretsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *SecretsSecretsListOK) Error() string { return fmt.Sprintf("[GET /secrets/secrets/][%d] secretsSecretsListOK %+v", 200, o.Payload) } +func (o *SecretsSecretsListOK) GetPayload() *SecretsSecretsListOKBody { + return o.Payload +} + func (o *SecretsSecretsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(SecretsSecretsListOKBody) diff --git a/netbox/client/secrets/secrets_secrets_partial_update_parameters.go b/netbox/client/secrets/secrets_secrets_partial_update_parameters.go index 9fe38d680a410769292395ba44da628509e3175b..38dd472374899c9753a09d81bbb651f83f0bbffa 100644 --- a/netbox/client/secrets/secrets_secrets_partial_update_parameters.go +++ b/netbox/client/secrets/secrets_secrets_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewSecretsSecretsPartialUpdateParams creates a new SecretsSecretsPartialUpdateParams object diff --git a/netbox/client/secrets/secrets_secrets_partial_update_responses.go b/netbox/client/secrets/secrets_secrets_partial_update_responses.go index ccff77239b74ba9f8ab69f85870c104e3de89dbe..cf839480848b29c30ca053948e47a74b161c7b04 100644 --- a/netbox/client/secrets/secrets_secrets_partial_update_responses.go +++ b/netbox/client/secrets/secrets_secrets_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // SecretsSecretsPartialUpdateReader is a Reader for the SecretsSecretsPartialUpdate structure. @@ -38,7 +39,6 @@ type SecretsSecretsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsSecretsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewSecretsSecretsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *SecretsSecretsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /secrets/secrets/{id}/][%d] secretsSecretsPartialUpdateOK %+v", 200, o.Payload) } +func (o *SecretsSecretsPartialUpdateOK) GetPayload() *models.Secret { + return o.Payload +} + func (o *SecretsSecretsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Secret) diff --git a/netbox/client/secrets/secrets_secrets_read_parameters.go b/netbox/client/secrets/secrets_secrets_read_parameters.go index d81390f2453b6812c4e871c7a9e3ad0b176865e7..321779e0972cb8d94eaf099b93e0adabeb057207 100644 --- a/netbox/client/secrets/secrets_secrets_read_parameters.go +++ b/netbox/client/secrets/secrets_secrets_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 diff --git a/netbox/client/secrets/secrets_secrets_read_responses.go b/netbox/client/secrets/secrets_secrets_read_responses.go index 5db634f3233f0ca4e526d6fe2a17132e97953556..61bcd8bbb5d56679025a6794b1f460b9966c5364 100644 --- a/netbox/client/secrets/secrets_secrets_read_responses.go +++ b/netbox/client/secrets/secrets_secrets_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // SecretsSecretsReadReader is a Reader for the SecretsSecretsRead structure. @@ -38,7 +39,6 @@ type SecretsSecretsReadReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsSecretsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewSecretsSecretsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *SecretsSecretsReadOK) Error() string { return fmt.Sprintf("[GET /secrets/secrets/{id}/][%d] secretsSecretsReadOK %+v", 200, o.Payload) } +func (o *SecretsSecretsReadOK) GetPayload() *models.Secret { + return o.Payload +} + func (o *SecretsSecretsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Secret) diff --git a/netbox/client/secrets/secrets_secrets_update_parameters.go b/netbox/client/secrets/secrets_secrets_update_parameters.go index c105d9be0ee46582b1c40808d074756dc12a50f1..64247837b757c134a0aaf393fa4b4c363d38f259 100644 --- a/netbox/client/secrets/secrets_secrets_update_parameters.go +++ b/netbox/client/secrets/secrets_secrets_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewSecretsSecretsUpdateParams creates a new SecretsSecretsUpdateParams object diff --git a/netbox/client/secrets/secrets_secrets_update_responses.go b/netbox/client/secrets/secrets_secrets_update_responses.go index 4cba2713f1e8af987da4742ce84c0523f99e6de7..689e26ff86091d34b6791717b5755a8cf295f0eb 100644 --- a/netbox/client/secrets/secrets_secrets_update_responses.go +++ b/netbox/client/secrets/secrets_secrets_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES 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 @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // SecretsSecretsUpdateReader is a Reader for the SecretsSecretsUpdate structure. @@ -38,7 +39,6 @@ type SecretsSecretsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *SecretsSecretsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewSecretsSecretsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *SecretsSecretsUpdateOK) Error() string { return fmt.Sprintf("[PUT /secrets/secrets/{id}/][%d] secretsSecretsUpdateOK %+v", 200, o.Payload) } +func (o *SecretsSecretsUpdateOK) GetPayload() *models.Secret { + return o.Payload +} + func (o *SecretsSecretsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Secret) diff --git a/netbox/client/tenancy/tenancy_choices_list_parameters.go b/netbox/client/tenancy/tenancy_choices_list_parameters.go index ca2d11e4334d3a014a187f0dee71274370ade167..48c4a41394df0fb3da7e30a5dcd9bf31ae985777 100644 --- a/netbox/client/tenancy/tenancy_choices_list_parameters.go +++ b/netbox/client/tenancy/tenancy_choices_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy diff --git a/netbox/client/tenancy/tenancy_choices_list_responses.go b/netbox/client/tenancy/tenancy_choices_list_responses.go index b0bbe7b998b502791c76fc8a6487dd44cc2bb3aa..464f7824a34e82d16081850759ac67ace684a6c8 100644 --- a/netbox/client/tenancy/tenancy_choices_list_responses.go +++ b/netbox/client/tenancy/tenancy_choices_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -35,7 +36,6 @@ type TenancyChoicesListReader struct { // ReadResponse reads a server response into the received o. func (o *TenancyChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewTenancyChoicesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/tenancy/tenancy_choices_read_parameters.go b/netbox/client/tenancy/tenancy_choices_read_parameters.go index 43006292306ca9098f41c7b91684f9d9c3522b9a..e2d9e34c6b2a25cac22ec81012f1cf4bb2026c38 100644 --- a/netbox/client/tenancy/tenancy_choices_read_parameters.go +++ b/netbox/client/tenancy/tenancy_choices_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy diff --git a/netbox/client/tenancy/tenancy_choices_read_responses.go b/netbox/client/tenancy/tenancy_choices_read_responses.go index d48fa0731aabc6c678743521d2af942cc5cd801a..260a0d124977895295ebb5e4c355142c49a0bef3 100644 --- a/netbox/client/tenancy/tenancy_choices_read_responses.go +++ b/netbox/client/tenancy/tenancy_choices_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -35,7 +36,6 @@ type TenancyChoicesReadReader struct { // ReadResponse reads a server response into the received o. func (o *TenancyChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewTenancyChoicesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/tenancy/tenancy_client.go b/netbox/client/tenancy/tenancy_client.go index c0464e40298d6faf3eca83279cbe05fdfb5c73f4..a64c77b142b01d904dd58466ec7280c86c0376ef 100644 --- a/netbox/client/tenancy/tenancy_client.go +++ b/netbox/client/tenancy/tenancy_client.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -20,13 +21,14 @@ package tenancy // Editing this file might prove futile when you re-run the swagger generate command import ( - "github.com/go-openapi/runtime" + "fmt" - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" ) // New creates a new tenancy API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } @@ -38,8 +40,41 @@ type Client struct { formats strfmt.Registry } +// ClientService is the interface for Client methods +type ClientService interface { + TenancyChoicesList(params *TenancyChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyChoicesListOK, error) + + TenancyChoicesRead(params *TenancyChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyChoicesReadOK, error) + + TenancyTenantGroupsCreate(params *TenancyTenantGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsCreateCreated, error) + + TenancyTenantGroupsDelete(params *TenancyTenantGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsDeleteNoContent, error) + + TenancyTenantGroupsList(params *TenancyTenantGroupsListParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsListOK, error) + + TenancyTenantGroupsPartialUpdate(params *TenancyTenantGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsPartialUpdateOK, error) + + TenancyTenantGroupsRead(params *TenancyTenantGroupsReadParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsReadOK, error) + + TenancyTenantGroupsUpdate(params *TenancyTenantGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsUpdateOK, error) + + TenancyTenantsCreate(params *TenancyTenantsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsCreateCreated, error) + + TenancyTenantsDelete(params *TenancyTenantsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsDeleteNoContent, error) + + TenancyTenantsList(params *TenancyTenantsListParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsListOK, error) + + TenancyTenantsPartialUpdate(params *TenancyTenantsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsPartialUpdateOK, error) + + TenancyTenantsRead(params *TenancyTenantsReadParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsReadOK, error) + + TenancyTenantsUpdate(params *TenancyTenantsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsUpdateOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* -TenancyChoicesList tenancy choices list API + TenancyChoicesList tenancy choices list API */ func (a *Client) TenancyChoicesList(params *TenancyChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyChoicesListOK, error) { // TODO: Validate the params before sending @@ -53,7 +88,7 @@ func (a *Client) TenancyChoicesList(params *TenancyChoicesListParams, authInfo r PathPattern: "/tenancy/_choices/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyChoicesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -63,12 +98,18 @@ func (a *Client) TenancyChoicesList(params *TenancyChoicesListParams, authInfo r if err != nil { return nil, err } - return result.(*TenancyChoicesListOK), nil - + success, ok := result.(*TenancyChoicesListOK) + 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 tenancy__choices_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -TenancyChoicesRead tenancy choices read API + TenancyChoicesRead tenancy choices read API */ func (a *Client) TenancyChoicesRead(params *TenancyChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyChoicesReadOK, error) { // TODO: Validate the params before sending @@ -82,7 +123,7 @@ func (a *Client) TenancyChoicesRead(params *TenancyChoicesReadParams, authInfo r PathPattern: "/tenancy/_choices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyChoicesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -92,12 +133,18 @@ func (a *Client) TenancyChoicesRead(params *TenancyChoicesReadParams, authInfo r if err != nil { return nil, err } - return result.(*TenancyChoicesReadOK), nil - + success, ok := result.(*TenancyChoicesReadOK) + 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 tenancy__choices_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -TenancyTenantGroupsCreate tenancy tenant groups create API + TenancyTenantGroupsCreate tenancy tenant groups create API */ func (a *Client) TenancyTenantGroupsCreate(params *TenancyTenantGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsCreateCreated, error) { // TODO: Validate the params before sending @@ -111,7 +158,7 @@ func (a *Client) TenancyTenantGroupsCreate(params *TenancyTenantGroupsCreatePara PathPattern: "/tenancy/tenant-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -121,12 +168,18 @@ func (a *Client) TenancyTenantGroupsCreate(params *TenancyTenantGroupsCreatePara if err != nil { return nil, err } - return result.(*TenancyTenantGroupsCreateCreated), nil - + success, ok := result.(*TenancyTenantGroupsCreateCreated) + 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 tenancy_tenant-groups_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -TenancyTenantGroupsDelete tenancy tenant groups delete API + TenancyTenantGroupsDelete tenancy tenant groups delete API */ func (a *Client) TenancyTenantGroupsDelete(params *TenancyTenantGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -140,7 +193,7 @@ func (a *Client) TenancyTenantGroupsDelete(params *TenancyTenantGroupsDeletePara PathPattern: "/tenancy/tenant-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -150,12 +203,18 @@ func (a *Client) TenancyTenantGroupsDelete(params *TenancyTenantGroupsDeletePara if err != nil { return nil, err } - return result.(*TenancyTenantGroupsDeleteNoContent), nil - + success, ok := result.(*TenancyTenantGroupsDeleteNoContent) + 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 tenancy_tenant-groups_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -TenancyTenantGroupsList Call to super to allow for caching + TenancyTenantGroupsList Call to super to allow for caching */ func (a *Client) TenancyTenantGroupsList(params *TenancyTenantGroupsListParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsListOK, error) { // TODO: Validate the params before sending @@ -169,7 +228,7 @@ func (a *Client) TenancyTenantGroupsList(params *TenancyTenantGroupsListParams, PathPattern: "/tenancy/tenant-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -179,12 +238,18 @@ func (a *Client) TenancyTenantGroupsList(params *TenancyTenantGroupsListParams, if err != nil { return nil, err } - return result.(*TenancyTenantGroupsListOK), nil - + success, ok := result.(*TenancyTenantGroupsListOK) + 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 tenancy_tenant-groups_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -TenancyTenantGroupsPartialUpdate tenancy tenant groups partial update API + TenancyTenantGroupsPartialUpdate tenancy tenant groups partial update API */ func (a *Client) TenancyTenantGroupsPartialUpdate(params *TenancyTenantGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -198,7 +263,7 @@ func (a *Client) TenancyTenantGroupsPartialUpdate(params *TenancyTenantGroupsPar PathPattern: "/tenancy/tenant-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -208,12 +273,18 @@ func (a *Client) TenancyTenantGroupsPartialUpdate(params *TenancyTenantGroupsPar if err != nil { return nil, err } - return result.(*TenancyTenantGroupsPartialUpdateOK), nil - + success, ok := result.(*TenancyTenantGroupsPartialUpdateOK) + 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 tenancy_tenant-groups_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -TenancyTenantGroupsRead Call to super to allow for caching + TenancyTenantGroupsRead Call to super to allow for caching */ func (a *Client) TenancyTenantGroupsRead(params *TenancyTenantGroupsReadParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsReadOK, error) { // TODO: Validate the params before sending @@ -227,7 +298,7 @@ func (a *Client) TenancyTenantGroupsRead(params *TenancyTenantGroupsReadParams, PathPattern: "/tenancy/tenant-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -237,12 +308,18 @@ func (a *Client) TenancyTenantGroupsRead(params *TenancyTenantGroupsReadParams, if err != nil { return nil, err } - return result.(*TenancyTenantGroupsReadOK), nil - + success, ok := result.(*TenancyTenantGroupsReadOK) + 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 tenancy_tenant-groups_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -TenancyTenantGroupsUpdate tenancy tenant groups update API + TenancyTenantGroupsUpdate tenancy tenant groups update API */ func (a *Client) TenancyTenantGroupsUpdate(params *TenancyTenantGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsUpdateOK, error) { // TODO: Validate the params before sending @@ -256,7 +333,7 @@ func (a *Client) TenancyTenantGroupsUpdate(params *TenancyTenantGroupsUpdatePara PathPattern: "/tenancy/tenant-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -266,12 +343,18 @@ func (a *Client) TenancyTenantGroupsUpdate(params *TenancyTenantGroupsUpdatePara if err != nil { return nil, err } - return result.(*TenancyTenantGroupsUpdateOK), nil - + success, ok := result.(*TenancyTenantGroupsUpdateOK) + 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 tenancy_tenant-groups_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -TenancyTenantsCreate tenancy tenants create API + TenancyTenantsCreate tenancy tenants create API */ func (a *Client) TenancyTenantsCreate(params *TenancyTenantsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsCreateCreated, error) { // TODO: Validate the params before sending @@ -285,7 +368,7 @@ func (a *Client) TenancyTenantsCreate(params *TenancyTenantsCreateParams, authIn PathPattern: "/tenancy/tenants/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -295,12 +378,18 @@ func (a *Client) TenancyTenantsCreate(params *TenancyTenantsCreateParams, authIn if err != nil { return nil, err } - return result.(*TenancyTenantsCreateCreated), nil - + success, ok := result.(*TenancyTenantsCreateCreated) + 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 tenancy_tenants_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -TenancyTenantsDelete tenancy tenants delete API + TenancyTenantsDelete tenancy tenants delete API */ func (a *Client) TenancyTenantsDelete(params *TenancyTenantsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -314,7 +403,7 @@ func (a *Client) TenancyTenantsDelete(params *TenancyTenantsDeleteParams, authIn PathPattern: "/tenancy/tenants/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -324,12 +413,18 @@ func (a *Client) TenancyTenantsDelete(params *TenancyTenantsDeleteParams, authIn if err != nil { return nil, err } - return result.(*TenancyTenantsDeleteNoContent), nil - + success, ok := result.(*TenancyTenantsDeleteNoContent) + 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 tenancy_tenants_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -TenancyTenantsList Call to super to allow for caching + TenancyTenantsList Call to super to allow for caching */ func (a *Client) TenancyTenantsList(params *TenancyTenantsListParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsListOK, error) { // TODO: Validate the params before sending @@ -343,7 +438,7 @@ func (a *Client) TenancyTenantsList(params *TenancyTenantsListParams, authInfo r PathPattern: "/tenancy/tenants/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -353,12 +448,18 @@ func (a *Client) TenancyTenantsList(params *TenancyTenantsListParams, authInfo r if err != nil { return nil, err } - return result.(*TenancyTenantsListOK), nil - + success, ok := result.(*TenancyTenantsListOK) + 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 tenancy_tenants_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -TenancyTenantsPartialUpdate tenancy tenants partial update API + TenancyTenantsPartialUpdate tenancy tenants partial update API */ func (a *Client) TenancyTenantsPartialUpdate(params *TenancyTenantsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -372,7 +473,7 @@ func (a *Client) TenancyTenantsPartialUpdate(params *TenancyTenantsPartialUpdate PathPattern: "/tenancy/tenants/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -382,12 +483,18 @@ func (a *Client) TenancyTenantsPartialUpdate(params *TenancyTenantsPartialUpdate if err != nil { return nil, err } - return result.(*TenancyTenantsPartialUpdateOK), nil - + success, ok := result.(*TenancyTenantsPartialUpdateOK) + 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 tenancy_tenants_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -TenancyTenantsRead Call to super to allow for caching + TenancyTenantsRead Call to super to allow for caching */ func (a *Client) TenancyTenantsRead(params *TenancyTenantsReadParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsReadOK, error) { // TODO: Validate the params before sending @@ -401,7 +508,7 @@ func (a *Client) TenancyTenantsRead(params *TenancyTenantsReadParams, authInfo r PathPattern: "/tenancy/tenants/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -411,12 +518,18 @@ func (a *Client) TenancyTenantsRead(params *TenancyTenantsReadParams, authInfo r if err != nil { return nil, err } - return result.(*TenancyTenantsReadOK), nil - + success, ok := result.(*TenancyTenantsReadOK) + 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 tenancy_tenants_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -TenancyTenantsUpdate tenancy tenants update API + TenancyTenantsUpdate tenancy tenants update API */ func (a *Client) TenancyTenantsUpdate(params *TenancyTenantsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsUpdateOK, error) { // TODO: Validate the params before sending @@ -430,7 +543,7 @@ func (a *Client) TenancyTenantsUpdate(params *TenancyTenantsUpdateParams, authIn PathPattern: "/tenancy/tenants/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -440,8 +553,14 @@ func (a *Client) TenancyTenantsUpdate(params *TenancyTenantsUpdateParams, authIn if err != nil { return nil, err } - return result.(*TenancyTenantsUpdateOK), nil - + success, ok := result.(*TenancyTenantsUpdateOK) + 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 tenancy_tenants_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 diff --git a/netbox/client/tenancy/tenancy_tenant_groups_create_parameters.go b/netbox/client/tenancy/tenancy_tenant_groups_create_parameters.go index b70b949d8207f8e03533b19221bb168688750c9f..1baa0dd90728f01e338823c4ed3adc00f3e88591 100644 --- a/netbox/client/tenancy/tenancy_tenant_groups_create_parameters.go +++ b/netbox/client/tenancy/tenancy_tenant_groups_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewTenancyTenantGroupsCreateParams creates a new TenancyTenantGroupsCreateParams object diff --git a/netbox/client/tenancy/tenancy_tenant_groups_create_responses.go b/netbox/client/tenancy/tenancy_tenant_groups_create_responses.go index c7f5350c5a3d229b5bcd3f3209523f8e5ccf2aa2..8e4c30c4c5ef9a1080a6e6611414534e4e0c0e49 100644 --- a/netbox/client/tenancy/tenancy_tenant_groups_create_responses.go +++ b/netbox/client/tenancy/tenancy_tenant_groups_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // TenancyTenantGroupsCreateReader is a Reader for the TenancyTenantGroupsCreate structure. @@ -38,7 +39,6 @@ type TenancyTenantGroupsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *TenancyTenantGroupsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewTenancyTenantGroupsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *TenancyTenantGroupsCreateCreated) Error() string { return fmt.Sprintf("[POST /tenancy/tenant-groups/][%d] tenancyTenantGroupsCreateCreated %+v", 201, o.Payload) } +func (o *TenancyTenantGroupsCreateCreated) GetPayload() *models.TenantGroup { + return o.Payload +} + func (o *TenancyTenantGroupsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.TenantGroup) diff --git a/netbox/client/tenancy/tenancy_tenant_groups_delete_parameters.go b/netbox/client/tenancy/tenancy_tenant_groups_delete_parameters.go index 83f3fe379c8e268f80c8663603679326f3ddc124..af6f8a0898875adb683eae178378041d9af6255c 100644 --- a/netbox/client/tenancy/tenancy_tenant_groups_delete_parameters.go +++ b/netbox/client/tenancy/tenancy_tenant_groups_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy diff --git a/netbox/client/tenancy/tenancy_tenant_groups_delete_responses.go b/netbox/client/tenancy/tenancy_tenant_groups_delete_responses.go index 37f99bc5504b5d2de4e20690b79c8050eaae9327..b856d74858a87aa0cb817f40e4c5f00bb15faa04 100644 --- a/netbox/client/tenancy/tenancy_tenant_groups_delete_responses.go +++ b/netbox/client/tenancy/tenancy_tenant_groups_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -35,7 +36,6 @@ type TenancyTenantGroupsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *TenancyTenantGroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewTenancyTenantGroupsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go b/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go index 7571ce8f977053d002cc290166d951191652deca..076efd57184743fb4e1b1e8dcdb99aecc5b14e49 100644 --- a/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go +++ b/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy diff --git a/netbox/client/tenancy/tenancy_tenant_groups_list_responses.go b/netbox/client/tenancy/tenancy_tenant_groups_list_responses.go index 5125c83ece831ae3dc508b3f7dffb7adf110e170..87a6c805e5ecebfec4bafbfe89c34da80fbb50b0 100644 --- a/netbox/client/tenancy/tenancy_tenant_groups_list_responses.go +++ b/netbox/client/tenancy/tenancy_tenant_groups_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // TenancyTenantGroupsListReader is a Reader for the TenancyTenantGroupsList structure. @@ -42,7 +43,6 @@ type TenancyTenantGroupsListReader struct { // ReadResponse reads a server response into the received o. func (o *TenancyTenantGroupsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewTenancyTenantGroupsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *TenancyTenantGroupsListOK) Error() string { return fmt.Sprintf("[GET /tenancy/tenant-groups/][%d] tenancyTenantGroupsListOK %+v", 200, o.Payload) } +func (o *TenancyTenantGroupsListOK) GetPayload() *TenancyTenantGroupsListOKBody { + return o.Payload +} + func (o *TenancyTenantGroupsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(TenancyTenantGroupsListOKBody) diff --git a/netbox/client/tenancy/tenancy_tenant_groups_partial_update_parameters.go b/netbox/client/tenancy/tenancy_tenant_groups_partial_update_parameters.go index ee612f67c9202ea393b6650098f167f33bfa8db3..e52623c74ee44bece71afbfc2370677dcdead756 100644 --- a/netbox/client/tenancy/tenancy_tenant_groups_partial_update_parameters.go +++ b/netbox/client/tenancy/tenancy_tenant_groups_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewTenancyTenantGroupsPartialUpdateParams creates a new TenancyTenantGroupsPartialUpdateParams object diff --git a/netbox/client/tenancy/tenancy_tenant_groups_partial_update_responses.go b/netbox/client/tenancy/tenancy_tenant_groups_partial_update_responses.go index c272b9588e54cb2a57de78aa000da38309d4bf6d..8861fe52d73a24901b19c1caf6126d1dcc1dfaf5 100644 --- a/netbox/client/tenancy/tenancy_tenant_groups_partial_update_responses.go +++ b/netbox/client/tenancy/tenancy_tenant_groups_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // TenancyTenantGroupsPartialUpdateReader is a Reader for the TenancyTenantGroupsPartialUpdate structure. @@ -38,7 +39,6 @@ type TenancyTenantGroupsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *TenancyTenantGroupsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewTenancyTenantGroupsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *TenancyTenantGroupsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /tenancy/tenant-groups/{id}/][%d] tenancyTenantGroupsPartialUpdateOK %+v", 200, o.Payload) } +func (o *TenancyTenantGroupsPartialUpdateOK) GetPayload() *models.TenantGroup { + return o.Payload +} + func (o *TenancyTenantGroupsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.TenantGroup) diff --git a/netbox/client/tenancy/tenancy_tenant_groups_read_parameters.go b/netbox/client/tenancy/tenancy_tenant_groups_read_parameters.go index e21500a44d631d84cad44ec7050ae7bf45b59db9..710243542a483262b3be1539c09fdcd02b6059df 100644 --- a/netbox/client/tenancy/tenancy_tenant_groups_read_parameters.go +++ b/netbox/client/tenancy/tenancy_tenant_groups_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy diff --git a/netbox/client/tenancy/tenancy_tenant_groups_read_responses.go b/netbox/client/tenancy/tenancy_tenant_groups_read_responses.go index 87e9b03dd92f3a00b4edd419924e64cde7152502..b395f0194486d7644a4ca3b34f1f83e319501410 100644 --- a/netbox/client/tenancy/tenancy_tenant_groups_read_responses.go +++ b/netbox/client/tenancy/tenancy_tenant_groups_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // TenancyTenantGroupsReadReader is a Reader for the TenancyTenantGroupsRead structure. @@ -38,7 +39,6 @@ type TenancyTenantGroupsReadReader struct { // ReadResponse reads a server response into the received o. func (o *TenancyTenantGroupsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewTenancyTenantGroupsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *TenancyTenantGroupsReadOK) Error() string { return fmt.Sprintf("[GET /tenancy/tenant-groups/{id}/][%d] tenancyTenantGroupsReadOK %+v", 200, o.Payload) } +func (o *TenancyTenantGroupsReadOK) GetPayload() *models.TenantGroup { + return o.Payload +} + func (o *TenancyTenantGroupsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.TenantGroup) diff --git a/netbox/client/tenancy/tenancy_tenant_groups_update_parameters.go b/netbox/client/tenancy/tenancy_tenant_groups_update_parameters.go index ce653652aa116c7e2ea368103d6f1055619666d9..7c4fb358de6b60bee8ba9edb21ebbab281e5d8c3 100644 --- a/netbox/client/tenancy/tenancy_tenant_groups_update_parameters.go +++ b/netbox/client/tenancy/tenancy_tenant_groups_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewTenancyTenantGroupsUpdateParams creates a new TenancyTenantGroupsUpdateParams object diff --git a/netbox/client/tenancy/tenancy_tenant_groups_update_responses.go b/netbox/client/tenancy/tenancy_tenant_groups_update_responses.go index aee088a8d9bcc56245be5cf4e1cea34c639c6f8f..2c1c186c24399262d45173ac3febe494407179aa 100644 --- a/netbox/client/tenancy/tenancy_tenant_groups_update_responses.go +++ b/netbox/client/tenancy/tenancy_tenant_groups_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // TenancyTenantGroupsUpdateReader is a Reader for the TenancyTenantGroupsUpdate structure. @@ -38,7 +39,6 @@ type TenancyTenantGroupsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *TenancyTenantGroupsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewTenancyTenantGroupsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *TenancyTenantGroupsUpdateOK) Error() string { return fmt.Sprintf("[PUT /tenancy/tenant-groups/{id}/][%d] tenancyTenantGroupsUpdateOK %+v", 200, o.Payload) } +func (o *TenancyTenantGroupsUpdateOK) GetPayload() *models.TenantGroup { + return o.Payload +} + func (o *TenancyTenantGroupsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.TenantGroup) diff --git a/netbox/client/tenancy/tenancy_tenants_create_parameters.go b/netbox/client/tenancy/tenancy_tenants_create_parameters.go index e0e2fbbdcbbb1c2349888e4701ad30a036a0a6f1..b04651bca33169b0f512661d57afb3a11ed34917 100644 --- a/netbox/client/tenancy/tenancy_tenants_create_parameters.go +++ b/netbox/client/tenancy/tenancy_tenants_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewTenancyTenantsCreateParams creates a new TenancyTenantsCreateParams object diff --git a/netbox/client/tenancy/tenancy_tenants_create_responses.go b/netbox/client/tenancy/tenancy_tenants_create_responses.go index c84cc740c003963238d985afeb08681ff32a87fb..9c8fba7a711b1a3a66d298f42da7b9207a053e1b 100644 --- a/netbox/client/tenancy/tenancy_tenants_create_responses.go +++ b/netbox/client/tenancy/tenancy_tenants_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // TenancyTenantsCreateReader is a Reader for the TenancyTenantsCreate structure. @@ -38,7 +39,6 @@ type TenancyTenantsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *TenancyTenantsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewTenancyTenantsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *TenancyTenantsCreateCreated) Error() string { return fmt.Sprintf("[POST /tenancy/tenants/][%d] tenancyTenantsCreateCreated %+v", 201, o.Payload) } +func (o *TenancyTenantsCreateCreated) GetPayload() *models.Tenant { + return o.Payload +} + func (o *TenancyTenantsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Tenant) diff --git a/netbox/client/tenancy/tenancy_tenants_delete_parameters.go b/netbox/client/tenancy/tenancy_tenants_delete_parameters.go index 7aca5d734b71cd86f215057baef20915ea915b89..707ba61bbc70e9f7851e8c1284acbaf9eee21dd5 100644 --- a/netbox/client/tenancy/tenancy_tenants_delete_parameters.go +++ b/netbox/client/tenancy/tenancy_tenants_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy diff --git a/netbox/client/tenancy/tenancy_tenants_delete_responses.go b/netbox/client/tenancy/tenancy_tenants_delete_responses.go index 137da5607909aeaeb9326ec44f314a3550855554..7d5f5e8272292095cbd74d55e89d61779f8cb6a2 100644 --- a/netbox/client/tenancy/tenancy_tenants_delete_responses.go +++ b/netbox/client/tenancy/tenancy_tenants_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -35,7 +36,6 @@ type TenancyTenantsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *TenancyTenantsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewTenancyTenantsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/tenancy/tenancy_tenants_list_parameters.go b/netbox/client/tenancy/tenancy_tenants_list_parameters.go index acebf450e1ae4376df01405b9fde2c3635af4ce2..698e41d65906c9ddbbe087783675acf31d73103e 100644 --- a/netbox/client/tenancy/tenancy_tenants_list_parameters.go +++ b/netbox/client/tenancy/tenancy_tenants_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -76,6 +77,12 @@ for the tenancy tenants list operation typically these are written to a http.Req */ type TenancyTenantsListParams struct { + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*Group*/ Group *string /*GroupID*/ @@ -85,6 +92,12 @@ type TenancyTenantsListParams struct { */ IDIn *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. @@ -142,6 +155,39 @@ func (o *TenancyTenantsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithCreated adds the created to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithCreated(created *string) *TenancyTenantsListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithCreatedGte(createdGte *string) *TenancyTenantsListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithCreatedLte(createdLte *string) *TenancyTenantsListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + // WithGroup adds the group to the tenancy tenants list params func (o *TenancyTenantsListParams) WithGroup(group *string) *TenancyTenantsListParams { o.SetGroup(group) @@ -175,6 +221,39 @@ func (o *TenancyTenantsListParams) SetIDIn(iDIn *string) { o.IDIn = iDIn } +// WithLastUpdated adds the lastUpdated to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithLastUpdated(lastUpdated *string) *TenancyTenantsListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *TenancyTenantsListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *TenancyTenantsListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the tenancy tenants list params func (o *TenancyTenantsListParams) WithLimit(limit *int64) *TenancyTenantsListParams { o.SetLimit(limit) @@ -249,6 +328,54 @@ func (o *TenancyTenantsListParams) WriteToRequest(r runtime.ClientRequest, reg s } 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.Group != nil { // query param group @@ -297,6 +424,54 @@ func (o *TenancyTenantsListParams) WriteToRequest(r runtime.ClientRequest, reg s } + 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 diff --git a/netbox/client/tenancy/tenancy_tenants_list_responses.go b/netbox/client/tenancy/tenancy_tenants_list_responses.go index e06e386e8e8799f681ea374e8f186755100c82cc..93b7f8e3ad2b52a42ae1663b2e3d85c946399ad4 100644 --- a/netbox/client/tenancy/tenancy_tenants_list_responses.go +++ b/netbox/client/tenancy/tenancy_tenants_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // TenancyTenantsListReader is a Reader for the TenancyTenantsList structure. @@ -42,7 +43,6 @@ type TenancyTenantsListReader struct { // ReadResponse reads a server response into the received o. func (o *TenancyTenantsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewTenancyTenantsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *TenancyTenantsListOK) Error() string { return fmt.Sprintf("[GET /tenancy/tenants/][%d] tenancyTenantsListOK %+v", 200, o.Payload) } +func (o *TenancyTenantsListOK) GetPayload() *TenancyTenantsListOKBody { + return o.Payload +} + func (o *TenancyTenantsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(TenancyTenantsListOKBody) diff --git a/netbox/client/tenancy/tenancy_tenants_partial_update_parameters.go b/netbox/client/tenancy/tenancy_tenants_partial_update_parameters.go index 1a37a47c91bd587c294922ba83e14b04d69cd725..a0baf37e486a07f0e334e6ed7fd2b2f57d3aa4e9 100644 --- a/netbox/client/tenancy/tenancy_tenants_partial_update_parameters.go +++ b/netbox/client/tenancy/tenancy_tenants_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewTenancyTenantsPartialUpdateParams creates a new TenancyTenantsPartialUpdateParams object diff --git a/netbox/client/tenancy/tenancy_tenants_partial_update_responses.go b/netbox/client/tenancy/tenancy_tenants_partial_update_responses.go index 2320812806d920c4cba6812555bf068579845238..58bd2418d5e5f102a3b39de09454203818c6a206 100644 --- a/netbox/client/tenancy/tenancy_tenants_partial_update_responses.go +++ b/netbox/client/tenancy/tenancy_tenants_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // TenancyTenantsPartialUpdateReader is a Reader for the TenancyTenantsPartialUpdate structure. @@ -38,7 +39,6 @@ type TenancyTenantsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *TenancyTenantsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewTenancyTenantsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *TenancyTenantsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /tenancy/tenants/{id}/][%d] tenancyTenantsPartialUpdateOK %+v", 200, o.Payload) } +func (o *TenancyTenantsPartialUpdateOK) GetPayload() *models.Tenant { + return o.Payload +} + func (o *TenancyTenantsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Tenant) diff --git a/netbox/client/tenancy/tenancy_tenants_read_parameters.go b/netbox/client/tenancy/tenancy_tenants_read_parameters.go index e486d9c49f9fad750687cdd1443a79c90f3d7e08..aa763a6b835dc424e147f3efb21fe951ea042051 100644 --- a/netbox/client/tenancy/tenancy_tenants_read_parameters.go +++ b/netbox/client/tenancy/tenancy_tenants_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy diff --git a/netbox/client/tenancy/tenancy_tenants_read_responses.go b/netbox/client/tenancy/tenancy_tenants_read_responses.go index 13c005e783e19695b8516ec8358b259021907cd2..cb297322755d227409ea36267205ddb2e3c9e17f 100644 --- a/netbox/client/tenancy/tenancy_tenants_read_responses.go +++ b/netbox/client/tenancy/tenancy_tenants_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // TenancyTenantsReadReader is a Reader for the TenancyTenantsRead structure. @@ -38,7 +39,6 @@ type TenancyTenantsReadReader struct { // ReadResponse reads a server response into the received o. func (o *TenancyTenantsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewTenancyTenantsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *TenancyTenantsReadOK) Error() string { return fmt.Sprintf("[GET /tenancy/tenants/{id}/][%d] tenancyTenantsReadOK %+v", 200, o.Payload) } +func (o *TenancyTenantsReadOK) GetPayload() *models.Tenant { + return o.Payload +} + func (o *TenancyTenantsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Tenant) diff --git a/netbox/client/tenancy/tenancy_tenants_update_parameters.go b/netbox/client/tenancy/tenancy_tenants_update_parameters.go index 4ad07ebb6fa50293f767a801a0e6357e22acba81..cf05024b2f0afebbbf17af255fdc652a3e8e93af 100644 --- a/netbox/client/tenancy/tenancy_tenants_update_parameters.go +++ b/netbox/client/tenancy/tenancy_tenants_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewTenancyTenantsUpdateParams creates a new TenancyTenantsUpdateParams object diff --git a/netbox/client/tenancy/tenancy_tenants_update_responses.go b/netbox/client/tenancy/tenancy_tenants_update_responses.go index 359b7bfaa3a86719980e984f057b3712936b61d5..f7a36c0f5a020de842960f8fb49b49cd6d73ecf7 100644 --- a/netbox/client/tenancy/tenancy_tenants_update_responses.go +++ b/netbox/client/tenancy/tenancy_tenants_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package tenancy @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // TenancyTenantsUpdateReader is a Reader for the TenancyTenantsUpdate structure. @@ -38,7 +39,6 @@ type TenancyTenantsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *TenancyTenantsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewTenancyTenantsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *TenancyTenantsUpdateOK) Error() string { return fmt.Sprintf("[PUT /tenancy/tenants/{id}/][%d] tenancyTenantsUpdateOK %+v", 200, o.Payload) } +func (o *TenancyTenantsUpdateOK) GetPayload() *models.Tenant { + return o.Payload +} + func (o *TenancyTenantsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Tenant) diff --git a/netbox/client/virtualization/virtualization_choices_list_parameters.go b/netbox/client/virtualization/virtualization_choices_list_parameters.go index bab362424fb981ca125dc291129f306200c3528d..d1f81a1eaefceba3795a6bb3448fc4267bfbf093 100644 --- a/netbox/client/virtualization/virtualization_choices_list_parameters.go +++ b/netbox/client/virtualization/virtualization_choices_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_choices_list_responses.go b/netbox/client/virtualization/virtualization_choices_list_responses.go index 825915b1b84eb4082337b9818c73fa6e02df79e4..0f42a7884abd0a605110f4b3cb2469b8201ef8e9 100644 --- a/netbox/client/virtualization/virtualization_choices_list_responses.go +++ b/netbox/client/virtualization/virtualization_choices_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -35,7 +36,6 @@ type VirtualizationChoicesListReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationChoicesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/virtualization/virtualization_choices_read_parameters.go b/netbox/client/virtualization/virtualization_choices_read_parameters.go index 4c75336225a10ce33815a5910bbac26ef6dde4b6..78cf3679824775af12405613be5aa9a5e04d0cda 100644 --- a/netbox/client/virtualization/virtualization_choices_read_parameters.go +++ b/netbox/client/virtualization/virtualization_choices_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_choices_read_responses.go b/netbox/client/virtualization/virtualization_choices_read_responses.go index 0b0e1c768f0ee16f4c0d9a773222d6cd1c3fea35..a80e7885c8451b56558d7b1a015f8d21dd4fe9e9 100644 --- a/netbox/client/virtualization/virtualization_choices_read_responses.go +++ b/netbox/client/virtualization/virtualization_choices_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -35,7 +36,6 @@ type VirtualizationChoicesReadReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationChoicesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/virtualization/virtualization_client.go b/netbox/client/virtualization/virtualization_client.go index 4c9d6e63a256f8d2d09a91dc9b413c5600c92d8a..a087ee2af84891b3460ac1a6ae8282a74afd255f 100644 --- a/netbox/client/virtualization/virtualization_client.go +++ b/netbox/client/virtualization/virtualization_client.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -20,13 +21,14 @@ package virtualization // Editing this file might prove futile when you re-run the swagger generate command import ( - "github.com/go-openapi/runtime" + "fmt" - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" ) // New creates a new virtualization API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } @@ -38,8 +40,77 @@ type Client struct { formats strfmt.Registry } +// ClientService is the interface for Client methods +type ClientService interface { + VirtualizationChoicesList(params *VirtualizationChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationChoicesListOK, error) + + VirtualizationChoicesRead(params *VirtualizationChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationChoicesReadOK, error) + + VirtualizationClusterGroupsCreate(params *VirtualizationClusterGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsCreateCreated, error) + + VirtualizationClusterGroupsDelete(params *VirtualizationClusterGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsDeleteNoContent, error) + + VirtualizationClusterGroupsList(params *VirtualizationClusterGroupsListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsListOK, error) + + VirtualizationClusterGroupsPartialUpdate(params *VirtualizationClusterGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsPartialUpdateOK, error) + + VirtualizationClusterGroupsRead(params *VirtualizationClusterGroupsReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsReadOK, error) + + VirtualizationClusterGroupsUpdate(params *VirtualizationClusterGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsUpdateOK, error) + + VirtualizationClusterTypesCreate(params *VirtualizationClusterTypesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesCreateCreated, error) + + VirtualizationClusterTypesDelete(params *VirtualizationClusterTypesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesDeleteNoContent, error) + + VirtualizationClusterTypesList(params *VirtualizationClusterTypesListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesListOK, error) + + VirtualizationClusterTypesPartialUpdate(params *VirtualizationClusterTypesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesPartialUpdateOK, error) + + VirtualizationClusterTypesRead(params *VirtualizationClusterTypesReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesReadOK, error) + + VirtualizationClusterTypesUpdate(params *VirtualizationClusterTypesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesUpdateOK, error) + + VirtualizationClustersCreate(params *VirtualizationClustersCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersCreateCreated, error) + + VirtualizationClustersDelete(params *VirtualizationClustersDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersDeleteNoContent, error) + + VirtualizationClustersList(params *VirtualizationClustersListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersListOK, error) + + VirtualizationClustersPartialUpdate(params *VirtualizationClustersPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersPartialUpdateOK, error) + + VirtualizationClustersRead(params *VirtualizationClustersReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersReadOK, error) + + VirtualizationClustersUpdate(params *VirtualizationClustersUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersUpdateOK, error) + + VirtualizationInterfacesCreate(params *VirtualizationInterfacesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesCreateCreated, error) + + VirtualizationInterfacesDelete(params *VirtualizationInterfacesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesDeleteNoContent, error) + + VirtualizationInterfacesList(params *VirtualizationInterfacesListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesListOK, error) + + VirtualizationInterfacesPartialUpdate(params *VirtualizationInterfacesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesPartialUpdateOK, error) + + VirtualizationInterfacesRead(params *VirtualizationInterfacesReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesReadOK, error) + + VirtualizationInterfacesUpdate(params *VirtualizationInterfacesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesUpdateOK, error) + + VirtualizationVirtualMachinesCreate(params *VirtualizationVirtualMachinesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesCreateCreated, error) + + VirtualizationVirtualMachinesDelete(params *VirtualizationVirtualMachinesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesDeleteNoContent, error) + + VirtualizationVirtualMachinesList(params *VirtualizationVirtualMachinesListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesListOK, error) + + VirtualizationVirtualMachinesPartialUpdate(params *VirtualizationVirtualMachinesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesPartialUpdateOK, error) + + VirtualizationVirtualMachinesRead(params *VirtualizationVirtualMachinesReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesReadOK, error) + + VirtualizationVirtualMachinesUpdate(params *VirtualizationVirtualMachinesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesUpdateOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* -VirtualizationChoicesList virtualization choices list API + VirtualizationChoicesList virtualization choices list API */ func (a *Client) VirtualizationChoicesList(params *VirtualizationChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationChoicesListOK, error) { // TODO: Validate the params before sending @@ -53,7 +124,7 @@ func (a *Client) VirtualizationChoicesList(params *VirtualizationChoicesListPara PathPattern: "/virtualization/_choices/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationChoicesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -63,12 +134,18 @@ func (a *Client) VirtualizationChoicesList(params *VirtualizationChoicesListPara if err != nil { return nil, err } - return result.(*VirtualizationChoicesListOK), nil - + success, ok := result.(*VirtualizationChoicesListOK) + 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 virtualization__choices_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationChoicesRead virtualization choices read API + VirtualizationChoicesRead virtualization choices read API */ func (a *Client) VirtualizationChoicesRead(params *VirtualizationChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationChoicesReadOK, error) { // TODO: Validate the params before sending @@ -82,7 +159,7 @@ func (a *Client) VirtualizationChoicesRead(params *VirtualizationChoicesReadPara PathPattern: "/virtualization/_choices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationChoicesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -92,12 +169,18 @@ func (a *Client) VirtualizationChoicesRead(params *VirtualizationChoicesReadPara if err != nil { return nil, err } - return result.(*VirtualizationChoicesReadOK), nil - + success, ok := result.(*VirtualizationChoicesReadOK) + 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 virtualization__choices_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClusterGroupsCreate virtualization cluster groups create API + VirtualizationClusterGroupsCreate virtualization cluster groups create API */ func (a *Client) VirtualizationClusterGroupsCreate(params *VirtualizationClusterGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsCreateCreated, error) { // TODO: Validate the params before sending @@ -111,7 +194,7 @@ func (a *Client) VirtualizationClusterGroupsCreate(params *VirtualizationCluster PathPattern: "/virtualization/cluster-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -121,12 +204,18 @@ func (a *Client) VirtualizationClusterGroupsCreate(params *VirtualizationCluster if err != nil { return nil, err } - return result.(*VirtualizationClusterGroupsCreateCreated), nil - + success, ok := result.(*VirtualizationClusterGroupsCreateCreated) + 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 virtualization_cluster-groups_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClusterGroupsDelete virtualization cluster groups delete API + VirtualizationClusterGroupsDelete virtualization cluster groups delete API */ func (a *Client) VirtualizationClusterGroupsDelete(params *VirtualizationClusterGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsDeleteNoContent, error) { // TODO: Validate the params before sending @@ -140,7 +229,7 @@ func (a *Client) VirtualizationClusterGroupsDelete(params *VirtualizationCluster PathPattern: "/virtualization/cluster-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -150,12 +239,18 @@ func (a *Client) VirtualizationClusterGroupsDelete(params *VirtualizationCluster if err != nil { return nil, err } - return result.(*VirtualizationClusterGroupsDeleteNoContent), nil - + success, ok := result.(*VirtualizationClusterGroupsDeleteNoContent) + 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 virtualization_cluster-groups_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClusterGroupsList Call to super to allow for caching + VirtualizationClusterGroupsList Call to super to allow for caching */ func (a *Client) VirtualizationClusterGroupsList(params *VirtualizationClusterGroupsListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsListOK, error) { // TODO: Validate the params before sending @@ -169,7 +264,7 @@ func (a *Client) VirtualizationClusterGroupsList(params *VirtualizationClusterGr PathPattern: "/virtualization/cluster-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -179,12 +274,18 @@ func (a *Client) VirtualizationClusterGroupsList(params *VirtualizationClusterGr if err != nil { return nil, err } - return result.(*VirtualizationClusterGroupsListOK), nil - + success, ok := result.(*VirtualizationClusterGroupsListOK) + 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 virtualization_cluster-groups_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClusterGroupsPartialUpdate virtualization cluster groups partial update API + VirtualizationClusterGroupsPartialUpdate virtualization cluster groups partial update API */ func (a *Client) VirtualizationClusterGroupsPartialUpdate(params *VirtualizationClusterGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -198,7 +299,7 @@ func (a *Client) VirtualizationClusterGroupsPartialUpdate(params *Virtualization PathPattern: "/virtualization/cluster-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -208,12 +309,18 @@ func (a *Client) VirtualizationClusterGroupsPartialUpdate(params *Virtualization if err != nil { return nil, err } - return result.(*VirtualizationClusterGroupsPartialUpdateOK), nil - + success, ok := result.(*VirtualizationClusterGroupsPartialUpdateOK) + 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 virtualization_cluster-groups_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClusterGroupsRead Call to super to allow for caching + VirtualizationClusterGroupsRead Call to super to allow for caching */ func (a *Client) VirtualizationClusterGroupsRead(params *VirtualizationClusterGroupsReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsReadOK, error) { // TODO: Validate the params before sending @@ -227,7 +334,7 @@ func (a *Client) VirtualizationClusterGroupsRead(params *VirtualizationClusterGr PathPattern: "/virtualization/cluster-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -237,12 +344,18 @@ func (a *Client) VirtualizationClusterGroupsRead(params *VirtualizationClusterGr if err != nil { return nil, err } - return result.(*VirtualizationClusterGroupsReadOK), nil - + success, ok := result.(*VirtualizationClusterGroupsReadOK) + 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 virtualization_cluster-groups_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClusterGroupsUpdate virtualization cluster groups update API + VirtualizationClusterGroupsUpdate virtualization cluster groups update API */ func (a *Client) VirtualizationClusterGroupsUpdate(params *VirtualizationClusterGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsUpdateOK, error) { // TODO: Validate the params before sending @@ -256,7 +369,7 @@ func (a *Client) VirtualizationClusterGroupsUpdate(params *VirtualizationCluster PathPattern: "/virtualization/cluster-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -266,12 +379,18 @@ func (a *Client) VirtualizationClusterGroupsUpdate(params *VirtualizationCluster if err != nil { return nil, err } - return result.(*VirtualizationClusterGroupsUpdateOK), nil - + success, ok := result.(*VirtualizationClusterGroupsUpdateOK) + 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 virtualization_cluster-groups_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClusterTypesCreate virtualization cluster types create API + VirtualizationClusterTypesCreate virtualization cluster types create API */ func (a *Client) VirtualizationClusterTypesCreate(params *VirtualizationClusterTypesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesCreateCreated, error) { // TODO: Validate the params before sending @@ -285,7 +404,7 @@ func (a *Client) VirtualizationClusterTypesCreate(params *VirtualizationClusterT PathPattern: "/virtualization/cluster-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -295,12 +414,18 @@ func (a *Client) VirtualizationClusterTypesCreate(params *VirtualizationClusterT if err != nil { return nil, err } - return result.(*VirtualizationClusterTypesCreateCreated), nil - + success, ok := result.(*VirtualizationClusterTypesCreateCreated) + 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 virtualization_cluster-types_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClusterTypesDelete virtualization cluster types delete API + VirtualizationClusterTypesDelete virtualization cluster types delete API */ func (a *Client) VirtualizationClusterTypesDelete(params *VirtualizationClusterTypesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -314,7 +439,7 @@ func (a *Client) VirtualizationClusterTypesDelete(params *VirtualizationClusterT PathPattern: "/virtualization/cluster-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -324,12 +449,18 @@ func (a *Client) VirtualizationClusterTypesDelete(params *VirtualizationClusterT if err != nil { return nil, err } - return result.(*VirtualizationClusterTypesDeleteNoContent), nil - + success, ok := result.(*VirtualizationClusterTypesDeleteNoContent) + 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 virtualization_cluster-types_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClusterTypesList Call to super to allow for caching + VirtualizationClusterTypesList Call to super to allow for caching */ func (a *Client) VirtualizationClusterTypesList(params *VirtualizationClusterTypesListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesListOK, error) { // TODO: Validate the params before sending @@ -343,7 +474,7 @@ func (a *Client) VirtualizationClusterTypesList(params *VirtualizationClusterTyp PathPattern: "/virtualization/cluster-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -353,12 +484,18 @@ func (a *Client) VirtualizationClusterTypesList(params *VirtualizationClusterTyp if err != nil { return nil, err } - return result.(*VirtualizationClusterTypesListOK), nil - + success, ok := result.(*VirtualizationClusterTypesListOK) + 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 virtualization_cluster-types_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClusterTypesPartialUpdate virtualization cluster types partial update API + VirtualizationClusterTypesPartialUpdate virtualization cluster types partial update API */ func (a *Client) VirtualizationClusterTypesPartialUpdate(params *VirtualizationClusterTypesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -372,7 +509,7 @@ func (a *Client) VirtualizationClusterTypesPartialUpdate(params *VirtualizationC PathPattern: "/virtualization/cluster-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -382,12 +519,18 @@ func (a *Client) VirtualizationClusterTypesPartialUpdate(params *VirtualizationC if err != nil { return nil, err } - return result.(*VirtualizationClusterTypesPartialUpdateOK), nil - + success, ok := result.(*VirtualizationClusterTypesPartialUpdateOK) + 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 virtualization_cluster-types_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClusterTypesRead Call to super to allow for caching + VirtualizationClusterTypesRead Call to super to allow for caching */ func (a *Client) VirtualizationClusterTypesRead(params *VirtualizationClusterTypesReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesReadOK, error) { // TODO: Validate the params before sending @@ -401,7 +544,7 @@ func (a *Client) VirtualizationClusterTypesRead(params *VirtualizationClusterTyp PathPattern: "/virtualization/cluster-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -411,12 +554,18 @@ func (a *Client) VirtualizationClusterTypesRead(params *VirtualizationClusterTyp if err != nil { return nil, err } - return result.(*VirtualizationClusterTypesReadOK), nil - + success, ok := result.(*VirtualizationClusterTypesReadOK) + 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 virtualization_cluster-types_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClusterTypesUpdate virtualization cluster types update API + VirtualizationClusterTypesUpdate virtualization cluster types update API */ func (a *Client) VirtualizationClusterTypesUpdate(params *VirtualizationClusterTypesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesUpdateOK, error) { // TODO: Validate the params before sending @@ -430,7 +579,7 @@ func (a *Client) VirtualizationClusterTypesUpdate(params *VirtualizationClusterT PathPattern: "/virtualization/cluster-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -440,12 +589,18 @@ func (a *Client) VirtualizationClusterTypesUpdate(params *VirtualizationClusterT if err != nil { return nil, err } - return result.(*VirtualizationClusterTypesUpdateOK), nil - + success, ok := result.(*VirtualizationClusterTypesUpdateOK) + 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 virtualization_cluster-types_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClustersCreate virtualization clusters create API + VirtualizationClustersCreate virtualization clusters create API */ func (a *Client) VirtualizationClustersCreate(params *VirtualizationClustersCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersCreateCreated, error) { // TODO: Validate the params before sending @@ -459,7 +614,7 @@ func (a *Client) VirtualizationClustersCreate(params *VirtualizationClustersCrea PathPattern: "/virtualization/clusters/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -469,12 +624,18 @@ func (a *Client) VirtualizationClustersCreate(params *VirtualizationClustersCrea if err != nil { return nil, err } - return result.(*VirtualizationClustersCreateCreated), nil - + success, ok := result.(*VirtualizationClustersCreateCreated) + 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 virtualization_clusters_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClustersDelete virtualization clusters delete API + VirtualizationClustersDelete virtualization clusters delete API */ func (a *Client) VirtualizationClustersDelete(params *VirtualizationClustersDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersDeleteNoContent, error) { // TODO: Validate the params before sending @@ -488,7 +649,7 @@ func (a *Client) VirtualizationClustersDelete(params *VirtualizationClustersDele PathPattern: "/virtualization/clusters/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -498,12 +659,18 @@ func (a *Client) VirtualizationClustersDelete(params *VirtualizationClustersDele if err != nil { return nil, err } - return result.(*VirtualizationClustersDeleteNoContent), nil - + success, ok := result.(*VirtualizationClustersDeleteNoContent) + 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 virtualization_clusters_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClustersList Call to super to allow for caching + VirtualizationClustersList Call to super to allow for caching */ func (a *Client) VirtualizationClustersList(params *VirtualizationClustersListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersListOK, error) { // TODO: Validate the params before sending @@ -517,7 +684,7 @@ func (a *Client) VirtualizationClustersList(params *VirtualizationClustersListPa PathPattern: "/virtualization/clusters/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersListReader{formats: a.formats}, AuthInfo: authInfo, @@ -527,12 +694,18 @@ func (a *Client) VirtualizationClustersList(params *VirtualizationClustersListPa if err != nil { return nil, err } - return result.(*VirtualizationClustersListOK), nil - + success, ok := result.(*VirtualizationClustersListOK) + 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 virtualization_clusters_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClustersPartialUpdate virtualization clusters partial update API + VirtualizationClustersPartialUpdate virtualization clusters partial update API */ func (a *Client) VirtualizationClustersPartialUpdate(params *VirtualizationClustersPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -546,7 +719,7 @@ func (a *Client) VirtualizationClustersPartialUpdate(params *VirtualizationClust PathPattern: "/virtualization/clusters/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -556,12 +729,18 @@ func (a *Client) VirtualizationClustersPartialUpdate(params *VirtualizationClust if err != nil { return nil, err } - return result.(*VirtualizationClustersPartialUpdateOK), nil - + success, ok := result.(*VirtualizationClustersPartialUpdateOK) + 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 virtualization_clusters_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClustersRead Call to super to allow for caching + VirtualizationClustersRead Call to super to allow for caching */ func (a *Client) VirtualizationClustersRead(params *VirtualizationClustersReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersReadOK, error) { // TODO: Validate the params before sending @@ -575,7 +754,7 @@ func (a *Client) VirtualizationClustersRead(params *VirtualizationClustersReadPa PathPattern: "/virtualization/clusters/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -585,12 +764,18 @@ func (a *Client) VirtualizationClustersRead(params *VirtualizationClustersReadPa if err != nil { return nil, err } - return result.(*VirtualizationClustersReadOK), nil - + success, ok := result.(*VirtualizationClustersReadOK) + 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 virtualization_clusters_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationClustersUpdate virtualization clusters update API + VirtualizationClustersUpdate virtualization clusters update API */ func (a *Client) VirtualizationClustersUpdate(params *VirtualizationClustersUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersUpdateOK, error) { // TODO: Validate the params before sending @@ -604,7 +789,7 @@ func (a *Client) VirtualizationClustersUpdate(params *VirtualizationClustersUpda PathPattern: "/virtualization/clusters/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -614,12 +799,18 @@ func (a *Client) VirtualizationClustersUpdate(params *VirtualizationClustersUpda if err != nil { return nil, err } - return result.(*VirtualizationClustersUpdateOK), nil - + success, ok := result.(*VirtualizationClustersUpdateOK) + 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 virtualization_clusters_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationInterfacesCreate virtualization interfaces create API + VirtualizationInterfacesCreate virtualization interfaces create API */ func (a *Client) VirtualizationInterfacesCreate(params *VirtualizationInterfacesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesCreateCreated, error) { // TODO: Validate the params before sending @@ -633,7 +824,7 @@ func (a *Client) VirtualizationInterfacesCreate(params *VirtualizationInterfaces PathPattern: "/virtualization/interfaces/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -643,12 +834,18 @@ func (a *Client) VirtualizationInterfacesCreate(params *VirtualizationInterfaces if err != nil { return nil, err } - return result.(*VirtualizationInterfacesCreateCreated), nil - + success, ok := result.(*VirtualizationInterfacesCreateCreated) + 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 virtualization_interfaces_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationInterfacesDelete virtualization interfaces delete API + VirtualizationInterfacesDelete virtualization interfaces delete API */ func (a *Client) VirtualizationInterfacesDelete(params *VirtualizationInterfacesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -662,7 +859,7 @@ func (a *Client) VirtualizationInterfacesDelete(params *VirtualizationInterfaces PathPattern: "/virtualization/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -672,12 +869,18 @@ func (a *Client) VirtualizationInterfacesDelete(params *VirtualizationInterfaces if err != nil { return nil, err } - return result.(*VirtualizationInterfacesDeleteNoContent), nil - + success, ok := result.(*VirtualizationInterfacesDeleteNoContent) + 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 virtualization_interfaces_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationInterfacesList Call to super to allow for caching + VirtualizationInterfacesList Call to super to allow for caching */ func (a *Client) VirtualizationInterfacesList(params *VirtualizationInterfacesListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesListOK, error) { // TODO: Validate the params before sending @@ -691,7 +894,7 @@ func (a *Client) VirtualizationInterfacesList(params *VirtualizationInterfacesLi PathPattern: "/virtualization/interfaces/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -701,12 +904,18 @@ func (a *Client) VirtualizationInterfacesList(params *VirtualizationInterfacesLi if err != nil { return nil, err } - return result.(*VirtualizationInterfacesListOK), nil - + success, ok := result.(*VirtualizationInterfacesListOK) + 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 virtualization_interfaces_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationInterfacesPartialUpdate virtualization interfaces partial update API + VirtualizationInterfacesPartialUpdate virtualization interfaces partial update API */ func (a *Client) VirtualizationInterfacesPartialUpdate(params *VirtualizationInterfacesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -720,7 +929,7 @@ func (a *Client) VirtualizationInterfacesPartialUpdate(params *VirtualizationInt PathPattern: "/virtualization/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -730,12 +939,18 @@ func (a *Client) VirtualizationInterfacesPartialUpdate(params *VirtualizationInt if err != nil { return nil, err } - return result.(*VirtualizationInterfacesPartialUpdateOK), nil - + success, ok := result.(*VirtualizationInterfacesPartialUpdateOK) + 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 virtualization_interfaces_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationInterfacesRead Call to super to allow for caching + VirtualizationInterfacesRead Call to super to allow for caching */ func (a *Client) VirtualizationInterfacesRead(params *VirtualizationInterfacesReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesReadOK, error) { // TODO: Validate the params before sending @@ -749,7 +964,7 @@ func (a *Client) VirtualizationInterfacesRead(params *VirtualizationInterfacesRe PathPattern: "/virtualization/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -759,12 +974,18 @@ func (a *Client) VirtualizationInterfacesRead(params *VirtualizationInterfacesRe if err != nil { return nil, err } - return result.(*VirtualizationInterfacesReadOK), nil - + success, ok := result.(*VirtualizationInterfacesReadOK) + 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 virtualization_interfaces_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationInterfacesUpdate virtualization interfaces update API + VirtualizationInterfacesUpdate virtualization interfaces update API */ func (a *Client) VirtualizationInterfacesUpdate(params *VirtualizationInterfacesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesUpdateOK, error) { // TODO: Validate the params before sending @@ -778,7 +999,7 @@ func (a *Client) VirtualizationInterfacesUpdate(params *VirtualizationInterfaces PathPattern: "/virtualization/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -788,12 +1009,18 @@ func (a *Client) VirtualizationInterfacesUpdate(params *VirtualizationInterfaces if err != nil { return nil, err } - return result.(*VirtualizationInterfacesUpdateOK), nil - + success, ok := result.(*VirtualizationInterfacesUpdateOK) + 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 virtualization_interfaces_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationVirtualMachinesCreate virtualization virtual machines create API + VirtualizationVirtualMachinesCreate virtualization virtual machines create API */ func (a *Client) VirtualizationVirtualMachinesCreate(params *VirtualizationVirtualMachinesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesCreateCreated, error) { // TODO: Validate the params before sending @@ -807,7 +1034,7 @@ func (a *Client) VirtualizationVirtualMachinesCreate(params *VirtualizationVirtu PathPattern: "/virtualization/virtual-machines/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -817,12 +1044,18 @@ func (a *Client) VirtualizationVirtualMachinesCreate(params *VirtualizationVirtu if err != nil { return nil, err } - return result.(*VirtualizationVirtualMachinesCreateCreated), nil - + success, ok := result.(*VirtualizationVirtualMachinesCreateCreated) + 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 virtualization_virtual-machines_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationVirtualMachinesDelete virtualization virtual machines delete API + VirtualizationVirtualMachinesDelete virtualization virtual machines delete API */ func (a *Client) VirtualizationVirtualMachinesDelete(params *VirtualizationVirtualMachinesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesDeleteNoContent, error) { // TODO: Validate the params before sending @@ -836,7 +1069,7 @@ func (a *Client) VirtualizationVirtualMachinesDelete(params *VirtualizationVirtu PathPattern: "/virtualization/virtual-machines/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -846,12 +1079,18 @@ func (a *Client) VirtualizationVirtualMachinesDelete(params *VirtualizationVirtu if err != nil { return nil, err } - return result.(*VirtualizationVirtualMachinesDeleteNoContent), nil - + success, ok := result.(*VirtualizationVirtualMachinesDeleteNoContent) + 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 virtualization_virtual-machines_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationVirtualMachinesList Call to super to allow for caching + VirtualizationVirtualMachinesList Call to super to allow for caching */ func (a *Client) VirtualizationVirtualMachinesList(params *VirtualizationVirtualMachinesListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesListOK, error) { // TODO: Validate the params before sending @@ -865,7 +1104,7 @@ func (a *Client) VirtualizationVirtualMachinesList(params *VirtualizationVirtual PathPattern: "/virtualization/virtual-machines/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -875,12 +1114,18 @@ func (a *Client) VirtualizationVirtualMachinesList(params *VirtualizationVirtual if err != nil { return nil, err } - return result.(*VirtualizationVirtualMachinesListOK), nil - + success, ok := result.(*VirtualizationVirtualMachinesListOK) + 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 virtualization_virtual-machines_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationVirtualMachinesPartialUpdate virtualization virtual machines partial update API + VirtualizationVirtualMachinesPartialUpdate virtualization virtual machines partial update API */ func (a *Client) VirtualizationVirtualMachinesPartialUpdate(params *VirtualizationVirtualMachinesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesPartialUpdateOK, error) { // TODO: Validate the params before sending @@ -894,7 +1139,7 @@ func (a *Client) VirtualizationVirtualMachinesPartialUpdate(params *Virtualizati PathPattern: "/virtualization/virtual-machines/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -904,12 +1149,18 @@ func (a *Client) VirtualizationVirtualMachinesPartialUpdate(params *Virtualizati if err != nil { return nil, err } - return result.(*VirtualizationVirtualMachinesPartialUpdateOK), nil - + success, ok := result.(*VirtualizationVirtualMachinesPartialUpdateOK) + 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 virtualization_virtual-machines_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationVirtualMachinesRead Call to super to allow for caching + VirtualizationVirtualMachinesRead Call to super to allow for caching */ func (a *Client) VirtualizationVirtualMachinesRead(params *VirtualizationVirtualMachinesReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesReadOK, error) { // TODO: Validate the params before sending @@ -923,7 +1174,7 @@ func (a *Client) VirtualizationVirtualMachinesRead(params *VirtualizationVirtual PathPattern: "/virtualization/virtual-machines/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -933,12 +1184,18 @@ func (a *Client) VirtualizationVirtualMachinesRead(params *VirtualizationVirtual if err != nil { return nil, err } - return result.(*VirtualizationVirtualMachinesReadOK), nil - + success, ok := result.(*VirtualizationVirtualMachinesReadOK) + 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 virtualization_virtual-machines_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* -VirtualizationVirtualMachinesUpdate virtualization virtual machines update API + VirtualizationVirtualMachinesUpdate virtualization virtual machines update API */ func (a *Client) VirtualizationVirtualMachinesUpdate(params *VirtualizationVirtualMachinesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesUpdateOK, error) { // TODO: Validate the params before sending @@ -952,7 +1209,7 @@ func (a *Client) VirtualizationVirtualMachinesUpdate(params *VirtualizationVirtu PathPattern: "/virtualization/virtual-machines/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -962,8 +1219,14 @@ func (a *Client) VirtualizationVirtualMachinesUpdate(params *VirtualizationVirtu if err != nil { return nil, err } - return result.(*VirtualizationVirtualMachinesUpdateOK), nil - + success, ok := result.(*VirtualizationVirtualMachinesUpdateOK) + 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 virtualization_virtual-machines_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 diff --git a/netbox/client/virtualization/virtualization_cluster_groups_create_parameters.go b/netbox/client/virtualization/virtualization_cluster_groups_create_parameters.go index 29ac3af66a7ab20d454f4010cc498b30df6aa61f..54752c8d5c3fcfed9bb059c41e43ba7d725e8de1 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_create_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationClusterGroupsCreateParams creates a new VirtualizationClusterGroupsCreateParams object diff --git a/netbox/client/virtualization/virtualization_cluster_groups_create_responses.go b/netbox/client/virtualization/virtualization_cluster_groups_create_responses.go index d8bf6babdb8f0b3fd638dc86d1f8d863131dfe05..16352c4177e1671f455de505a6b943b6814e94ac 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_create_responses.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClusterGroupsCreateReader is a Reader for the VirtualizationClusterGroupsCreate structure. @@ -38,7 +39,6 @@ type VirtualizationClusterGroupsCreateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClusterGroupsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewVirtualizationClusterGroupsCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationClusterGroupsCreateCreated) Error() string { return fmt.Sprintf("[POST /virtualization/cluster-groups/][%d] virtualizationClusterGroupsCreateCreated %+v", 201, o.Payload) } +func (o *VirtualizationClusterGroupsCreateCreated) GetPayload() *models.ClusterGroup { + return o.Payload +} + func (o *VirtualizationClusterGroupsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ClusterGroup) diff --git a/netbox/client/virtualization/virtualization_cluster_groups_delete_parameters.go b/netbox/client/virtualization/virtualization_cluster_groups_delete_parameters.go index 70d8dfc603ce2c8b1b7ea2be30de41e7c32e8f04..cbe7858f002e9939b9ba0f527afde3e2a1a782e6 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_delete_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_cluster_groups_delete_responses.go b/netbox/client/virtualization/virtualization_cluster_groups_delete_responses.go index f69297593368559b58bc594b4964713e2857c8bf..5cddf33b32ecb3a1f3d2bae8d2029c5007c7f2b3 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_delete_responses.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -35,7 +36,6 @@ type VirtualizationClusterGroupsDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClusterGroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewVirtualizationClusterGroupsDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go b/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go index 80c32cf117897d88f63f45572e270d012ee84038..f241e176af9e7cf52c5ffeb03124067f0f85cbe0 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_cluster_groups_list_responses.go b/netbox/client/virtualization/virtualization_cluster_groups_list_responses.go index a8e76438537784cd655f82cb06836a6d03d03d20..458672b44ad19f85fdbab845f50131a31f1be4e3 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_list_responses.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClusterGroupsListReader is a Reader for the VirtualizationClusterGroupsList structure. @@ -42,7 +43,6 @@ type VirtualizationClusterGroupsListReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClusterGroupsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationClusterGroupsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *VirtualizationClusterGroupsListOK) Error() string { return fmt.Sprintf("[GET /virtualization/cluster-groups/][%d] virtualizationClusterGroupsListOK %+v", 200, o.Payload) } +func (o *VirtualizationClusterGroupsListOK) GetPayload() *VirtualizationClusterGroupsListOKBody { + return o.Payload +} + func (o *VirtualizationClusterGroupsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(VirtualizationClusterGroupsListOKBody) diff --git a/netbox/client/virtualization/virtualization_cluster_groups_partial_update_parameters.go b/netbox/client/virtualization/virtualization_cluster_groups_partial_update_parameters.go index 8b6a6622bea4772129c2afce52718235661ec70e..2244767be048334fb1bafcb4891f7bb8d2e67229 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_partial_update_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationClusterGroupsPartialUpdateParams creates a new VirtualizationClusterGroupsPartialUpdateParams object diff --git a/netbox/client/virtualization/virtualization_cluster_groups_partial_update_responses.go b/netbox/client/virtualization/virtualization_cluster_groups_partial_update_responses.go index 4a2110c544cdc57d28a33a32ebd95ce8761fd362..e030943ac13dc86ced287e403b3ca34cbb5f1bb6 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_partial_update_responses.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClusterGroupsPartialUpdateReader is a Reader for the VirtualizationClusterGroupsPartialUpdate structure. @@ -38,7 +39,6 @@ type VirtualizationClusterGroupsPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClusterGroupsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationClusterGroupsPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationClusterGroupsPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /virtualization/cluster-groups/{id}/][%d] virtualizationClusterGroupsPartialUpdateOK %+v", 200, o.Payload) } +func (o *VirtualizationClusterGroupsPartialUpdateOK) GetPayload() *models.ClusterGroup { + return o.Payload +} + func (o *VirtualizationClusterGroupsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ClusterGroup) diff --git a/netbox/client/virtualization/virtualization_cluster_groups_read_parameters.go b/netbox/client/virtualization/virtualization_cluster_groups_read_parameters.go index 00d3f5b1c8e42c6002fc61b1a61137fdde832f12..aa6e15e3f9a62c8dca88d7a7e2d95330b5f1854c 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_read_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_cluster_groups_read_responses.go b/netbox/client/virtualization/virtualization_cluster_groups_read_responses.go index f47380a4026b5177c60222fba03cebe66c4dfa0a..9334440fb4f63eead7db10127b32b1b3990b1724 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_read_responses.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClusterGroupsReadReader is a Reader for the VirtualizationClusterGroupsRead structure. @@ -38,7 +39,6 @@ type VirtualizationClusterGroupsReadReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClusterGroupsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationClusterGroupsReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationClusterGroupsReadOK) Error() string { return fmt.Sprintf("[GET /virtualization/cluster-groups/{id}/][%d] virtualizationClusterGroupsReadOK %+v", 200, o.Payload) } +func (o *VirtualizationClusterGroupsReadOK) GetPayload() *models.ClusterGroup { + return o.Payload +} + func (o *VirtualizationClusterGroupsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ClusterGroup) diff --git a/netbox/client/virtualization/virtualization_cluster_groups_update_parameters.go b/netbox/client/virtualization/virtualization_cluster_groups_update_parameters.go index e965b40ef242dfaf7efdbf83f82141e55e94ef9f..c6dfda8f7b5923586fa1764e89dc60116a93cfe8 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_update_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationClusterGroupsUpdateParams creates a new VirtualizationClusterGroupsUpdateParams object diff --git a/netbox/client/virtualization/virtualization_cluster_groups_update_responses.go b/netbox/client/virtualization/virtualization_cluster_groups_update_responses.go index b2354011b0add0d6252acac788ec60fc481de171..623bf5fcf86dcfaaa24fb8927c0869a9faacb45c 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_update_responses.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClusterGroupsUpdateReader is a Reader for the VirtualizationClusterGroupsUpdate structure. @@ -38,7 +39,6 @@ type VirtualizationClusterGroupsUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClusterGroupsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationClusterGroupsUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationClusterGroupsUpdateOK) Error() string { return fmt.Sprintf("[PUT /virtualization/cluster-groups/{id}/][%d] virtualizationClusterGroupsUpdateOK %+v", 200, o.Payload) } +func (o *VirtualizationClusterGroupsUpdateOK) GetPayload() *models.ClusterGroup { + return o.Payload +} + func (o *VirtualizationClusterGroupsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ClusterGroup) diff --git a/netbox/client/virtualization/virtualization_cluster_types_create_parameters.go b/netbox/client/virtualization/virtualization_cluster_types_create_parameters.go index 6415568bb7dba14931c65c95232d0968d31b5bc0..fc35426ca1da59e9239e2fdfa6d7680e874120d4 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_create_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_types_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationClusterTypesCreateParams creates a new VirtualizationClusterTypesCreateParams object diff --git a/netbox/client/virtualization/virtualization_cluster_types_create_responses.go b/netbox/client/virtualization/virtualization_cluster_types_create_responses.go index 1b4adcec1b1c0a9845080187b0e375ce4d3fcc5e..579a471d337b81bfdc74572a9dcf88be23e573cf 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_create_responses.go +++ b/netbox/client/virtualization/virtualization_cluster_types_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClusterTypesCreateReader is a Reader for the VirtualizationClusterTypesCreate structure. @@ -38,7 +39,6 @@ type VirtualizationClusterTypesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClusterTypesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewVirtualizationClusterTypesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationClusterTypesCreateCreated) Error() string { return fmt.Sprintf("[POST /virtualization/cluster-types/][%d] virtualizationClusterTypesCreateCreated %+v", 201, o.Payload) } +func (o *VirtualizationClusterTypesCreateCreated) GetPayload() *models.ClusterType { + return o.Payload +} + func (o *VirtualizationClusterTypesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ClusterType) diff --git a/netbox/client/virtualization/virtualization_cluster_types_delete_parameters.go b/netbox/client/virtualization/virtualization_cluster_types_delete_parameters.go index 4712601f74fa86437440b34c18c13c7ee0a47d97..79ea48e623b5c8e31fb8a36b2943d5922e280079 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_delete_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_types_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_cluster_types_delete_responses.go b/netbox/client/virtualization/virtualization_cluster_types_delete_responses.go index 521bbdc9ab46e7f283d5501cc51a2c62a8a85a11..abcbafeac654b7b5ec8ccfcf5920493bd861611b 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_delete_responses.go +++ b/netbox/client/virtualization/virtualization_cluster_types_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -35,7 +36,6 @@ type VirtualizationClusterTypesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClusterTypesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewVirtualizationClusterTypesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go b/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go index 3ab6b43307f20dcec58b4dbbb6366ce3f33270a1..045e71d4a4863055b007c1dc5d5ac412019aa323 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_cluster_types_list_responses.go b/netbox/client/virtualization/virtualization_cluster_types_list_responses.go index 361acb140b138db09196fe8db4ba46bfc689775e..38c005c5b8918d1c4d516855b0795549e3b5d125 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_list_responses.go +++ b/netbox/client/virtualization/virtualization_cluster_types_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClusterTypesListReader is a Reader for the VirtualizationClusterTypesList structure. @@ -42,7 +43,6 @@ type VirtualizationClusterTypesListReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClusterTypesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationClusterTypesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *VirtualizationClusterTypesListOK) Error() string { return fmt.Sprintf("[GET /virtualization/cluster-types/][%d] virtualizationClusterTypesListOK %+v", 200, o.Payload) } +func (o *VirtualizationClusterTypesListOK) GetPayload() *VirtualizationClusterTypesListOKBody { + return o.Payload +} + func (o *VirtualizationClusterTypesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(VirtualizationClusterTypesListOKBody) diff --git a/netbox/client/virtualization/virtualization_cluster_types_partial_update_parameters.go b/netbox/client/virtualization/virtualization_cluster_types_partial_update_parameters.go index b118c4bc158003c9fb9f8a5a140f31e5b9415785..451270d4fe95a83f90d388919d57faf8b517b8ae 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_partial_update_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_types_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationClusterTypesPartialUpdateParams creates a new VirtualizationClusterTypesPartialUpdateParams object diff --git a/netbox/client/virtualization/virtualization_cluster_types_partial_update_responses.go b/netbox/client/virtualization/virtualization_cluster_types_partial_update_responses.go index d4b8781461aadd27334ccffeb8b39bd792b0c846..9c15b7eb2a8e484d2c664de6f077c2d018527b69 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_partial_update_responses.go +++ b/netbox/client/virtualization/virtualization_cluster_types_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClusterTypesPartialUpdateReader is a Reader for the VirtualizationClusterTypesPartialUpdate structure. @@ -38,7 +39,6 @@ type VirtualizationClusterTypesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClusterTypesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationClusterTypesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationClusterTypesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /virtualization/cluster-types/{id}/][%d] virtualizationClusterTypesPartialUpdateOK %+v", 200, o.Payload) } +func (o *VirtualizationClusterTypesPartialUpdateOK) GetPayload() *models.ClusterType { + return o.Payload +} + func (o *VirtualizationClusterTypesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ClusterType) diff --git a/netbox/client/virtualization/virtualization_cluster_types_read_parameters.go b/netbox/client/virtualization/virtualization_cluster_types_read_parameters.go index 8033b3fe1039b2137605f5ab9d6d379deef0e92f..89c45e9e072d2772464315ab683a072026a65ae8 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_read_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_types_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_cluster_types_read_responses.go b/netbox/client/virtualization/virtualization_cluster_types_read_responses.go index 82fd9bb60242df2d65ea00a198c68f2ed6b72583..b4b6812a6c6ba59984b8486ac66ec31ef55c2308 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_read_responses.go +++ b/netbox/client/virtualization/virtualization_cluster_types_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClusterTypesReadReader is a Reader for the VirtualizationClusterTypesRead structure. @@ -38,7 +39,6 @@ type VirtualizationClusterTypesReadReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClusterTypesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationClusterTypesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationClusterTypesReadOK) Error() string { return fmt.Sprintf("[GET /virtualization/cluster-types/{id}/][%d] virtualizationClusterTypesReadOK %+v", 200, o.Payload) } +func (o *VirtualizationClusterTypesReadOK) GetPayload() *models.ClusterType { + return o.Payload +} + func (o *VirtualizationClusterTypesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ClusterType) diff --git a/netbox/client/virtualization/virtualization_cluster_types_update_parameters.go b/netbox/client/virtualization/virtualization_cluster_types_update_parameters.go index c225f31c563f1858600d37c3acebfa351bbd05b7..587362905fee269177222ba15b206c58f8ad99f6 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_update_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_types_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationClusterTypesUpdateParams creates a new VirtualizationClusterTypesUpdateParams object diff --git a/netbox/client/virtualization/virtualization_cluster_types_update_responses.go b/netbox/client/virtualization/virtualization_cluster_types_update_responses.go index 35b29493ed41849b5cfb1d084255708ee80572bc..d2bb2b3c685cefd54e93d1ae553758a422fac4d0 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_update_responses.go +++ b/netbox/client/virtualization/virtualization_cluster_types_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClusterTypesUpdateReader is a Reader for the VirtualizationClusterTypesUpdate structure. @@ -38,7 +39,6 @@ type VirtualizationClusterTypesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClusterTypesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationClusterTypesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationClusterTypesUpdateOK) Error() string { return fmt.Sprintf("[PUT /virtualization/cluster-types/{id}/][%d] virtualizationClusterTypesUpdateOK %+v", 200, o.Payload) } +func (o *VirtualizationClusterTypesUpdateOK) GetPayload() *models.ClusterType { + return o.Payload +} + func (o *VirtualizationClusterTypesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ClusterType) diff --git a/netbox/client/virtualization/virtualization_clusters_create_parameters.go b/netbox/client/virtualization/virtualization_clusters_create_parameters.go index d217f790aa458db449f812e8348358134b7fde1d..8ff01084fbf20454c84ef10bbdf5e74f1f1309a6 100644 --- a/netbox/client/virtualization/virtualization_clusters_create_parameters.go +++ b/netbox/client/virtualization/virtualization_clusters_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationClustersCreateParams creates a new VirtualizationClustersCreateParams object diff --git a/netbox/client/virtualization/virtualization_clusters_create_responses.go b/netbox/client/virtualization/virtualization_clusters_create_responses.go index 266ebe714338513d832d0b427851f94d5e2db698..856f4dffb6a7b7e4537a86ae6bd35b210ce2c123 100644 --- a/netbox/client/virtualization/virtualization_clusters_create_responses.go +++ b/netbox/client/virtualization/virtualization_clusters_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClustersCreateReader is a Reader for the VirtualizationClustersCreate structure. @@ -38,7 +39,6 @@ type VirtualizationClustersCreateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClustersCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewVirtualizationClustersCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationClustersCreateCreated) Error() string { return fmt.Sprintf("[POST /virtualization/clusters/][%d] virtualizationClustersCreateCreated %+v", 201, o.Payload) } +func (o *VirtualizationClustersCreateCreated) GetPayload() *models.Cluster { + return o.Payload +} + func (o *VirtualizationClustersCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Cluster) diff --git a/netbox/client/virtualization/virtualization_clusters_delete_parameters.go b/netbox/client/virtualization/virtualization_clusters_delete_parameters.go index f3893ee268c213a217fc81f68f36a43d4e9d65e8..722848504d0f49c9847487a0cc5df0e9ba29381f 100644 --- a/netbox/client/virtualization/virtualization_clusters_delete_parameters.go +++ b/netbox/client/virtualization/virtualization_clusters_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_clusters_delete_responses.go b/netbox/client/virtualization/virtualization_clusters_delete_responses.go index 1725e2ebd12c6ce4be8f136b6a706ec0fedf529b..32acee1adf5151ea894dc9fcc78fac28b0355129 100644 --- a/netbox/client/virtualization/virtualization_clusters_delete_responses.go +++ b/netbox/client/virtualization/virtualization_clusters_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -35,7 +36,6 @@ type VirtualizationClustersDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClustersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewVirtualizationClustersDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/virtualization/virtualization_clusters_list_parameters.go b/netbox/client/virtualization/virtualization_clusters_list_parameters.go index 6ec75e20027414f647a09468e666ca3a67f6d979..ac4edad957396dcc3345b80153a817f358deb352 100644 --- a/netbox/client/virtualization/virtualization_clusters_list_parameters.go +++ b/netbox/client/virtualization/virtualization_clusters_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -76,6 +77,12 @@ for the virtualization clusters list operation typically these are written to a */ type VirtualizationClustersListParams struct { + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*Group*/ Group *string /*GroupID*/ @@ -85,6 +92,12 @@ type VirtualizationClustersListParams struct { */ IDIn *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. @@ -99,12 +112,18 @@ type VirtualizationClustersListParams struct { Offset *int64 /*Q*/ Q *string + /*Region*/ + Region *string + /*RegionID*/ + RegionID *string /*Site*/ Site *string /*SiteID*/ SiteID *string /*Tag*/ Tag *string + /*Tenant*/ + Tenant *string /*Type*/ Type *string /*TypeID*/ @@ -148,6 +167,39 @@ func (o *VirtualizationClustersListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithCreated adds the created to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithCreated(created *string) *VirtualizationClustersListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithCreatedGte(createdGte *string) *VirtualizationClustersListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithCreatedLte(createdLte *string) *VirtualizationClustersListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + // WithGroup adds the group to the virtualization clusters list params func (o *VirtualizationClustersListParams) WithGroup(group *string) *VirtualizationClustersListParams { o.SetGroup(group) @@ -181,6 +233,39 @@ func (o *VirtualizationClustersListParams) SetIDIn(iDIn *string) { o.IDIn = iDIn } +// WithLastUpdated adds the lastUpdated to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithLastUpdated(lastUpdated *string) *VirtualizationClustersListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithLastUpdatedGte(lastUpdatedGte *string) *VirtualizationClustersListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithLastUpdatedLte(lastUpdatedLte *string) *VirtualizationClustersListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the virtualization clusters list params func (o *VirtualizationClustersListParams) WithLimit(limit *int64) *VirtualizationClustersListParams { o.SetLimit(limit) @@ -225,6 +310,28 @@ func (o *VirtualizationClustersListParams) SetQ(q *string) { o.Q = q } +// WithRegion adds the region to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithRegion(region *string) *VirtualizationClustersListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithRegionID(regionID *string) *VirtualizationClustersListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + // WithSite adds the site to the virtualization clusters list params func (o *VirtualizationClustersListParams) WithSite(site *string) *VirtualizationClustersListParams { o.SetSite(site) @@ -258,6 +365,17 @@ func (o *VirtualizationClustersListParams) SetTag(tag *string) { o.Tag = tag } +// WithTenant adds the tenant to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithTenant(tenant *string) *VirtualizationClustersListParams { + o.SetTenant(tenant) + return o +} + +// SetTenant adds the tenant to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetTenant(tenant *string) { + o.Tenant = tenant +} + // WithType adds the typeVar to the virtualization clusters list params func (o *VirtualizationClustersListParams) WithType(typeVar *string) *VirtualizationClustersListParams { o.SetType(typeVar) @@ -288,6 +406,54 @@ func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientReques } 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.Group != nil { // query param group @@ -336,6 +502,54 @@ func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientReques } + 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 @@ -400,6 +614,38 @@ func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientReques } + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + + } + if o.Site != nil { // query param site @@ -448,6 +694,22 @@ func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientReques } + 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.Type != nil { // query param type diff --git a/netbox/client/virtualization/virtualization_clusters_list_responses.go b/netbox/client/virtualization/virtualization_clusters_list_responses.go index 2f9fe266c5a8d91ff2d7a4acc7cbdd3da8930429..180c7ad53c5272d2bfdae5dffb4aa6b034cece19 100644 --- a/netbox/client/virtualization/virtualization_clusters_list_responses.go +++ b/netbox/client/virtualization/virtualization_clusters_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClustersListReader is a Reader for the VirtualizationClustersList structure. @@ -42,7 +43,6 @@ type VirtualizationClustersListReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClustersListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationClustersListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *VirtualizationClustersListOK) Error() string { return fmt.Sprintf("[GET /virtualization/clusters/][%d] virtualizationClustersListOK %+v", 200, o.Payload) } +func (o *VirtualizationClustersListOK) GetPayload() *VirtualizationClustersListOKBody { + return o.Payload +} + func (o *VirtualizationClustersListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(VirtualizationClustersListOKBody) diff --git a/netbox/client/virtualization/virtualization_clusters_partial_update_parameters.go b/netbox/client/virtualization/virtualization_clusters_partial_update_parameters.go index 324fcfe0a6f5c24d678cd872eba18bcf94fb349e..04fe03f5cef04cbcd0474108284eb3d710f1c298 100644 --- a/netbox/client/virtualization/virtualization_clusters_partial_update_parameters.go +++ b/netbox/client/virtualization/virtualization_clusters_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationClustersPartialUpdateParams creates a new VirtualizationClustersPartialUpdateParams object diff --git a/netbox/client/virtualization/virtualization_clusters_partial_update_responses.go b/netbox/client/virtualization/virtualization_clusters_partial_update_responses.go index ef0731fc79253fa7854a1ca3ba325a9657e05b1a..a13b26ec921022212602a925563569f1aed65fb0 100644 --- a/netbox/client/virtualization/virtualization_clusters_partial_update_responses.go +++ b/netbox/client/virtualization/virtualization_clusters_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClustersPartialUpdateReader is a Reader for the VirtualizationClustersPartialUpdate structure. @@ -38,7 +39,6 @@ type VirtualizationClustersPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClustersPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationClustersPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationClustersPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /virtualization/clusters/{id}/][%d] virtualizationClustersPartialUpdateOK %+v", 200, o.Payload) } +func (o *VirtualizationClustersPartialUpdateOK) GetPayload() *models.Cluster { + return o.Payload +} + func (o *VirtualizationClustersPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Cluster) diff --git a/netbox/client/virtualization/virtualization_clusters_read_parameters.go b/netbox/client/virtualization/virtualization_clusters_read_parameters.go index 013856cac85c6003128940eb44497796924f0652..dd361531798104bad2640626299413fe720c7178 100644 --- a/netbox/client/virtualization/virtualization_clusters_read_parameters.go +++ b/netbox/client/virtualization/virtualization_clusters_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_clusters_read_responses.go b/netbox/client/virtualization/virtualization_clusters_read_responses.go index 634e6164e3cb612953f751bf0d4384dfaccf88ec..9786a192be5abc9f8414104ee035472782851742 100644 --- a/netbox/client/virtualization/virtualization_clusters_read_responses.go +++ b/netbox/client/virtualization/virtualization_clusters_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClustersReadReader is a Reader for the VirtualizationClustersRead structure. @@ -38,7 +39,6 @@ type VirtualizationClustersReadReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClustersReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationClustersReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationClustersReadOK) Error() string { return fmt.Sprintf("[GET /virtualization/clusters/{id}/][%d] virtualizationClustersReadOK %+v", 200, o.Payload) } +func (o *VirtualizationClustersReadOK) GetPayload() *models.Cluster { + return o.Payload +} + func (o *VirtualizationClustersReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Cluster) diff --git a/netbox/client/virtualization/virtualization_clusters_update_parameters.go b/netbox/client/virtualization/virtualization_clusters_update_parameters.go index a5e5fd25299349f2d7240b20a5693d9956b63003..7010c73e49ed4a9f37b5e60370652a1256eafd6c 100644 --- a/netbox/client/virtualization/virtualization_clusters_update_parameters.go +++ b/netbox/client/virtualization/virtualization_clusters_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationClustersUpdateParams creates a new VirtualizationClustersUpdateParams object diff --git a/netbox/client/virtualization/virtualization_clusters_update_responses.go b/netbox/client/virtualization/virtualization_clusters_update_responses.go index 3b6153116e887d7b45a90d8908aad2411e48167f..26714e58218b763a48015e5e46b5a529bf2819c3 100644 --- a/netbox/client/virtualization/virtualization_clusters_update_responses.go +++ b/netbox/client/virtualization/virtualization_clusters_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationClustersUpdateReader is a Reader for the VirtualizationClustersUpdate structure. @@ -38,7 +39,6 @@ type VirtualizationClustersUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationClustersUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationClustersUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationClustersUpdateOK) Error() string { return fmt.Sprintf("[PUT /virtualization/clusters/{id}/][%d] virtualizationClustersUpdateOK %+v", 200, o.Payload) } +func (o *VirtualizationClustersUpdateOK) GetPayload() *models.Cluster { + return o.Payload +} + func (o *VirtualizationClustersUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Cluster) diff --git a/netbox/client/virtualization/virtualization_interfaces_create_parameters.go b/netbox/client/virtualization/virtualization_interfaces_create_parameters.go index bef47bbe4aaf544c8d10a3a22813d5b9590457da..91a2c86cb474d4b9209105ab34881a1e6c8814b2 100644 --- a/netbox/client/virtualization/virtualization_interfaces_create_parameters.go +++ b/netbox/client/virtualization/virtualization_interfaces_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationInterfacesCreateParams creates a new VirtualizationInterfacesCreateParams object diff --git a/netbox/client/virtualization/virtualization_interfaces_create_responses.go b/netbox/client/virtualization/virtualization_interfaces_create_responses.go index 23af7a245cf5b33eed3bc133a4d84a13d4624e1c..abfaabcb5869437150be9ba5e3562f8cacdbc4fe 100644 --- a/netbox/client/virtualization/virtualization_interfaces_create_responses.go +++ b/netbox/client/virtualization/virtualization_interfaces_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationInterfacesCreateReader is a Reader for the VirtualizationInterfacesCreate structure. @@ -38,7 +39,6 @@ type VirtualizationInterfacesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationInterfacesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewVirtualizationInterfacesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationInterfacesCreateCreated) Error() string { return fmt.Sprintf("[POST /virtualization/interfaces/][%d] virtualizationInterfacesCreateCreated %+v", 201, o.Payload) } +func (o *VirtualizationInterfacesCreateCreated) GetPayload() *models.VirtualMachineInterface { + return o.Payload +} + func (o *VirtualizationInterfacesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VirtualMachineInterface) diff --git a/netbox/client/virtualization/virtualization_interfaces_delete_parameters.go b/netbox/client/virtualization/virtualization_interfaces_delete_parameters.go index 713d9090069578d97df9122c5132d2b1cacefa7f..7249dc0bbb412ac4c0acd6951f250493b24ac887 100644 --- a/netbox/client/virtualization/virtualization_interfaces_delete_parameters.go +++ b/netbox/client/virtualization/virtualization_interfaces_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_interfaces_delete_responses.go b/netbox/client/virtualization/virtualization_interfaces_delete_responses.go index 3a869617c81d0a4cf7b79bd7084b1f99a2c0caf1..fa9b831b9033dafd3d19b41ca54c5de8edef3212 100644 --- a/netbox/client/virtualization/virtualization_interfaces_delete_responses.go +++ b/netbox/client/virtualization/virtualization_interfaces_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -35,7 +36,6 @@ type VirtualizationInterfacesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationInterfacesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewVirtualizationInterfacesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/virtualization/virtualization_interfaces_list_parameters.go b/netbox/client/virtualization/virtualization_interfaces_list_parameters.go index fe6259483e8d9a34e23db07bf07cd7644cf003f4..949890a125356e3487255d33ac93ab33084e7745 100644 --- a/netbox/client/virtualization/virtualization_interfaces_list_parameters.go +++ b/netbox/client/virtualization/virtualization_interfaces_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_interfaces_list_responses.go b/netbox/client/virtualization/virtualization_interfaces_list_responses.go index ec55762e4ad4692bddc4a89370978f05e363ef3c..723ecc4ff8c1418cb7dab237cae39ac420143e29 100644 --- a/netbox/client/virtualization/virtualization_interfaces_list_responses.go +++ b/netbox/client/virtualization/virtualization_interfaces_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationInterfacesListReader is a Reader for the VirtualizationInterfacesList structure. @@ -42,7 +43,6 @@ type VirtualizationInterfacesListReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationInterfacesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationInterfacesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *VirtualizationInterfacesListOK) Error() string { return fmt.Sprintf("[GET /virtualization/interfaces/][%d] virtualizationInterfacesListOK %+v", 200, o.Payload) } +func (o *VirtualizationInterfacesListOK) GetPayload() *VirtualizationInterfacesListOKBody { + return o.Payload +} + func (o *VirtualizationInterfacesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(VirtualizationInterfacesListOKBody) diff --git a/netbox/client/virtualization/virtualization_interfaces_partial_update_parameters.go b/netbox/client/virtualization/virtualization_interfaces_partial_update_parameters.go index f291de1e2720eef97216d593d06517d8c3e85272..56e755b0ebd3cd8c5534acf8b1c1d8a3b197a944 100644 --- a/netbox/client/virtualization/virtualization_interfaces_partial_update_parameters.go +++ b/netbox/client/virtualization/virtualization_interfaces_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationInterfacesPartialUpdateParams creates a new VirtualizationInterfacesPartialUpdateParams object diff --git a/netbox/client/virtualization/virtualization_interfaces_partial_update_responses.go b/netbox/client/virtualization/virtualization_interfaces_partial_update_responses.go index 27efb0f3b7562609b40d5bc8b051b923c62f04db..5655650f8b8674daa15db7787a7f4257fe3c300b 100644 --- a/netbox/client/virtualization/virtualization_interfaces_partial_update_responses.go +++ b/netbox/client/virtualization/virtualization_interfaces_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationInterfacesPartialUpdateReader is a Reader for the VirtualizationInterfacesPartialUpdate structure. @@ -38,7 +39,6 @@ type VirtualizationInterfacesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationInterfacesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationInterfacesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationInterfacesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /virtualization/interfaces/{id}/][%d] virtualizationInterfacesPartialUpdateOK %+v", 200, o.Payload) } +func (o *VirtualizationInterfacesPartialUpdateOK) GetPayload() *models.VirtualMachineInterface { + return o.Payload +} + func (o *VirtualizationInterfacesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VirtualMachineInterface) diff --git a/netbox/client/virtualization/virtualization_interfaces_read_parameters.go b/netbox/client/virtualization/virtualization_interfaces_read_parameters.go index affef126a116e02cc8309eb327058dba0c11b31b..7fd1c095856f5cadca21b6bc1d016c729fe5fcb9 100644 --- a/netbox/client/virtualization/virtualization_interfaces_read_parameters.go +++ b/netbox/client/virtualization/virtualization_interfaces_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_interfaces_read_responses.go b/netbox/client/virtualization/virtualization_interfaces_read_responses.go index 23fb7aa4394c0772efcc1017efdbad7f104895ba..81f1821abdb1153594da11a495a1a3cba27ad5a5 100644 --- a/netbox/client/virtualization/virtualization_interfaces_read_responses.go +++ b/netbox/client/virtualization/virtualization_interfaces_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationInterfacesReadReader is a Reader for the VirtualizationInterfacesRead structure. @@ -38,7 +39,6 @@ type VirtualizationInterfacesReadReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationInterfacesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationInterfacesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationInterfacesReadOK) Error() string { return fmt.Sprintf("[GET /virtualization/interfaces/{id}/][%d] virtualizationInterfacesReadOK %+v", 200, o.Payload) } +func (o *VirtualizationInterfacesReadOK) GetPayload() *models.VirtualMachineInterface { + return o.Payload +} + func (o *VirtualizationInterfacesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VirtualMachineInterface) diff --git a/netbox/client/virtualization/virtualization_interfaces_update_parameters.go b/netbox/client/virtualization/virtualization_interfaces_update_parameters.go index 0e5f15f1dc4d7b714c985396b9f2252df37ac5aa..00953ea009967216fd714879e01c05ed47f1fc46 100644 --- a/netbox/client/virtualization/virtualization_interfaces_update_parameters.go +++ b/netbox/client/virtualization/virtualization_interfaces_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationInterfacesUpdateParams creates a new VirtualizationInterfacesUpdateParams object diff --git a/netbox/client/virtualization/virtualization_interfaces_update_responses.go b/netbox/client/virtualization/virtualization_interfaces_update_responses.go index 437ae90a8e6b914efcf70c22f8bd7f154bb9d5df..d5cd5fb270cb4dd0e107dff3162bbbb199c5d5ea 100644 --- a/netbox/client/virtualization/virtualization_interfaces_update_responses.go +++ b/netbox/client/virtualization/virtualization_interfaces_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationInterfacesUpdateReader is a Reader for the VirtualizationInterfacesUpdate structure. @@ -38,7 +39,6 @@ type VirtualizationInterfacesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationInterfacesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationInterfacesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationInterfacesUpdateOK) Error() string { return fmt.Sprintf("[PUT /virtualization/interfaces/{id}/][%d] virtualizationInterfacesUpdateOK %+v", 200, o.Payload) } +func (o *VirtualizationInterfacesUpdateOK) GetPayload() *models.VirtualMachineInterface { + return o.Payload +} + func (o *VirtualizationInterfacesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VirtualMachineInterface) diff --git a/netbox/client/virtualization/virtualization_virtual_machines_create_parameters.go b/netbox/client/virtualization/virtualization_virtual_machines_create_parameters.go index 68a438cf2c2b485943037b16abb806599576b89d..31485c58622d08a615d2c2e9a7d923e5257779ed 100644 --- a/netbox/client/virtualization/virtualization_virtual_machines_create_parameters.go +++ b/netbox/client/virtualization/virtualization_virtual_machines_create_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -30,7 +31,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationVirtualMachinesCreateParams creates a new VirtualizationVirtualMachinesCreateParams object diff --git a/netbox/client/virtualization/virtualization_virtual_machines_create_responses.go b/netbox/client/virtualization/virtualization_virtual_machines_create_responses.go index aafff5161a745e865a535d561d5868a1e37dab40..50cdd5893c4be882ee043d2727ed436d900ed7a4 100644 --- a/netbox/client/virtualization/virtualization_virtual_machines_create_responses.go +++ b/netbox/client/virtualization/virtualization_virtual_machines_create_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationVirtualMachinesCreateReader is a Reader for the VirtualizationVirtualMachinesCreate structure. @@ -38,7 +39,6 @@ type VirtualizationVirtualMachinesCreateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationVirtualMachinesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: result := NewVirtualizationVirtualMachinesCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationVirtualMachinesCreateCreated) Error() string { return fmt.Sprintf("[POST /virtualization/virtual-machines/][%d] virtualizationVirtualMachinesCreateCreated %+v", 201, o.Payload) } +func (o *VirtualizationVirtualMachinesCreateCreated) GetPayload() *models.VirtualMachineWithConfigContext { + return o.Payload +} + func (o *VirtualizationVirtualMachinesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VirtualMachineWithConfigContext) diff --git a/netbox/client/virtualization/virtualization_virtual_machines_delete_parameters.go b/netbox/client/virtualization/virtualization_virtual_machines_delete_parameters.go index f8ea607baed989f699c79b71a6b2878f8d884135..abbf6be2d7e309801fe66d0916f4fba4039e33fb 100644 --- a/netbox/client/virtualization/virtualization_virtual_machines_delete_parameters.go +++ b/netbox/client/virtualization/virtualization_virtual_machines_delete_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_virtual_machines_delete_responses.go b/netbox/client/virtualization/virtualization_virtual_machines_delete_responses.go index 246fce7266643da6f0962d9b7edf35278ddee018..f5406e5eae3d45c335614a6b2d91d633571f4eb2 100644 --- a/netbox/client/virtualization/virtualization_virtual_machines_delete_responses.go +++ b/netbox/client/virtualization/virtualization_virtual_machines_delete_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -35,7 +36,6 @@ type VirtualizationVirtualMachinesDeleteReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationVirtualMachinesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 204: result := NewVirtualizationVirtualMachinesDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { diff --git a/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go b/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go index 8b0235aa325ee24047887c1f77b77d9093c48e43..766655cdca6ff5b3c7c41fd6be4e1699aa48d698 100644 --- a/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go +++ b/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -88,6 +89,12 @@ type VirtualizationVirtualMachinesListParams struct { ClusterType *string /*ClusterTypeID*/ ClusterTypeID *string + /*Created*/ + Created *string + /*CreatedGte*/ + CreatedGte *string + /*CreatedLte*/ + CreatedLte *string /*Disk*/ Disk *string /*ID*/ @@ -97,11 +104,21 @@ type VirtualizationVirtualMachinesListParams struct { */ IDIn *string + /*LastUpdated*/ + LastUpdated *string + /*LastUpdatedGte*/ + LastUpdatedGte *string + /*LastUpdatedLte*/ + LastUpdatedLte *string /*Limit Number of results to return per page. */ Limit *int64 + /*LocalContextData*/ + LocalContextData *string + /*MacAddress*/ + MacAddress *string /*Memory*/ Memory *string /*Name*/ @@ -248,6 +265,39 @@ func (o *VirtualizationVirtualMachinesListParams) SetClusterTypeID(clusterTypeID o.ClusterTypeID = clusterTypeID } +// WithCreated adds the created to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithCreated(created *string) *VirtualizationVirtualMachinesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithCreatedGte(createdGte *string) *VirtualizationVirtualMachinesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithCreatedLte(createdLte *string) *VirtualizationVirtualMachinesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + // WithDisk adds the disk to the virtualization virtual machines list params func (o *VirtualizationVirtualMachinesListParams) WithDisk(disk *string) *VirtualizationVirtualMachinesListParams { o.SetDisk(disk) @@ -281,6 +331,39 @@ func (o *VirtualizationVirtualMachinesListParams) SetIDIn(iDIn *string) { o.IDIn = iDIn } +// WithLastUpdated adds the lastUpdated to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithLastUpdated(lastUpdated *string) *VirtualizationVirtualMachinesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *VirtualizationVirtualMachinesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *VirtualizationVirtualMachinesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + // WithLimit adds the limit to the virtualization virtual machines list params func (o *VirtualizationVirtualMachinesListParams) WithLimit(limit *int64) *VirtualizationVirtualMachinesListParams { o.SetLimit(limit) @@ -292,6 +375,28 @@ func (o *VirtualizationVirtualMachinesListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithLocalContextData adds the localContextData to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithLocalContextData(localContextData *string) *VirtualizationVirtualMachinesListParams { + o.SetLocalContextData(localContextData) + return o +} + +// SetLocalContextData adds the localContextData to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetLocalContextData(localContextData *string) { + o.LocalContextData = localContextData +} + +// WithMacAddress adds the macAddress to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithMacAddress(macAddress *string) *VirtualizationVirtualMachinesListParams { + o.SetMacAddress(macAddress) + return o +} + +// SetMacAddress adds the macAddress to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetMacAddress(macAddress *string) { + o.MacAddress = macAddress +} + // WithMemory adds the memory to the virtualization virtual machines list params func (o *VirtualizationVirtualMachinesListParams) WithMemory(memory *string) *VirtualizationVirtualMachinesListParams { o.SetMemory(memory) @@ -605,6 +710,54 @@ func (o *VirtualizationVirtualMachinesListParams) WriteToRequest(r runtime.Clien } + 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.Disk != nil { // query param disk @@ -653,6 +806,54 @@ func (o *VirtualizationVirtualMachinesListParams) WriteToRequest(r runtime.Clien } + 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 @@ -669,6 +870,38 @@ func (o *VirtualizationVirtualMachinesListParams) WriteToRequest(r runtime.Clien } + if o.LocalContextData != nil { + + // query param local_context_data + var qrLocalContextData string + if o.LocalContextData != nil { + qrLocalContextData = *o.LocalContextData + } + qLocalContextData := qrLocalContextData + if qLocalContextData != "" { + if err := r.SetQueryParam("local_context_data", qLocalContextData); err != nil { + return err + } + } + + } + + if o.MacAddress != nil { + + // query param mac_address + var qrMacAddress string + if o.MacAddress != nil { + qrMacAddress = *o.MacAddress + } + qMacAddress := qrMacAddress + if qMacAddress != "" { + if err := r.SetQueryParam("mac_address", qMacAddress); err != nil { + return err + } + } + + } + if o.Memory != nil { // query param memory diff --git a/netbox/client/virtualization/virtualization_virtual_machines_list_responses.go b/netbox/client/virtualization/virtualization_virtual_machines_list_responses.go index 0ffda441a4a02a935b6e88c8e8f063d7f3d345b8..c77c26350c55a005cfaf69f7d61b165b8509d145 100644 --- a/netbox/client/virtualization/virtualization_virtual_machines_list_responses.go +++ b/netbox/client/virtualization/virtualization_virtual_machines_list_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationVirtualMachinesListReader is a Reader for the VirtualizationVirtualMachinesList structure. @@ -42,7 +43,6 @@ type VirtualizationVirtualMachinesListReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationVirtualMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationVirtualMachinesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -72,6 +72,10 @@ func (o *VirtualizationVirtualMachinesListOK) Error() string { return fmt.Sprintf("[GET /virtualization/virtual-machines/][%d] virtualizationVirtualMachinesListOK %+v", 200, o.Payload) } +func (o *VirtualizationVirtualMachinesListOK) GetPayload() *VirtualizationVirtualMachinesListOKBody { + return o.Payload +} + func (o *VirtualizationVirtualMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(VirtualizationVirtualMachinesListOKBody) diff --git a/netbox/client/virtualization/virtualization_virtual_machines_partial_update_parameters.go b/netbox/client/virtualization/virtualization_virtual_machines_partial_update_parameters.go index 685c86fe85a803c0e884ba91bc648616282e1996..e38fb1d998491d45fa3e37beb8e56332bc7679b8 100644 --- a/netbox/client/virtualization/virtualization_virtual_machines_partial_update_parameters.go +++ b/netbox/client/virtualization/virtualization_virtual_machines_partial_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationVirtualMachinesPartialUpdateParams creates a new VirtualizationVirtualMachinesPartialUpdateParams object diff --git a/netbox/client/virtualization/virtualization_virtual_machines_partial_update_responses.go b/netbox/client/virtualization/virtualization_virtual_machines_partial_update_responses.go index e1d1fdb11f8484b47e442535f25fddc084a272f1..ecf6b82f2d11a63a7b84b1d1e546b60451657e33 100644 --- a/netbox/client/virtualization/virtualization_virtual_machines_partial_update_responses.go +++ b/netbox/client/virtualization/virtualization_virtual_machines_partial_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationVirtualMachinesPartialUpdateReader is a Reader for the VirtualizationVirtualMachinesPartialUpdate structure. @@ -38,7 +39,6 @@ type VirtualizationVirtualMachinesPartialUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationVirtualMachinesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationVirtualMachinesPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationVirtualMachinesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /virtualization/virtual-machines/{id}/][%d] virtualizationVirtualMachinesPartialUpdateOK %+v", 200, o.Payload) } +func (o *VirtualizationVirtualMachinesPartialUpdateOK) GetPayload() *models.VirtualMachineWithConfigContext { + return o.Payload +} + func (o *VirtualizationVirtualMachinesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VirtualMachineWithConfigContext) diff --git a/netbox/client/virtualization/virtualization_virtual_machines_read_parameters.go b/netbox/client/virtualization/virtualization_virtual_machines_read_parameters.go index 1a587a39a996642b77de16fe4c228e85b4d2fdc0..286b4111f799de614ecff26fa1179d93e5c55028 100644 --- a/netbox/client/virtualization/virtualization_virtual_machines_read_parameters.go +++ b/netbox/client/virtualization/virtualization_virtual_machines_read_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization diff --git a/netbox/client/virtualization/virtualization_virtual_machines_read_responses.go b/netbox/client/virtualization/virtualization_virtual_machines_read_responses.go index ff382e4c48ff437882152bf8b866ddcd4ecd6d19..90cdb1f018fd683e3548afb03b9967542d8d3891 100644 --- a/netbox/client/virtualization/virtualization_virtual_machines_read_responses.go +++ b/netbox/client/virtualization/virtualization_virtual_machines_read_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationVirtualMachinesReadReader is a Reader for the VirtualizationVirtualMachinesRead structure. @@ -38,7 +39,6 @@ type VirtualizationVirtualMachinesReadReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationVirtualMachinesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationVirtualMachinesReadOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationVirtualMachinesReadOK) Error() string { return fmt.Sprintf("[GET /virtualization/virtual-machines/{id}/][%d] virtualizationVirtualMachinesReadOK %+v", 200, o.Payload) } +func (o *VirtualizationVirtualMachinesReadOK) GetPayload() *models.VirtualMachineWithConfigContext { + return o.Payload +} + func (o *VirtualizationVirtualMachinesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VirtualMachineWithConfigContext) diff --git a/netbox/client/virtualization/virtualization_virtual_machines_update_parameters.go b/netbox/client/virtualization/virtualization_virtual_machines_update_parameters.go index e0559fbcb85db55a3ff63ff50f33224cc3f15939..1395472108b4992abaa813ab9019f2e26d1b530b 100644 --- a/netbox/client/virtualization/virtualization_virtual_machines_update_parameters.go +++ b/netbox/client/virtualization/virtualization_virtual_machines_update_parameters.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -31,7 +32,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // NewVirtualizationVirtualMachinesUpdateParams creates a new VirtualizationVirtualMachinesUpdateParams object diff --git a/netbox/client/virtualization/virtualization_virtual_machines_update_responses.go b/netbox/client/virtualization/virtualization_virtual_machines_update_responses.go index 2ba738516afcc71f4f74fd0858b4fd3198c1bd60..988d7c23fbd637f0e9a96d9e55158556619f12b7 100644 --- a/netbox/client/virtualization/virtualization_virtual_machines_update_responses.go +++ b/netbox/client/virtualization/virtualization_virtual_machines_update_responses.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package virtualization @@ -27,7 +28,7 @@ import ( strfmt "github.com/go-openapi/strfmt" - models "github.com/netbox-community/go-netbox/netbox/models" + "github.com/netbox-community/go-netbox/netbox/models" ) // VirtualizationVirtualMachinesUpdateReader is a Reader for the VirtualizationVirtualMachinesUpdate structure. @@ -38,7 +39,6 @@ type VirtualizationVirtualMachinesUpdateReader struct { // ReadResponse reads a server response into the received o. func (o *VirtualizationVirtualMachinesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVirtualizationVirtualMachinesUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -68,6 +68,10 @@ func (o *VirtualizationVirtualMachinesUpdateOK) Error() string { return fmt.Sprintf("[PUT /virtualization/virtual-machines/{id}/][%d] virtualizationVirtualMachinesUpdateOK %+v", 200, o.Payload) } +func (o *VirtualizationVirtualMachinesUpdateOK) GetPayload() *models.VirtualMachineWithConfigContext { + return o.Payload +} + func (o *VirtualizationVirtualMachinesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.VirtualMachineWithConfigContext) diff --git a/netbox/models/aggregate.go b/netbox/models/aggregate.go index 3ae5148755a6c24c4074079e7157f43aff335399..535da14d7846e4bc7e475f130a20993739ee0a15 100644 --- a/netbox/models/aggregate.go +++ b/netbox/models/aggregate.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,12 +21,10 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -50,10 +49,8 @@ type Aggregate struct { // Max Length: 100 Description string `json:"description,omitempty"` - // Family - // Read Only: true - // Enum: [4 6] - Family int64 `json:"family,omitempty"` + // family + Family *AggregateFamily `json:"family,omitempty"` // ID // Read Only: true @@ -157,35 +154,19 @@ func (m *Aggregate) validateDescription(formats strfmt.Registry) error { return nil } -var aggregateTypeFamilyPropEnum []interface{} - -func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[4,6]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aggregateTypeFamilyPropEnum = append(aggregateTypeFamilyPropEnum, v) - } -} - -// prop value enum -func (m *Aggregate) validateFamilyEnum(path, location string, value int64) error { - if err := validate.Enum(path, location, value, aggregateTypeFamilyPropEnum); err != nil { - return err - } - return nil -} - func (m *Aggregate) validateFamily(formats strfmt.Registry) error { if swag.IsZero(m.Family) { // not required return nil } - // value enum - if err := m.validateFamilyEnum("family", "body", m.Family); err != nil { - return err + 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 @@ -265,3 +246,70 @@ func (m *Aggregate) UnmarshalBinary(b []byte) error { *m = res return nil } + +// AggregateFamily Family +// swagger:model AggregateFamily +type AggregateFamily struct { + + // label + // Required: true + Label *string `json:"label"` + + // value + // Required: true + Value *string `json:"value"` +} + +// Validate validates this aggregate family +func (m *AggregateFamily) 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 +} + +func (m *AggregateFamily) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("family"+"."+"label", "body", m.Label); err != nil { + return err + } + + return nil +} + +func (m *AggregateFamily) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("family"+"."+"value", "body", m.Value); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AggregateFamily) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AggregateFamily) UnmarshalBinary(b []byte) error { + var res AggregateFamily + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/cable.go b/netbox/models/cable.go index 684f847a26419ed316c5b085f1e6444f99139892..3750da4f1d53e919cbd33e52f02fbc54a6d0935c 100644 --- a/netbox/models/cable.go +++ b/netbox/models/cable.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -59,35 +59,35 @@ type Cable struct { // Termination a // Read Only: true - TerminationA *Termination `json:"termination_a,omitempty"` + Terminationa map[string]string `json:"termination_a,omitempty"` // Termination a id // Required: true // Maximum: 2.147483647e+09 // Minimum: 0 - TerminationAID *int64 `json:"termination_a_id"` + TerminationaID *int64 `json:"termination_a_id"` // Termination a type // Required: true - TerminationAType *string `json:"termination_a_type"` + TerminationaType *string `json:"termination_a_type"` // Termination b // Read Only: true - TerminationB *Termination `json:"termination_b,omitempty"` + Terminationb map[string]string `json:"termination_b,omitempty"` // Termination b id // Required: true // Maximum: 2.147483647e+09 // Minimum: 0 - TerminationBID *int64 `json:"termination_b_id"` + TerminationbID *int64 `json:"termination_b_id"` // Termination b type // Required: true - TerminationBType *string `json:"termination_b_type"` + TerminationbType *string `json:"termination_b_type"` // Type - // Enum: [1300 1500 1510 1600 1610 1700 1800 1810 3000 3010 3020 3030 3040 3500 3510 3520 3800 5000] - Type *int64 `json:"type,omitempty"` + // Enum: [cat3 cat5 cat5e cat6 cat6a cat7 dac-active dac-passive coaxial mmf mmf-om1 mmf-om2 mmf-om3 mmf-om4 smf smf-os1 smf-os2 aoc power] + Type string `json:"type,omitempty"` } // Validate validates this cable @@ -114,19 +114,19 @@ func (m *Cable) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateTerminationAID(formats); err != nil { + if err := m.validateTerminationaID(formats); err != nil { res = append(res, err) } - if err := m.validateTerminationAType(formats); err != nil { + if err := m.validateTerminationaType(formats); err != nil { res = append(res, err) } - if err := m.validateTerminationBID(formats); err != nil { + if err := m.validateTerminationbID(formats); err != nil { res = append(res, err) } - if err := m.validateTerminationBType(formats); err != nil { + if err := m.validateTerminationbType(formats); err != nil { res = append(res, err) } @@ -223,52 +223,52 @@ func (m *Cable) validateStatus(formats strfmt.Registry) error { return nil } -func (m *Cable) validateTerminationAID(formats strfmt.Registry) error { +func (m *Cable) validateTerminationaID(formats strfmt.Registry) error { - if err := validate.Required("termination_a_id", "body", m.TerminationAID); err != nil { + if err := validate.Required("termination_a_id", "body", m.TerminationaID); err != nil { return err } - if err := validate.MinimumInt("termination_a_id", "body", int64(*m.TerminationAID), 0, false); err != nil { + if err := validate.MinimumInt("termination_a_id", "body", int64(*m.TerminationaID), 0, false); err != nil { return err } - if err := validate.MaximumInt("termination_a_id", "body", int64(*m.TerminationAID), 2.147483647e+09, false); err != nil { + if err := validate.MaximumInt("termination_a_id", "body", int64(*m.TerminationaID), 2.147483647e+09, false); err != nil { return err } return nil } -func (m *Cable) validateTerminationAType(formats strfmt.Registry) error { +func (m *Cable) validateTerminationaType(formats strfmt.Registry) error { - if err := validate.Required("termination_a_type", "body", m.TerminationAType); err != nil { + if err := validate.Required("termination_a_type", "body", m.TerminationaType); err != nil { return err } return nil } -func (m *Cable) validateTerminationBID(formats strfmt.Registry) error { +func (m *Cable) validateTerminationbID(formats strfmt.Registry) error { - if err := validate.Required("termination_b_id", "body", m.TerminationBID); err != nil { + if err := validate.Required("termination_b_id", "body", m.TerminationbID); err != nil { return err } - if err := validate.MinimumInt("termination_b_id", "body", int64(*m.TerminationBID), 0, false); err != nil { + if err := validate.MinimumInt("termination_b_id", "body", int64(*m.TerminationbID), 0, false); err != nil { return err } - if err := validate.MaximumInt("termination_b_id", "body", int64(*m.TerminationBID), 2.147483647e+09, false); err != nil { + if err := validate.MaximumInt("termination_b_id", "body", int64(*m.TerminationbID), 2.147483647e+09, false); err != nil { return err } return nil } -func (m *Cable) validateTerminationBType(formats strfmt.Registry) error { +func (m *Cable) validateTerminationbType(formats strfmt.Registry) error { - if err := validate.Required("termination_b_type", "body", m.TerminationBType); err != nil { + if err := validate.Required("termination_b_type", "body", m.TerminationbType); err != nil { return err } @@ -278,8 +278,8 @@ func (m *Cable) validateTerminationBType(formats strfmt.Registry) error { var cableTypeTypePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1300,1500,1510,1600,1610,1700,1800,1810,3000,3010,3020,3030,3040,3500,3510,3520,3800,5000]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["cat3","cat5","cat5e","cat6","cat6a","cat7","dac-active","dac-passive","coaxial","mmf","mmf-om1","mmf-om2","mmf-om3","mmf-om4","smf","smf-os1","smf-os2","aoc","power"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -287,8 +287,68 @@ func init() { } } +const ( + + // CableTypeCat3 captures enum value "cat3" + CableTypeCat3 string = "cat3" + + // CableTypeCat5 captures enum value "cat5" + CableTypeCat5 string = "cat5" + + // CableTypeCat5e captures enum value "cat5e" + CableTypeCat5e string = "cat5e" + + // CableTypeCat6 captures enum value "cat6" + CableTypeCat6 string = "cat6" + + // CableTypeCat6a captures enum value "cat6a" + CableTypeCat6a string = "cat6a" + + // CableTypeCat7 captures enum value "cat7" + CableTypeCat7 string = "cat7" + + // CableTypeDacActive captures enum value "dac-active" + CableTypeDacActive string = "dac-active" + + // CableTypeDacPassive captures enum value "dac-passive" + CableTypeDacPassive string = "dac-passive" + + // CableTypeCoaxial captures enum value "coaxial" + CableTypeCoaxial string = "coaxial" + + // CableTypeMmf captures enum value "mmf" + CableTypeMmf string = "mmf" + + // CableTypeMmfOm1 captures enum value "mmf-om1" + CableTypeMmfOm1 string = "mmf-om1" + + // CableTypeMmfOm2 captures enum value "mmf-om2" + CableTypeMmfOm2 string = "mmf-om2" + + // CableTypeMmfOm3 captures enum value "mmf-om3" + CableTypeMmfOm3 string = "mmf-om3" + + // CableTypeMmfOm4 captures enum value "mmf-om4" + CableTypeMmfOm4 string = "mmf-om4" + + // CableTypeSmf captures enum value "smf" + CableTypeSmf string = "smf" + + // CableTypeSmfOs1 captures enum value "smf-os1" + CableTypeSmfOs1 string = "smf-os1" + + // CableTypeSmfOs2 captures enum value "smf-os2" + CableTypeSmfOs2 string = "smf-os2" + + // CableTypeAoc captures enum value "aoc" + CableTypeAoc string = "aoc" + + // CableTypePower captures enum value "power" + CableTypePower string = "power" +) + // prop value enum -func (m *Cable) validateTypeEnum(path, location string, value int64) error { +func (m *Cable) validateTypeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, cableTypeTypePropEnum); err != nil { return err } @@ -302,7 +362,7 @@ func (m *Cable) validateType(formats strfmt.Registry) error { } // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { return err } @@ -337,7 +397,7 @@ type CableLengthUnit struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this cable length unit @@ -404,7 +464,7 @@ type CableStatus struct { // value // Required: true - Value *bool `json:"value"` + Value *string `json:"value"` } // Validate validates this cable status diff --git a/netbox/models/circuit.go b/netbox/models/circuit.go index e03be2a6d58d1344903ea7b5d47c5330b6f1fcdb..ee5b4aa7c637f9ef2b9d8630b03a5b4b591b4838 100644 --- a/netbox/models/circuit.go +++ b/netbox/models/circuit.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -85,6 +85,12 @@ type Circuit struct { // tenant Tenant *NestedTenant `json:"tenant,omitempty"` + // termination a + Terminationa *CircuitCircuitTermination `json:"termination_a,omitempty"` + + // termination z + Terminationz *CircuitCircuitTermination `json:"termination_z,omitempty"` + // type // Required: true Type *NestedCircuitType `json:"type"` @@ -134,6 +140,14 @@ func (m *Circuit) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTerminationa(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTerminationz(formats); err != nil { + res = append(res, err) + } + if err := m.validateType(formats); err != nil { res = append(res, err) } @@ -301,6 +315,42 @@ func (m *Circuit) validateTenant(formats strfmt.Registry) error { return nil } +func (m *Circuit) validateTerminationa(formats strfmt.Registry) error { + + if swag.IsZero(m.Terminationa) { // not required + return nil + } + + if m.Terminationa != nil { + if err := m.Terminationa.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("termination_a") + } + return err + } + } + + return nil +} + +func (m *Circuit) validateTerminationz(formats strfmt.Registry) error { + + if swag.IsZero(m.Terminationz) { // not required + return nil + } + + if m.Terminationz != nil { + if err := m.Terminationz.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("termination_z") + } + return err + } + } + + return nil +} + func (m *Circuit) validateType(formats strfmt.Registry) error { if err := validate.Required("type", "body", m.Type); err != nil { @@ -347,7 +397,7 @@ type CircuitStatus struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this circuit status diff --git a/netbox/models/circuit_circuit_termination.go b/netbox/models/circuit_circuit_termination.go new file mode 100644 index 0000000000000000000000000000000000000000..3a22b4f0f77a204316d36cd2dfc9b339b5bf968b --- /dev/null +++ b/netbox/models/circuit_circuit_termination.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2018 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// CircuitCircuitTermination Termination a +// swagger:model CircuitCircuitTermination +type CircuitCircuitTermination struct { + + // connected endpoint + // Required: true + ConnectedEndpoint *NestedInterface `json:"connected_endpoint"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Port speed (Kbps) + // Required: true + // Maximum: 2.147483647e+09 + // Minimum: 0 + PortSpeed *int64 `json:"port_speed"` + + // site + // Required: true + Site *NestedSite `json:"site"` + + // Upstream speed (Kbps) + // + // Upstream speed, if different from port speed + // Maximum: 2.147483647e+09 + // Minimum: 0 + UpstreamSpeed *int64 `json:"upstream_speed,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` + + // Cross-connect ID + // Max Length: 50 + XconnectID string `json:"xconnect_id,omitempty"` +} + +// Validate validates this circuit circuit termination +func (m *CircuitCircuitTermination) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConnectedEndpoint(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePortSpeed(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSite(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpstreamSpeed(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateXconnectID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CircuitCircuitTermination) validateConnectedEndpoint(formats strfmt.Registry) error { + + if err := validate.Required("connected_endpoint", "body", m.ConnectedEndpoint); err != nil { + return err + } + + if m.ConnectedEndpoint != nil { + if err := m.ConnectedEndpoint.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("connected_endpoint") + } + return err + } + } + + return nil +} + +func (m *CircuitCircuitTermination) validatePortSpeed(formats strfmt.Registry) error { + + if err := validate.Required("port_speed", "body", m.PortSpeed); err != nil { + return err + } + + if err := validate.MinimumInt("port_speed", "body", int64(*m.PortSpeed), 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("port_speed", "body", int64(*m.PortSpeed), 2.147483647e+09, false); err != nil { + return err + } + + return nil +} + +func (m *CircuitCircuitTermination) validateSite(formats strfmt.Registry) error { + + if err := validate.Required("site", "body", m.Site); err != nil { + return err + } + + if m.Site != nil { + if err := m.Site.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("site") + } + return err + } + } + + return nil +} + +func (m *CircuitCircuitTermination) validateUpstreamSpeed(formats strfmt.Registry) error { + + if swag.IsZero(m.UpstreamSpeed) { // not required + return nil + } + + if err := validate.MinimumInt("upstream_speed", "body", int64(*m.UpstreamSpeed), 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("upstream_speed", "body", int64(*m.UpstreamSpeed), 2.147483647e+09, false); err != nil { + return err + } + + return nil +} + +func (m *CircuitCircuitTermination) 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 *CircuitCircuitTermination) validateXconnectID(formats strfmt.Registry) error { + + if swag.IsZero(m.XconnectID) { // not required + return nil + } + + if err := validate.MaxLength("xconnect_id", "body", string(m.XconnectID), 50); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CircuitCircuitTermination) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CircuitCircuitTermination) UnmarshalBinary(b []byte) error { + var res CircuitCircuitTermination + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/circuit_termination.go b/netbox/models/circuit_termination.go index 7819344e0984420351d12bb0bf32518b11dcc162..3abedd30f86b4a61b1fabe845795eb149cbbfda2 100644 --- a/netbox/models/circuit_termination.go +++ b/netbox/models/circuit_termination.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -46,7 +46,7 @@ type CircuitTermination struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint *ConnectedEndpoint `json:"connected_endpoint,omitempty"` + ConnectedEndpoint map[string]string `json:"connected_endpoint,omitempty"` // Connected endpoint type // Read Only: true diff --git a/netbox/models/circuit_type.go b/netbox/models/circuit_type.go index ccc933bfad7e835b5aaae809c200f51b15ca91f8..357dc0e6832723c5ec34ecc31b9aca22c553fe88 100644 --- a/netbox/models/circuit_type.go +++ b/netbox/models/circuit_type.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -35,6 +35,10 @@ type CircuitType struct { // Read Only: true CircuitCount int64 `json:"circuit_count,omitempty"` + // Description + // Max Length: 100 + Description string `json:"description,omitempty"` + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -57,6 +61,10 @@ type CircuitType struct { func (m *CircuitType) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -71,6 +79,19 @@ func (m *CircuitType) Validate(formats strfmt.Registry) error { return nil } +func (m *CircuitType) validateDescription(formats strfmt.Registry) error { + + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil { + return err + } + + return nil +} + func (m *CircuitType) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { diff --git a/netbox/models/cluster.go b/netbox/models/cluster.go index c2d8aaa285ab5d241ef8b31ac75ac17eb5c0a947..2a6496a28c62ce61fbba9c33362ca9ddd61a4a05 100644 --- a/netbox/models/cluster.go +++ b/netbox/models/cluster.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -72,6 +72,9 @@ type Cluster struct { // tags Tags []string `json:"tags"` + // tenant + Tenant *NestedTenant `json:"tenant,omitempty"` + // type // Required: true Type *NestedClusterType `json:"type"` @@ -109,6 +112,10 @@ func (m *Cluster) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTenant(formats); err != nil { + res = append(res, err) + } + if err := m.validateType(formats); err != nil { res = append(res, err) } @@ -215,6 +222,24 @@ func (m *Cluster) validateTags(formats strfmt.Registry) error { return nil } +func (m *Cluster) 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 *Cluster) validateType(formats strfmt.Registry) error { if err := validate.Required("type", "body", m.Type); err != nil { diff --git a/netbox/models/cluster_group.go b/netbox/models/cluster_group.go index dcfe851b8aeb4d84ebab894d8ba5b53da47fa77f..a8b588d125322c5262061cb65528e646f5e5789e 100644 --- a/netbox/models/cluster_group.go +++ b/netbox/models/cluster_group.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/cluster_type.go b/netbox/models/cluster_type.go index 72d91133e0450840f122dbb0b833a08b3fff9826..b6493c0bac3b0f72bb5b6f4e3c00cf59483091df 100644 --- a/netbox/models/cluster_type.go +++ b/netbox/models/cluster_type.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/config_context.go b/netbox/models/config_context.go index 2498ebee7f262d5ce205f4e8806914613d8cedac..7f58ec403f8e7571f97524280b7810a3d60e39f4 100644 --- a/netbox/models/config_context.go +++ b/netbox/models/config_context.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -70,6 +70,10 @@ type ConfigContext struct { // Unique: true Sites []*NestedSite `json:"sites"` + // tags + // Unique: true + Tags []string `json:"tags"` + // tenant groups // Unique: true TenantGroups []*NestedTenantGroup `json:"tenant_groups"` @@ -116,6 +120,10 @@ func (m *ConfigContext) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateTenantGroups(formats); err != nil { res = append(res, err) } @@ -289,6 +297,27 @@ func (m *ConfigContext) validateSites(formats strfmt.Registry) error { return nil } +func (m *ConfigContext) validateTags(formats strfmt.Registry) error { + + if swag.IsZero(m.Tags) { // not required + return nil + } + + if err := validate.UniqueItems("tags", "body", m.Tags); err != nil { + return err + } + + for i := 0; i < len(m.Tags); i++ { + + if err := validate.Pattern("tags"+"."+strconv.Itoa(i), "body", string(m.Tags[i]), `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + } + + return nil +} + func (m *ConfigContext) validateTenantGroups(formats strfmt.Registry) error { if swag.IsZero(m.TenantGroups) { // not required diff --git a/netbox/models/connected_endpoint.go b/netbox/models/connected_endpoint.go deleted file mode 100644 index 447c7a1d12813e109f0a05bbeb5d25bfc10e4400..0000000000000000000000000000000000000000 --- a/netbox/models/connected_endpoint.go +++ /dev/null @@ -1,12 +0,0 @@ -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// ConnectedEndpoint connected_endpoint -// swagger:model ConnectedEndpoint -type ConnectedEndpoint struct { - ID uint64 `json:"id,omitempty"` - URL string `json:"url,omitempty"` - Circuit *Circuit `json:"circuit,omitempty"` -} diff --git a/netbox/models/console_port.go b/netbox/models/console_port.go index 69a706d2fc0b1e343c922e2c902a575211e1bafd..61fb0102a3d261d863fc6e1abe7e793dc5c137f3 100644 --- a/netbox/models/console_port.go +++ b/netbox/models/console_port.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -71,6 +71,9 @@ type ConsolePort struct { // tags Tags []string `json:"tags"` + + // type + Type *ConsolePortType `json:"type,omitempty"` } // Validate validates this console port @@ -101,6 +104,10 @@ func (m *ConsolePort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -208,6 +215,24 @@ func (m *ConsolePort) validateTags(formats strfmt.Registry) error { return nil } +func (m *ConsolePort) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *ConsolePort) MarshalBinary() ([]byte, error) { if m == nil { @@ -292,3 +317,70 @@ func (m *ConsolePortConnectionStatus) UnmarshalBinary(b []byte) error { *m = res return nil } + +// ConsolePortType Type +// swagger:model ConsolePortType +type ConsolePortType struct { + + // label + // Required: true + Label *string `json:"label"` + + // value + // Required: true + Value *string `json:"value"` +} + +// Validate validates this console port type +func (m *ConsolePortType) 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 +} + +func (m *ConsolePortType) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"label", "body", m.Label); err != nil { + return err + } + + return nil +} + +func (m *ConsolePortType) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"value", "body", m.Value); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConsolePortType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConsolePortType) UnmarshalBinary(b []byte) error { + var res ConsolePortType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/console_port_template.go b/netbox/models/console_port_template.go index ae1c99792aa96ca9d7e3449e02727bcb526e7de8..d3d994e49d440b2b781121c6099abe21a161ac06 100644 --- a/netbox/models/console_port_template.go +++ b/netbox/models/console_port_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -44,6 +44,9 @@ type ConsolePortTemplate struct { // Max Length: 50 // Min Length: 1 Name *string `json:"name"` + + // type + Type *ConsolePortTemplateType `json:"type,omitempty"` } // Validate validates this console port template @@ -58,6 +61,10 @@ func (m *ConsolePortTemplate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -99,6 +106,24 @@ func (m *ConsolePortTemplate) validateName(formats strfmt.Registry) error { return nil } +func (m *ConsolePortTemplate) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *ConsolePortTemplate) MarshalBinary() ([]byte, error) { if m == nil { @@ -116,3 +141,70 @@ func (m *ConsolePortTemplate) UnmarshalBinary(b []byte) error { *m = res return nil } + +// ConsolePortTemplateType Type +// swagger:model ConsolePortTemplateType +type ConsolePortTemplateType struct { + + // label + // Required: true + Label *string `json:"label"` + + // value + // Required: true + Value *string `json:"value"` +} + +// Validate validates this console port template type +func (m *ConsolePortTemplateType) 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 +} + +func (m *ConsolePortTemplateType) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"label", "body", m.Label); err != nil { + return err + } + + return nil +} + +func (m *ConsolePortTemplateType) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"value", "body", m.Value); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConsolePortTemplateType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConsolePortTemplateType) UnmarshalBinary(b []byte) error { + var res ConsolePortTemplateType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/console_server_port.go b/netbox/models/console_server_port.go index 12d9a37a33b0e6843d4a3af82badb3c6bf446f24..71f5594962eeea50908854b3210de4ce776b29bf 100644 --- a/netbox/models/console_server_port.go +++ b/netbox/models/console_server_port.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -71,6 +71,9 @@ type ConsoleServerPort struct { // tags Tags []string `json:"tags"` + + // type + Type *ConsoleServerPortType `json:"type,omitempty"` } // Validate validates this console server port @@ -101,6 +104,10 @@ func (m *ConsoleServerPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -208,6 +215,24 @@ func (m *ConsoleServerPort) validateTags(formats strfmt.Registry) error { return nil } +func (m *ConsoleServerPort) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *ConsoleServerPort) MarshalBinary() ([]byte, error) { if m == nil { @@ -292,3 +317,70 @@ func (m *ConsoleServerPortConnectionStatus) UnmarshalBinary(b []byte) error { *m = res return nil } + +// ConsoleServerPortType Type +// swagger:model ConsoleServerPortType +type ConsoleServerPortType struct { + + // label + // Required: true + Label *string `json:"label"` + + // value + // Required: true + Value *string `json:"value"` +} + +// Validate validates this console server port type +func (m *ConsoleServerPortType) 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 +} + +func (m *ConsoleServerPortType) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"label", "body", m.Label); err != nil { + return err + } + + return nil +} + +func (m *ConsoleServerPortType) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"value", "body", m.Value); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConsoleServerPortType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConsoleServerPortType) UnmarshalBinary(b []byte) error { + var res ConsoleServerPortType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/console_server_port_template.go b/netbox/models/console_server_port_template.go index 3652f4248540d010ba2739c662fa3145f0c838e8..1414824db3d9f0f752610cb57b9b5c63bbb25e0d 100644 --- a/netbox/models/console_server_port_template.go +++ b/netbox/models/console_server_port_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -44,6 +44,9 @@ type ConsoleServerPortTemplate struct { // Max Length: 50 // Min Length: 1 Name *string `json:"name"` + + // type + Type *ConsoleServerPortTemplateType `json:"type,omitempty"` } // Validate validates this console server port template @@ -58,6 +61,10 @@ func (m *ConsoleServerPortTemplate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -99,6 +106,24 @@ func (m *ConsoleServerPortTemplate) validateName(formats strfmt.Registry) error return nil } +func (m *ConsoleServerPortTemplate) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *ConsoleServerPortTemplate) MarshalBinary() ([]byte, error) { if m == nil { @@ -116,3 +141,70 @@ func (m *ConsoleServerPortTemplate) UnmarshalBinary(b []byte) error { *m = res return nil } + +// ConsoleServerPortTemplateType Type +// swagger:model ConsoleServerPortTemplateType +type ConsoleServerPortTemplateType struct { + + // label + // Required: true + Label *string `json:"label"` + + // value + // Required: true + Value *string `json:"value"` +} + +// Validate validates this console server port template type +func (m *ConsoleServerPortTemplateType) 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 +} + +func (m *ConsoleServerPortTemplateType) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"label", "body", m.Label); err != nil { + return err + } + + return nil +} + +func (m *ConsoleServerPortTemplateType) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"value", "body", m.Value); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConsoleServerPortTemplateType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConsoleServerPortTemplateType) UnmarshalBinary(b []byte) error { + var res ConsoleServerPortTemplateType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/device.go b/netbox/models/device.go index 7d465026b1ce1be2dd82882492bd7b67d523dd04..d98814e5520a3aefac9f7d591981fb57cdd86ebc 100644 --- a/netbox/models/device.go +++ b/netbox/models/device.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -655,7 +655,7 @@ type DeviceFace struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this device face @@ -722,7 +722,7 @@ type DeviceStatus struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this device status diff --git a/netbox/models/device_bay.go b/netbox/models/device_bay.go index 0eff1399590e44a90a98fe4d4b60551ed9e8784d..9a0ebddd68378374cc30671654c5594783570485 100644 --- a/netbox/models/device_bay.go +++ b/netbox/models/device_bay.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/device_bay_template.go b/netbox/models/device_bay_template.go index 24db6932b56b358d3416079c265866ac29dbbeba..737b67e5d5c663c38321435b98ea4f49e6bfa584 100644 --- a/netbox/models/device_bay_template.go +++ b/netbox/models/device_bay_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/device_interface.go b/netbox/models/device_interface.go index f62fd1be808dc9e202953c4b3ebe97143e1a0fdf..0a3875291ecbee7b18ef65e929242431b4a796e3 100644 --- a/netbox/models/device_interface.go +++ b/netbox/models/device_interface.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -42,7 +42,7 @@ type DeviceInterface struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint *ConnectedEndpoint `json:"connected_endpoint,omitempty"` + ConnectedEndpoint map[string]string `json:"connected_endpoint,omitempty"` // Connected endpoint type // Read Only: true @@ -53,7 +53,7 @@ type DeviceInterface struct { // Count ipaddresses // Read Only: true - CountIpaddresses int64 `json:"count_ipaddresses,omitempty"` + CountIpaddresses string `json:"count_ipaddresses,omitempty"` // Description // Max Length: 100 @@ -66,9 +66,6 @@ type DeviceInterface struct { // Enabled Enabled bool `json:"enabled,omitempty"` - // form factor - FormFactor *DeviceInterfaceFormFactor `json:"form_factor,omitempty"` - // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -132,10 +129,6 @@ func (m *DeviceInterface) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateFormFactor(formats); err != nil { - res = append(res, err) - } - if err := m.validateLag(formats); err != nil { res = append(res, err) } @@ -241,24 +234,6 @@ func (m *DeviceInterface) validateDevice(formats strfmt.Registry) error { return nil } -func (m *DeviceInterface) validateFormFactor(formats strfmt.Registry) error { - - if swag.IsZero(m.FormFactor) { // not required - return nil - } - - if m.FormFactor != nil { - if err := m.FormFactor.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("form_factor") - } - return err - } - } - - return nil -} - func (m *DeviceInterface) validateLag(formats strfmt.Registry) error { if swag.IsZero(m.Lag) { // not required @@ -496,73 +471,6 @@ func (m *DeviceInterfaceConnectionStatus) UnmarshalBinary(b []byte) error { return nil } -// DeviceInterfaceFormFactor Form factor -// swagger:model DeviceInterfaceFormFactor -type DeviceInterfaceFormFactor struct { - - // label - // Required: true - Label *string `json:"label"` - - // value - // Required: true - Value *int64 `json:"value"` -} - -// Validate validates this device interface form factor -func (m *DeviceInterfaceFormFactor) 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 -} - -func (m *DeviceInterfaceFormFactor) validateLabel(formats strfmt.Registry) error { - - if err := validate.Required("form_factor"+"."+"label", "body", m.Label); err != nil { - return err - } - - return nil -} - -func (m *DeviceInterfaceFormFactor) validateValue(formats strfmt.Registry) error { - - if err := validate.Required("form_factor"+"."+"value", "body", m.Value); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeviceInterfaceFormFactor) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeviceInterfaceFormFactor) UnmarshalBinary(b []byte) error { - var res DeviceInterfaceFormFactor - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - // DeviceInterfaceMode Mode // swagger:model DeviceInterfaceMode type DeviceInterfaceMode struct { @@ -573,7 +481,7 @@ type DeviceInterfaceMode struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this device interface mode @@ -640,7 +548,7 @@ type DeviceInterfaceType struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this device interface type diff --git a/netbox/models/device_n_a_p_a_l_m.go b/netbox/models/device_n_a_p_a_l_m.go new file mode 100644 index 0000000000000000000000000000000000000000..4aa22dc2f4cafcafaf5c4023468530f64b867b01 --- /dev/null +++ b/netbox/models/device_n_a_p_a_l_m.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2018 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DeviceNAPALM device n a p a l m +// swagger:model DeviceNAPALM +type DeviceNAPALM struct { + + // Method + // Required: true + Method map[string]string `json:"method"` +} + +// Validate validates this device n a p a l m +func (m *DeviceNAPALM) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMethod(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DeviceNAPALM) validateMethod(formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *DeviceNAPALM) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DeviceNAPALM) UnmarshalBinary(b []byte) error { + var res DeviceNAPALM + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/device_role.go b/netbox/models/device_role.go index 4ef96fb3a92897d7f7eaf3409aafd45a7e435411..a50b721630537fe661a41895a3aa7eb0b07799bb 100644 --- a/netbox/models/device_role.go +++ b/netbox/models/device_role.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -38,6 +38,10 @@ type DeviceRole struct { // Pattern: ^[0-9a-f]{6}$ Color *string `json:"color"` + // Description + // Max Length: 100 + Description string `json:"description,omitempty"` + // Device count // Read Only: true DeviceCount int64 `json:"device_count,omitempty"` @@ -77,6 +81,10 @@ func (m *DeviceRole) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -112,6 +120,19 @@ func (m *DeviceRole) validateColor(formats strfmt.Registry) error { return nil } +func (m *DeviceRole) validateDescription(formats strfmt.Registry) error { + + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil { + return err + } + + return nil +} + func (m *DeviceRole) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { diff --git a/netbox/models/device_type.go b/netbox/models/device_type.go index 10cf72be9d1897c58d8a1edd1601675b966db913..d0a75bf1ffdb27a0d0408a31901c7fa4c31b33fe 100644 --- a/netbox/models/device_type.go +++ b/netbox/models/device_type.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -322,7 +322,7 @@ type DeviceTypeSubdeviceRole struct { // value // Required: true - Value *bool `json:"value"` + Value *string `json:"value"` } // Validate validates this device type subdevice role diff --git a/netbox/models/device_with_config_context.go b/netbox/models/device_with_config_context.go index b397cc6a9dd55a76f991415e8d3c75405fd45b79..c117513fbfcc0888997b9029ef2acd3d9a864b48 100644 --- a/netbox/models/device_with_config_context.go +++ b/netbox/models/device_with_config_context.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -659,7 +659,7 @@ type DeviceWithConfigContextFace struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this device with config context face @@ -726,7 +726,7 @@ type DeviceWithConfigContextStatus struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this device with config context status diff --git a/netbox/models/export_template.go b/netbox/models/export_template.go index a035cbd724d023fac9b2b7664a33e3407070bcdb..c61377fcebc7a776e2a2b5adf6250df44f22cb23 100644 --- a/netbox/models/export_template.go +++ b/netbox/models/export_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -42,6 +42,8 @@ type ExportTemplate struct { Description string `json:"description,omitempty"` // File extension + // + // Extension to append to the rendered filename // Max Length: 15 FileExtension string `json:"file_extension,omitempty"` @@ -49,7 +51,9 @@ type ExportTemplate struct { // Read Only: true ID int64 `json:"id,omitempty"` - // Mime type + // MIME type + // + // Defaults to <code>text/plain</code> // Max Length: 50 MimeType string `json:"mime_type,omitempty"` @@ -60,6 +64,8 @@ type ExportTemplate struct { Name *string `json:"name"` // Template code + // + // The list of objects being exported is passed as a context variable named <code>queryset</code>. // Required: true // Min Length: 1 TemplateCode *string `json:"template_code"` @@ -230,13 +236,13 @@ type ExportTemplateTemplateLanguage struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } func (m *ExportTemplateTemplateLanguage) UnmarshalJSON(b []byte) error { type ExportTemplateTemplateLanguageAlias ExportTemplateTemplateLanguage var t ExportTemplateTemplateLanguageAlias - if err := json.Unmarshal([]byte("{\"label\":\"Jinja2\",\"value\":20}"), &t); err != nil { + if err := json.Unmarshal([]byte("{\"id\":20,\"label\":\"Jinja2\",\"value\":\"jinja2\"}"), &t); err != nil { return err } if err := json.Unmarshal(b, &t); err != nil { diff --git a/netbox/models/front_port.go b/netbox/models/front_port.go index f357e7b6add9d05c2ec80ee050a083dfb03ed0bf..108322eb09e01e9fb9243e542ef9d131f8d0d86d 100644 --- a/netbox/models/front_port.go +++ b/netbox/models/front_port.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -277,7 +277,7 @@ type FrontPortType struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this front port type diff --git a/netbox/models/front_port_rear_port.go b/netbox/models/front_port_rear_port.go index 6379d7d3da89f687a24799f12e0922947f276af2..07cdf2fd168a0d78450a36af184abcf1e20c0f41 100644 --- a/netbox/models/front_port_rear_port.go +++ b/netbox/models/front_port_rear_port.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/front_port_template.go b/netbox/models/front_port_template.go index 80273ca07098f46a29423dd6794214f9b46596bc..ccafcd7078e0d99b72a248351025bcf84cd5fb92 100644 --- a/netbox/models/front_port_template.go +++ b/netbox/models/front_port_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -205,7 +205,7 @@ type FrontPortTemplateType struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this front port template type diff --git a/netbox/models/graph.go b/netbox/models/graph.go index a65ef4e43a55361f8367ac86ae7ae48e27d5757a..e2e935949d3cf6ad2599198a2d48d9a976b09d0d 100644 --- a/netbox/models/graph.go +++ b/netbox/models/graph.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,10 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "encoding/json" "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -52,9 +54,13 @@ type Graph struct { // Min Length: 1 Source *string `json:"source"` - // type + // Template language + // Enum: [django jinja2] + TemplateLanguage string `json:"template_language,omitempty"` + + // Type // Required: true - Type *GraphType `json:"type"` + Type *string `json:"type"` // Weight // Maximum: 32767 @@ -78,6 +84,10 @@ func (m *Graph) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTemplateLanguage(formats); err != nil { + res = append(res, err) + } + if err := m.validateType(formats); err != nil { res = append(res, err) } @@ -143,102 +153,69 @@ func (m *Graph) validateSource(formats strfmt.Registry) error { return nil } -func (m *Graph) validateType(formats strfmt.Registry) error { +var graphTypeTemplateLanguagePropEnum []interface{} - if err := validate.Required("type", "body", m.Type); err != nil { - return err +func init() { + var res []string + if err := json.Unmarshal([]byte(`["django","jinja2"]`), &res); err != nil { + panic(err) } - - if m.Type != nil { - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") - } - return err - } + for _, v := range res { + graphTypeTemplateLanguagePropEnum = append(graphTypeTemplateLanguagePropEnum, v) } - - return nil } -func (m *Graph) validateWeight(formats strfmt.Registry) error { +const ( - if swag.IsZero(m.Weight) { // not required - return nil - } + // GraphTemplateLanguageDjango captures enum value "django" + GraphTemplateLanguageDjango string = "django" - if err := validate.MinimumInt("weight", "body", int64(*m.Weight), 0, false); err != nil { - return err - } + // GraphTemplateLanguageJinja2 captures enum value "jinja2" + GraphTemplateLanguageJinja2 string = "jinja2" +) - if err := validate.MaximumInt("weight", "body", int64(*m.Weight), 32767, false); err != nil { +// prop value enum +func (m *Graph) validateTemplateLanguageEnum(path, location string, value string) error { + if err := validate.Enum(path, location, value, graphTypeTemplateLanguagePropEnum); err != nil { return err } - return nil } -// MarshalBinary interface implementation -func (m *Graph) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil +func (m *Graph) validateTemplateLanguage(formats strfmt.Registry) error { + + if swag.IsZero(m.TemplateLanguage) { // not required + return nil } - return swag.WriteJSON(m) -} -// UnmarshalBinary interface implementation -func (m *Graph) UnmarshalBinary(b []byte) error { - var res Graph - if err := swag.ReadJSON(b, &res); err != nil { + // value enum + if err := m.validateTemplateLanguageEnum("template_language", "body", m.TemplateLanguage); err != nil { return err } - *m = res - return nil -} - -// GraphType Type -// swagger:model GraphType -type GraphType struct { - // label - // Required: true - Label *string `json:"label"` - - // value - // Required: true - Value *int64 `json:"value"` + return nil } -// Validate validates this graph type -func (m *GraphType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLabel(formats); err != nil { - res = append(res, err) - } +func (m *Graph) validateType(formats strfmt.Registry) error { - if err := m.validateValue(formats); err != nil { - res = append(res, err) + if err := validate.Required("type", "body", m.Type); err != nil { + return err } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *GraphType) validateLabel(formats strfmt.Registry) error { +func (m *Graph) validateWeight(formats strfmt.Registry) error { - if err := validate.Required("type"+"."+"label", "body", m.Label); err != nil { - return err + if swag.IsZero(m.Weight) { // not required + return nil } - return nil -} - -func (m *GraphType) validateValue(formats strfmt.Registry) error { + if err := validate.MinimumInt("weight", "body", int64(*m.Weight), 0, false); err != nil { + return err + } - if err := validate.Required("type"+"."+"value", "body", m.Value); err != nil { + if err := validate.MaximumInt("weight", "body", int64(*m.Weight), 32767, false); err != nil { return err } @@ -246,7 +223,7 @@ func (m *GraphType) validateValue(formats strfmt.Registry) error { } // MarshalBinary interface implementation -func (m *GraphType) MarshalBinary() ([]byte, error) { +func (m *Graph) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -254,8 +231,8 @@ func (m *GraphType) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *GraphType) UnmarshalBinary(b []byte) error { - var res GraphType +func (m *Graph) UnmarshalBinary(b []byte) error { + var res Graph if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/netbox/models/image_attachment.go b/netbox/models/image_attachment.go index 8f2c5398f07028ce1bff6847ae5a38fbd002cbda..593ae9637e5232d4632d5e8154df84363c751e23 100644 --- a/netbox/models/image_attachment.go +++ b/netbox/models/image_attachment.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/interface_connection.go b/netbox/models/interface_connection.go index 4b0506fe71874b8a93a1282ce96f12a2756b5e34..686f59621927d1464fb8e92fdfd4a468a6027580 100644 --- a/netbox/models/interface_connection.go +++ b/netbox/models/interface_connection.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -35,11 +35,11 @@ type InterfaceConnection struct { ConnectionStatus *InterfaceConnectionConnectionStatus `json:"connection_status,omitempty"` // interface a - InterfaceA *NestedInterface `json:"interface_a,omitempty"` + Interfacea *NestedInterface `json:"interface_a,omitempty"` // interface b // Required: true - InterfaceB *NestedInterface `json:"interface_b"` + Interfaceb *NestedInterface `json:"interface_b"` } // Validate validates this interface connection @@ -50,11 +50,11 @@ func (m *InterfaceConnection) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateInterfaceA(formats); err != nil { + if err := m.validateInterfacea(formats); err != nil { res = append(res, err) } - if err := m.validateInterfaceB(formats); err != nil { + if err := m.validateInterfaceb(formats); err != nil { res = append(res, err) } @@ -82,14 +82,14 @@ func (m *InterfaceConnection) validateConnectionStatus(formats strfmt.Registry) return nil } -func (m *InterfaceConnection) validateInterfaceA(formats strfmt.Registry) error { +func (m *InterfaceConnection) validateInterfacea(formats strfmt.Registry) error { - if swag.IsZero(m.InterfaceA) { // not required + if swag.IsZero(m.Interfacea) { // not required return nil } - if m.InterfaceA != nil { - if err := m.InterfaceA.Validate(formats); err != 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") } @@ -100,14 +100,14 @@ func (m *InterfaceConnection) validateInterfaceA(formats strfmt.Registry) error return nil } -func (m *InterfaceConnection) validateInterfaceB(formats strfmt.Registry) error { +func (m *InterfaceConnection) validateInterfaceb(formats strfmt.Registry) error { - if err := validate.Required("interface_b", "body", m.InterfaceB); err != nil { + 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 m.Interfaceb != nil { + if err := m.Interfaceb.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("interface_b") } diff --git a/netbox/models/interface_template.go b/netbox/models/interface_template.go index f6a5fd24e9a4f65ea5a34dd95b44e21c5308f2a9..9da2b81f28c751cdcb8bb854a93d62e5386ef264 100644 --- a/netbox/models/interface_template.go +++ b/netbox/models/interface_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -35,9 +35,6 @@ type InterfaceTemplate struct { // Required: true DeviceType *NestedDeviceType `json:"device_type"` - // form factor - FormFactor *InterfaceTemplateFormFactor `json:"form_factor,omitempty"` - // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -63,10 +60,6 @@ func (m *InterfaceTemplate) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateFormFactor(formats); err != nil { - res = append(res, err) - } - if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -99,24 +92,6 @@ func (m *InterfaceTemplate) validateDeviceType(formats strfmt.Registry) error { return nil } -func (m *InterfaceTemplate) validateFormFactor(formats strfmt.Registry) error { - - if swag.IsZero(m.FormFactor) { // not required - return nil - } - - if m.FormFactor != nil { - if err := m.FormFactor.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("form_factor") - } - return err - } - } - - return nil -} - func (m *InterfaceTemplate) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -170,73 +145,6 @@ func (m *InterfaceTemplate) UnmarshalBinary(b []byte) error { return nil } -// InterfaceTemplateFormFactor Form factor -// swagger:model InterfaceTemplateFormFactor -type InterfaceTemplateFormFactor struct { - - // label - // Required: true - Label *string `json:"label"` - - // value - // Required: true - Value *int64 `json:"value"` -} - -// Validate validates this interface template form factor -func (m *InterfaceTemplateFormFactor) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLabel(formats); err != nil { - 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 -} - -func (m *InterfaceTemplateFormFactor) validateLabel(formats strfmt.Registry) error { - - if err := validate.Required("form_factor"+"."+"label", "body", m.Label); err != nil { - return err - } - - return nil -} - -func (m *InterfaceTemplateFormFactor) validateValue(formats strfmt.Registry) error { - - if err := validate.Required("form_factor"+"."+"value", "body", m.Value); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InterfaceTemplateFormFactor) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InterfaceTemplateFormFactor) UnmarshalBinary(b []byte) error { - var res InterfaceTemplateFormFactor - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - // InterfaceTemplateType Type // swagger:model InterfaceTemplateType type InterfaceTemplateType struct { @@ -247,7 +155,7 @@ type InterfaceTemplateType struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this interface template type diff --git a/netbox/models/inventory_item.go b/netbox/models/inventory_item.go index 0f84cae0af3311b0bc64c82eb229538d835b70d7..aeb7112b3ff3aba4122b8ec7cee4dc6576831e8c 100644 --- a/netbox/models/inventory_item.go +++ b/netbox/models/inventory_item.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/ip_address.go b/netbox/models/ip_address.go index b04660552478e87cc70eea5c401914df9846498b..811c3c450ddd8cc35da198ff16ca044ea88efbff 100644 --- a/netbox/models/ip_address.go +++ b/netbox/models/ip_address.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -55,7 +55,7 @@ type IPAddress struct { // // Hostname or FQDN (not case-sensitive) // Max Length: 255 - // Pattern: ^[0-9A-Za-z.-]+$ + // Pattern: ^[0-9A-Za-z._-]+$ DNSName string `json:"dns_name,omitempty"` // family @@ -206,7 +206,7 @@ func (m *IPAddress) validateDNSName(formats strfmt.Registry) error { return err } - if err := validate.Pattern("dns_name", "body", string(m.DNSName), `^[0-9A-Za-z.-]+$`); err != nil { + if err := validate.Pattern("dns_name", "body", string(m.DNSName), `^[0-9A-Za-z._-]+$`); err != nil { return err } @@ -415,7 +415,7 @@ type IPAddressFamily struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this IP address family @@ -482,7 +482,7 @@ type IPAddressRole struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this IP address role @@ -549,7 +549,7 @@ type IPAddressStatus struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this IP address status diff --git a/netbox/models/ip_address_interface.go b/netbox/models/ip_address_interface.go index 44fe3fc6a8742b7581561d38e9cfecc3081cc845..537779a2530bb8b1e32c8508159bd6219a802107 100644 --- a/netbox/models/ip_address_interface.go +++ b/netbox/models/ip_address_interface.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/manufacturer.go b/netbox/models/manufacturer.go index 7b675f3a9ae92324417c94dae6a177c84061e01a..3955c8637ea34dc73cc7f5ced3806c86f5bc7d04 100644 --- a/netbox/models/manufacturer.go +++ b/netbox/models/manufacturer.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_cable.go b/netbox/models/nested_cable.go index cd1e71c46716a81304d76b97c191edc9047ec425..c14928a37552e056cb6c0569a90f699977ffa3d8 100644 --- a/netbox/models/nested_cable.go +++ b/netbox/models/nested_cable.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_circuit.go b/netbox/models/nested_circuit.go index 941726be7aa4989595f8d5960b1286d68c844dd9..891535f3f9dd97a2f972749811b7ffef668f5c4a 100644 --- a/netbox/models/nested_circuit.go +++ b/netbox/models/nested_circuit.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_circuit_type.go b/netbox/models/nested_circuit_type.go index 2245e2748babea9f581f8d2972822a94bf3f5112..451d102999ecc9d0ef000374aac5953aa8c08db0 100644 --- a/netbox/models/nested_circuit_type.go +++ b/netbox/models/nested_circuit_type.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_cluster.go b/netbox/models/nested_cluster.go index 8fcee75099c9176beae9f2893e4fd85b053dcb8a..55b3b4c799996117384dcd22e4f7a811e1eea704 100644 --- a/netbox/models/nested_cluster.go +++ b/netbox/models/nested_cluster.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_cluster_group.go b/netbox/models/nested_cluster_group.go index 259bfa4db9319b17d45a147a9b3f0375722a242a..25d20cef80acdb4b3766a6df155dac91a078cb8e 100644 --- a/netbox/models/nested_cluster_group.go +++ b/netbox/models/nested_cluster_group.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_cluster_type.go b/netbox/models/nested_cluster_type.go index f2cd153852d095759d592a58bee55180389e3e65..0109b40a1acdd5ac0d530bd9e7bc9c94705de396 100644 --- a/netbox/models/nested_cluster_type.go +++ b/netbox/models/nested_cluster_type.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_device.go b/netbox/models/nested_device.go index 470da014b356ec3c6755d399a062fbf290370dee..48c0b4933a252c99ff84f538d2ecdc78c1fa07cc 100644 --- a/netbox/models/nested_device.go +++ b/netbox/models/nested_device.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,14 +21,13 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) -// NestedDevice Parent device +// NestedDevice Device // swagger:model NestedDevice type NestedDevice struct { diff --git a/netbox/models/nested_device_role.go b/netbox/models/nested_device_role.go index b8dd66d6a0fa9c8fc04bec88eaf90e173b026627..11f59403d55b5ebdd30deaa3fe0bea4691f48289 100644 --- a/netbox/models/nested_device_role.go +++ b/netbox/models/nested_device_role.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_device_type.go b/netbox/models/nested_device_type.go index 2b8a6e516c440db6d7818a9d8db66afac512eb49..2d208d9f1b7ff756c131ea452ffbeeacfe5987f2 100644 --- a/netbox/models/nested_device_type.go +++ b/netbox/models/nested_device_type.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_interface.go b/netbox/models/nested_interface.go index 46c86336bf6538f7539b3939df9c34390166e2f4..f11cbd6eab68c3881c0a3b503fd242193a96b477 100644 --- a/netbox/models/nested_interface.go +++ b/netbox/models/nested_interface.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,14 +21,13 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) -// NestedInterface Interface a +// NestedInterface Connected endpoint // swagger:model NestedInterface type NestedInterface struct { diff --git a/netbox/models/nested_ip_address.go b/netbox/models/nested_ip_address.go index 48eba6e99037f143247072a94c442a1dfbb95e53..17b45f9261f82da594365f211d48c539ee92d615 100644 --- a/netbox/models/nested_ip_address.go +++ b/netbox/models/nested_ip_address.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_manufacturer.go b/netbox/models/nested_manufacturer.go index ef3a6af07d58ea566e7182cfe3e0c846a2f60740..922d1408dfc080f4f9422cbd517b6e96cd328fad 100644 --- a/netbox/models/nested_manufacturer.go +++ b/netbox/models/nested_manufacturer.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_platform.go b/netbox/models/nested_platform.go index bc218c07a106e5a662531d19f2e00fbe7b086b9a..57f60d92e3588cb014f3be1cb6266ae4487c3053 100644 --- a/netbox/models/nested_platform.go +++ b/netbox/models/nested_platform.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -41,13 +41,13 @@ type NestedPlatform struct { // Name // Required: true - // Max Length: 50 + // Max Length: 100 // Min Length: 1 Name *string `json:"name"` // Slug // Required: true - // Max Length: 50 + // Max Length: 100 // Min Length: 1 // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` @@ -94,7 +94,7 @@ func (m *NestedPlatform) validateName(formats strfmt.Registry) error { return err } - if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil { + if err := validate.MaxLength("name", "body", string(*m.Name), 100); err != nil { return err } @@ -111,7 +111,7 @@ func (m *NestedPlatform) validateSlug(formats strfmt.Registry) error { return err } - if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil { + if err := validate.MaxLength("slug", "body", string(*m.Slug), 100); err != nil { return err } diff --git a/netbox/models/nested_power_panel.go b/netbox/models/nested_power_panel.go index 51d8c219531cf39dea32acfe7c6d56f17c0a8211..5c4263582a4bcf128f74bfa455a7e9af57caa3ee 100644 --- a/netbox/models/nested_power_panel.go +++ b/netbox/models/nested_power_panel.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_power_port.go b/netbox/models/nested_power_port.go index 9a9a7911acd05e60a2b7d74b56ca349f943f5866..89c12d6af3eb1c6f92be52b0927632e22ee4c7f3 100644 --- a/netbox/models/nested_power_port.go +++ b/netbox/models/nested_power_port.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_provider.go b/netbox/models/nested_provider.go index 088580d34bff3eb02e9b14f53fc1649b9bea3899..b75042313d6575fa42779097ac19dd08b441e362 100644 --- a/netbox/models/nested_provider.go +++ b/netbox/models/nested_provider.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_rir.go b/netbox/models/nested_r_i_r.go similarity index 99% rename from netbox/models/nested_rir.go rename to netbox/models/nested_r_i_r.go index 5812f5336eb358e292239d9d8419c8c7bd32cc0c..90456987ec339fb5394e19bd3b6791b76adc306a 100644 --- a/netbox/models/nested_rir.go +++ b/netbox/models/nested_r_i_r.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_rack.go b/netbox/models/nested_rack.go index 41a375e910735a8f2c1139487a4c6fef00bf35bf..11ca24c56cbb9ab5e14741c035070507c3c26b45 100644 --- a/netbox/models/nested_rack.go +++ b/netbox/models/nested_rack.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_rack_group.go b/netbox/models/nested_rack_group.go index aee150df1b98b92db5bdfb9ef68e3bbe8aa102a5..1010e64c69d0991f69a90924184e59e69da6d1f0 100644 --- a/netbox/models/nested_rack_group.go +++ b/netbox/models/nested_rack_group.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_rack_role.go b/netbox/models/nested_rack_role.go index 5dff60c83cfe372e3ae0290168e13bf67ca09a00..335f3978b744e5aca6b150e62f04dd7de0141cc8 100644 --- a/netbox/models/nested_rack_role.go +++ b/netbox/models/nested_rack_role.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_rear_port_template.go b/netbox/models/nested_rear_port_template.go index 62443550b37283948a72735b4197a54b649f5cbf..12c42264aff4a74d4241c5e52e979f89392bbd73 100644 --- a/netbox/models/nested_rear_port_template.go +++ b/netbox/models/nested_rear_port_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_region.go b/netbox/models/nested_region.go index 603f27c3dd5cf2cf4acb76a9629abd98e219904f..fa741abe13f68a509dc87b27435cf7517772ebbe 100644 --- a/netbox/models/nested_region.go +++ b/netbox/models/nested_region.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_role.go b/netbox/models/nested_role.go index 85ff46674af334cee6b6f323085e0795164ea2fa..a78d3849077fb45866a3a4be49b759d9b2844bfd 100644 --- a/netbox/models/nested_role.go +++ b/netbox/models/nested_role.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_secret_role.go b/netbox/models/nested_secret_role.go index dbdd4e2ca70f9ac0a39a5bb245cded7fe3b158bc..afbaf7689ca09fc2ff182b8d3e72db4f6e841cd0 100644 --- a/netbox/models/nested_secret_role.go +++ b/netbox/models/nested_secret_role.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_site.go b/netbox/models/nested_site.go index a843c3880983457781e87c03f49103db8300b5d4..4e0708d0f5d8f8478893594dbb72dbadabc0714a 100644 --- a/netbox/models/nested_site.go +++ b/netbox/models/nested_site.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_tenant.go b/netbox/models/nested_tenant.go index 5aad4dd070c845e730825905853e911a1abac395..fa95f6cf410fbd11a2e2b53b53b2fa2609d1b657 100644 --- a/netbox/models/nested_tenant.go +++ b/netbox/models/nested_tenant.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_tenant_group.go b/netbox/models/nested_tenant_group.go index 8d303b441172cdf06aefa02ef1a355cb2958703c..e32eccb22f3fa01fdf1f9f9653a2d00fc605bba6 100644 --- a/netbox/models/nested_tenant_group.go +++ b/netbox/models/nested_tenant_group.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_user.go b/netbox/models/nested_user.go index 6ad9ff192b99cbb255ab283f5c31d5f9c1c9aadc..74f3f5cdf706ffd2644a09d529adfe263aab4ab6 100644 --- a/netbox/models/nested_user.go +++ b/netbox/models/nested_user.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_vlan.go b/netbox/models/nested_v_l_a_n.go similarity index 99% rename from netbox/models/nested_vlan.go rename to netbox/models/nested_v_l_a_n.go index 041ba48fef789816a54a71808ee4970896ad440c..f96ca19bd6fa7e130c1c11a13987e8a80d7718cc 100644 --- a/netbox/models/nested_vlan.go +++ b/netbox/models/nested_v_l_a_n.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_vlan_group.go b/netbox/models/nested_v_l_a_n_group.go similarity index 99% rename from netbox/models/nested_vlan_group.go rename to netbox/models/nested_v_l_a_n_group.go index d146197d4aa686fae623e0a88c9d2f8a30a2b4d7..2c8f265590a5f1468837e82d99b7d4dc25d26e95 100644 --- a/netbox/models/nested_vlan_group.go +++ b/netbox/models/nested_v_l_a_n_group.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_vrf.go b/netbox/models/nested_v_r_f.go similarity index 99% rename from netbox/models/nested_vrf.go rename to netbox/models/nested_v_r_f.go index 902ad66b413c809284f3602c18376a4dbc9eaf83..2f0fd1309f249af1608c3e904caf59e87bfef768 100644 --- a/netbox/models/nested_vrf.go +++ b/netbox/models/nested_v_r_f.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_virtual_chassis.go b/netbox/models/nested_virtual_chassis.go index 49294b6e178d4b8a91c58f1d7a4ffdc55cc34df1..7d7f12d730ea0b8fc6d3c0af4a302b9c88fcd140 100644 --- a/netbox/models/nested_virtual_chassis.go +++ b/netbox/models/nested_virtual_chassis.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/nested_virtual_machine.go b/netbox/models/nested_virtual_machine.go index 5149b5079386df7f3d18a5e5c69ff91c68209976..6361140e10b77c528bcb45141ff947e6a3e27ab7 100644 --- a/netbox/models/nested_virtual_machine.go +++ b/netbox/models/nested_virtual_machine.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/object_change.go b/netbox/models/object_change.go index 3b2f3082f80b6a7a9ed764fed0ab559fb65431a0..9b24fcd242b73054d49a0e850fad590a27174b2a 100644 --- a/netbox/models/object_change.go +++ b/netbox/models/object_change.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -42,6 +42,12 @@ type ObjectChange struct { // Read Only: true ChangedObject map[string]string `json:"changed_object,omitempty"` + // Changed object id + // Required: true + // Maximum: 2.147483647e+09 + // Minimum: 0 + ChangedObjectID *int64 `json:"changed_object_id"` + // Changed object type // Read Only: true ChangedObjectType string `json:"changed_object_type,omitempty"` @@ -81,6 +87,10 @@ func (m *ObjectChange) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateChangedObjectID(formats); err != nil { + res = append(res, err) + } + if err := m.validateRequestID(formats); err != nil { res = append(res, err) } @@ -121,6 +131,23 @@ func (m *ObjectChange) validateAction(formats strfmt.Registry) error { return nil } +func (m *ObjectChange) validateChangedObjectID(formats strfmt.Registry) error { + + if err := validate.Required("changed_object_id", "body", m.ChangedObjectID); err != nil { + return err + } + + if err := validate.MinimumInt("changed_object_id", "body", int64(*m.ChangedObjectID), 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("changed_object_id", "body", int64(*m.ChangedObjectID), 2.147483647e+09, false); err != nil { + return err + } + + return nil +} + func (m *ObjectChange) validateRequestID(formats strfmt.Registry) error { if swag.IsZero(m.RequestID) { // not required @@ -206,7 +233,7 @@ type ObjectChangeAction struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this object change action diff --git a/netbox/models/platform.go b/netbox/models/platform.go index e3fc8aad79f6d3f997caf3d4ca78611393469828..fbedf210b01625d0edfb69b3c96ce638cd987b79 100644 --- a/netbox/models/platform.go +++ b/netbox/models/platform.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -44,7 +44,7 @@ type Platform struct { // Name // Required: true - // Max Length: 50 + // Max Length: 100 // Min Length: 1 Name *string `json:"name"` @@ -61,7 +61,7 @@ type Platform struct { // Slug // Required: true - // Max Length: 50 + // Max Length: 100 // Min Length: 1 // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` @@ -125,7 +125,7 @@ func (m *Platform) validateName(formats strfmt.Registry) error { return err } - if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil { + if err := validate.MaxLength("name", "body", string(*m.Name), 100); err != nil { return err } @@ -155,7 +155,7 @@ func (m *Platform) validateSlug(formats strfmt.Registry) error { return err } - if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil { + if err := validate.MaxLength("slug", "body", string(*m.Slug), 100); err != nil { return err } diff --git a/netbox/models/power_feed.go b/netbox/models/power_feed.go index e0de038abdba50f7b1a9622c6c1fdce5ea8adf21..ce81aebfe3d404145fb4914e60c0122a571f1f09 100644 --- a/netbox/models/power_feed.go +++ b/netbox/models/power_feed.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -409,13 +409,13 @@ type PowerFeedPhase struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } func (m *PowerFeedPhase) UnmarshalJSON(b []byte) error { type PowerFeedPhaseAlias PowerFeedPhase var t PowerFeedPhaseAlias - if err := json.Unmarshal([]byte("{\"label\":\"Single phase\",\"value\":1}"), &t); err != nil { + if err := json.Unmarshal([]byte("{\"id\":1,\"label\":\"Single phase\",\"value\":\"single-phase\"}"), &t); err != nil { return err } if err := json.Unmarshal(b, &t); err != nil { @@ -489,13 +489,13 @@ type PowerFeedStatus struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } func (m *PowerFeedStatus) UnmarshalJSON(b []byte) error { type PowerFeedStatusAlias PowerFeedStatus var t PowerFeedStatusAlias - if err := json.Unmarshal([]byte("{\"label\":\"Active\",\"value\":1}"), &t); err != nil { + if err := json.Unmarshal([]byte("{\"id\":1,\"label\":\"Active\",\"value\":\"active\"}"), &t); err != nil { return err } if err := json.Unmarshal(b, &t); err != nil { @@ -569,13 +569,13 @@ type PowerFeedSupply struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } func (m *PowerFeedSupply) UnmarshalJSON(b []byte) error { type PowerFeedSupplyAlias PowerFeedSupply var t PowerFeedSupplyAlias - if err := json.Unmarshal([]byte("{\"label\":\"AC\",\"value\":1}"), &t); err != nil { + if err := json.Unmarshal([]byte("{\"id\":1,\"label\":\"AC\",\"value\":\"ac\"}"), &t); err != nil { return err } if err := json.Unmarshal(b, &t); err != nil { @@ -649,13 +649,13 @@ type PowerFeedType struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } func (m *PowerFeedType) UnmarshalJSON(b []byte) error { type PowerFeedTypeAlias PowerFeedType var t PowerFeedTypeAlias - if err := json.Unmarshal([]byte("{\"label\":\"Primary\",\"value\":1}"), &t); err != nil { + if err := json.Unmarshal([]byte("{\"id\":1,\"label\":\"Primary\",\"value\":\"primary\"}"), &t); err != nil { return err } if err := json.Unmarshal(b, &t); err != nil { diff --git a/netbox/models/power_outlet.go b/netbox/models/power_outlet.go index 71153834986ef01c22fb8089ff0a2085893daaf6..a483119a44b9887560ae1f49acb3bc0b3a1baf18 100644 --- a/netbox/models/power_outlet.go +++ b/netbox/models/power_outlet.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -77,6 +77,9 @@ type PowerOutlet struct { // tags Tags []string `json:"tags"` + + // type + Type *PowerOutletType `json:"type,omitempty"` } // Validate validates this power outlet @@ -115,6 +118,10 @@ func (m *PowerOutlet) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -258,6 +265,24 @@ func (m *PowerOutlet) validateTags(formats strfmt.Registry) error { return nil } +func (m *PowerOutlet) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *PowerOutlet) MarshalBinary() ([]byte, error) { if m == nil { @@ -353,7 +378,7 @@ type PowerOutletFeedLeg struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this power outlet feed leg @@ -409,3 +434,70 @@ func (m *PowerOutletFeedLeg) UnmarshalBinary(b []byte) error { *m = res return nil } + +// PowerOutletType Type +// swagger:model PowerOutletType +type PowerOutletType struct { + + // label + // Required: true + Label *string `json:"label"` + + // value + // Required: true + Value *string `json:"value"` +} + +// Validate validates this power outlet type +func (m *PowerOutletType) 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 +} + +func (m *PowerOutletType) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"label", "body", m.Label); err != nil { + return err + } + + return nil +} + +func (m *PowerOutletType) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"value", "body", m.Value); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PowerOutletType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PowerOutletType) UnmarshalBinary(b []byte) error { + var res PowerOutletType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/power_outlet_template.go b/netbox/models/power_outlet_template.go index 804cc9f1bbd67f425a2083dd6723c0a8dd614637..f6248ae7595340958c9af40b92f5e3f7be725d26 100644 --- a/netbox/models/power_outlet_template.go +++ b/netbox/models/power_outlet_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -50,6 +50,9 @@ type PowerOutletTemplate struct { // power port PowerPort *PowerPortTemplate `json:"power_port,omitempty"` + + // type + Type *PowerOutletTemplateType `json:"type,omitempty"` } // Validate validates this power outlet template @@ -72,6 +75,10 @@ func (m *PowerOutletTemplate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -149,6 +156,24 @@ func (m *PowerOutletTemplate) validatePowerPort(formats strfmt.Registry) error { return nil } +func (m *PowerOutletTemplate) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *PowerOutletTemplate) MarshalBinary() ([]byte, error) { if m == nil { @@ -177,7 +202,7 @@ type PowerOutletTemplateFeedLeg struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this power outlet template feed leg @@ -233,3 +258,70 @@ func (m *PowerOutletTemplateFeedLeg) UnmarshalBinary(b []byte) error { *m = res return nil } + +// PowerOutletTemplateType Type +// swagger:model PowerOutletTemplateType +type PowerOutletTemplateType struct { + + // label + // Required: true + Label *string `json:"label"` + + // value + // Required: true + Value *string `json:"value"` +} + +// Validate validates this power outlet template type +func (m *PowerOutletTemplateType) 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 +} + +func (m *PowerOutletTemplateType) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"label", "body", m.Label); err != nil { + return err + } + + return nil +} + +func (m *PowerOutletTemplateType) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"value", "body", m.Value); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PowerOutletTemplateType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PowerOutletTemplateType) UnmarshalBinary(b []byte) error { + var res PowerOutletTemplateType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/power_panel.go b/netbox/models/power_panel.go index 237fca33ada4996c9a914b94fbfe5393ad1bcc0f..c571fb57996753d3d04e61608cbe427b094ca211 100644 --- a/netbox/models/power_panel.go +++ b/netbox/models/power_panel.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/power_port.go b/netbox/models/power_port.go index 209303928929bde1327ee96a991bd442493a08de..688c57f85178ec97fddb2baac86bc8ca1cac7032 100644 --- a/netbox/models/power_port.go +++ b/netbox/models/power_port.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -35,7 +35,7 @@ type PowerPort struct { // Allocated draw // - // Allocated current draw (watts) + // Allocated power draw (watts) // Maximum: 32767 // Minimum: 1 AllocatedDraw *int64 `json:"allocated_draw,omitempty"` @@ -72,7 +72,7 @@ type PowerPort struct { // Maximum draw // - // Maximum current draw (watts) + // Maximum power draw (watts) // Maximum: 32767 // Minimum: 1 MaximumDraw *int64 `json:"maximum_draw,omitempty"` @@ -85,6 +85,9 @@ type PowerPort struct { // tags Tags []string `json:"tags"` + + // type + Type *PowerPortType `json:"type,omitempty"` } // Validate validates this power port @@ -123,6 +126,10 @@ func (m *PowerPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -264,6 +271,24 @@ func (m *PowerPort) validateTags(formats strfmt.Registry) error { return nil } +func (m *PowerPort) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *PowerPort) MarshalBinary() ([]byte, error) { if m == nil { @@ -348,3 +373,70 @@ func (m *PowerPortConnectionStatus) UnmarshalBinary(b []byte) error { *m = res return nil } + +// PowerPortType Type +// swagger:model PowerPortType +type PowerPortType struct { + + // label + // Required: true + Label *string `json:"label"` + + // value + // Required: true + Value *string `json:"value"` +} + +// Validate validates this power port type +func (m *PowerPortType) 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 +} + +func (m *PowerPortType) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"label", "body", m.Label); err != nil { + return err + } + + return nil +} + +func (m *PowerPortType) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"value", "body", m.Value); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PowerPortType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PowerPortType) UnmarshalBinary(b []byte) error { + var res PowerPortType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/power_port_template.go b/netbox/models/power_port_template.go index 5cf748011f01c416a2256cc7979b8b8c64e5f493..7b5eca472f96d8ec5bfb503d1d7c61c8d946763a 100644 --- a/netbox/models/power_port_template.go +++ b/netbox/models/power_port_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -33,7 +33,7 @@ type PowerPortTemplate struct { // Allocated draw // - // Allocated current draw (watts) + // Allocated power draw (watts) // Maximum: 32767 // Minimum: 1 AllocatedDraw *int64 `json:"allocated_draw,omitempty"` @@ -48,7 +48,7 @@ type PowerPortTemplate struct { // Maximum draw // - // Maximum current draw (watts) + // Maximum power draw (watts) // Maximum: 32767 // Minimum: 1 MaximumDraw *int64 `json:"maximum_draw,omitempty"` @@ -58,6 +58,9 @@ type PowerPortTemplate struct { // Max Length: 50 // Min Length: 1 Name *string `json:"name"` + + // type + Type *PowerPortTemplateType `json:"type,omitempty"` } // Validate validates this power port template @@ -80,6 +83,10 @@ func (m *PowerPortTemplate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -155,6 +162,24 @@ func (m *PowerPortTemplate) validateName(formats strfmt.Registry) error { return nil } +func (m *PowerPortTemplate) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *PowerPortTemplate) MarshalBinary() ([]byte, error) { if m == nil { @@ -172,3 +197,70 @@ func (m *PowerPortTemplate) UnmarshalBinary(b []byte) error { *m = res return nil } + +// PowerPortTemplateType Type +// swagger:model PowerPortTemplateType +type PowerPortTemplateType struct { + + // label + // Required: true + Label *string `json:"label"` + + // value + // Required: true + Value *string `json:"value"` +} + +// Validate validates this power port template type +func (m *PowerPortTemplateType) 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 +} + +func (m *PowerPortTemplateType) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"label", "body", m.Label); err != nil { + return err + } + + return nil +} + +func (m *PowerPortTemplateType) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"value", "body", m.Value); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PowerPortTemplateType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PowerPortTemplateType) UnmarshalBinary(b []byte) error { + var res PowerPortTemplateType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/prefix.go b/netbox/models/prefix.go index 6c8a42328a5e073963926a82974e654218140cc7..b39adfce1656e6c457ea5bcce75b3fdaf4d43f32 100644 --- a/netbox/models/prefix.go +++ b/netbox/models/prefix.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -367,7 +367,7 @@ type PrefixFamily struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this prefix family @@ -434,7 +434,7 @@ type PrefixStatus struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this prefix status diff --git a/netbox/models/provider.go b/netbox/models/provider.go index 370b04f0844003a21975ef35d13d79ae8317a873..30e16ccb8d5aafbc918a50fbd7e8ffb4ff75c7e4 100644 --- a/netbox/models/provider.go +++ b/netbox/models/provider.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/rir.go b/netbox/models/r_i_r.go similarity index 99% rename from netbox/models/rir.go rename to netbox/models/r_i_r.go index ee70133014e842f66a9c0384cd88329ee4768ef2..06df9273945c8cda65d5b8eaa4c720602cbd4229 100644 --- a/netbox/models/rir.go +++ b/netbox/models/r_i_r.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/rack.go b/netbox/models/rack.go index 4e608cef5e0afd46964595d5cbaa95f3bb2276dc..63791dc03e72a87f6f1ba8fc69d87870a20936b8 100644 --- a/netbox/models/rack.go +++ b/netbox/models/rack.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -538,7 +538,7 @@ type RackOuterUnit struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this rack outer unit @@ -605,7 +605,7 @@ type RackStatus struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this rack status @@ -672,7 +672,7 @@ type RackType struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this rack type @@ -739,7 +739,7 @@ type RackWidth struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this rack width diff --git a/netbox/models/rack_group.go b/netbox/models/rack_group.go index 05a67bb4f23259f4ebfad6ede801c74504b4558d..7ae7942554d6fcbb84605e253bfbda5c8ff55407 100644 --- a/netbox/models/rack_group.go +++ b/netbox/models/rack_group.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/rack_reservation.go b/netbox/models/rack_reservation.go index 618403338a08986ac90fddc454e2d5190fdf94c4..158157c921b5fc95230fc496116677322f63a08d 100644 --- a/netbox/models/rack_reservation.go +++ b/netbox/models/rack_reservation.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/rack_role.go b/netbox/models/rack_role.go index 7f4c78366c771f2eeb4a74bc2d4c29ae64082f35..50509a200d3306ceebd9f58405c2be2f7e1e63f0 100644 --- a/netbox/models/rack_role.go +++ b/netbox/models/rack_role.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -38,6 +38,10 @@ type RackRole struct { // Pattern: ^[0-9a-f]{6}$ Color *string `json:"color"` + // Description + // Max Length: 100 + Description string `json:"description,omitempty"` + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -68,6 +72,10 @@ func (m *RackRole) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -103,6 +111,19 @@ func (m *RackRole) validateColor(formats strfmt.Registry) error { return nil } +func (m *RackRole) validateDescription(formats strfmt.Registry) error { + + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil { + return err + } + + return nil +} + func (m *RackRole) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { diff --git a/netbox/models/rack_unit.go b/netbox/models/rack_unit.go new file mode 100644 index 0000000000000000000000000000000000000000..78e2c26d5d60cadeb7e509e4949409bc3611e158 --- /dev/null +++ b/netbox/models/rack_unit.go @@ -0,0 +1,204 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2018 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RackUnit rack unit +// swagger:model RackUnit +type RackUnit struct { + + // device + Device *NestedDevice `json:"device,omitempty"` + + // face + Face *RackUnitFace `json:"face,omitempty"` + + // Id + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Name + // Read Only: true + // Min Length: 1 + Name string `json:"name,omitempty"` +} + +// Validate validates this rack unit +func (m *RackUnit) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDevice(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFace(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RackUnit) validateDevice(formats strfmt.Registry) error { + + if swag.IsZero(m.Device) { // not required + return nil + } + + if m.Device != nil { + if err := m.Device.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device") + } + return err + } + } + + return nil +} + +func (m *RackUnit) validateFace(formats strfmt.Registry) error { + + if swag.IsZero(m.Face) { // not required + return nil + } + + if m.Face != nil { + if err := m.Face.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("face") + } + return err + } + } + + return nil +} + +func (m *RackUnit) validateName(formats strfmt.Registry) error { + + if swag.IsZero(m.Name) { // not required + return nil + } + + if err := validate.MinLength("name", "body", string(m.Name), 1); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RackUnit) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RackUnit) UnmarshalBinary(b []byte) error { + var res RackUnit + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// RackUnitFace Face +// swagger:model RackUnitFace +type RackUnitFace struct { + + // label + // Required: true + Label *string `json:"label"` + + // value + // Required: true + Value *string `json:"value"` +} + +// Validate validates this rack unit face +func (m *RackUnitFace) 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 +} + +func (m *RackUnitFace) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("face"+"."+"label", "body", m.Label); err != nil { + return err + } + + return nil +} + +func (m *RackUnitFace) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("face"+"."+"value", "body", m.Value); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RackUnitFace) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RackUnitFace) UnmarshalBinary(b []byte) error { + var res RackUnitFace + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/rear_port.go b/netbox/models/rear_port.go index 889b26cbf8268cbcbb03ccc2844fde280935f582..4f947736896f32ed1fa47e8d5eb361459a6dc634 100644 --- a/netbox/models/rear_port.go +++ b/netbox/models/rear_port.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -251,7 +251,7 @@ type RearPortType struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this rear port type diff --git a/netbox/models/rear_port_template.go b/netbox/models/rear_port_template.go index 5f90a08d6a39e8c81c3e26753c0df621cdba6c09..2f42c767e76f95e9fd35b7b081f088dec7110126 100644 --- a/netbox/models/rear_port_template.go +++ b/netbox/models/rear_port_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -179,7 +179,7 @@ type RearPortTemplateType struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this rear port template type diff --git a/netbox/models/region.go b/netbox/models/region.go index 18ac7c84b89b338dc4f8e186da7d1df53fb43b08..a46ac88929e2e1d487da49c75d26555c6b618f9b 100644 --- a/netbox/models/region.go +++ b/netbox/models/region.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/role.go b/netbox/models/role.go index e787f26aa63e9fcd1fa9c6ec0244e272879c086f..66da646b78150f8cbc255fc18eae41e241e943d6 100644 --- a/netbox/models/role.go +++ b/netbox/models/role.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -31,6 +31,10 @@ import ( // swagger:model Role type Role struct { + // Description + // Max Length: 100 + Description string `json:"description,omitempty"` + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -66,6 +70,10 @@ type Role struct { func (m *Role) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -84,6 +92,19 @@ func (m *Role) Validate(formats strfmt.Registry) error { return nil } +func (m *Role) validateDescription(formats strfmt.Registry) error { + + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil { + return err + } + + return nil +} + func (m *Role) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { diff --git a/netbox/models/secret.go b/netbox/models/secret.go index 0c7017bd514b8bb882cfa23734d737ee423defc0..899250eb3b540af6bf963e6f74ad77b71668798f 100644 --- a/netbox/models/secret.go +++ b/netbox/models/secret.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/secret_role.go b/netbox/models/secret_role.go index fd3bb964850ac0a539d167fa3c7b52d8a0fa4066..c68ef52f239cab407537d7b8ee0468058cc603cc 100644 --- a/netbox/models/secret_role.go +++ b/netbox/models/secret_role.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -31,6 +31,10 @@ import ( // swagger:model SecretRole type SecretRole struct { + // Description + // Max Length: 100 + Description string `json:"description,omitempty"` + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -57,6 +61,10 @@ type SecretRole struct { func (m *SecretRole) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -71,6 +79,19 @@ func (m *SecretRole) Validate(formats strfmt.Registry) error { return nil } +func (m *SecretRole) validateDescription(formats strfmt.Registry) error { + + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil { + return err + } + + return nil +} + func (m *SecretRole) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { diff --git a/netbox/models/service.go b/netbox/models/service.go index fb39e499373412530abfae74b4bce2eced6668fb..b60b01919e281949f8e2cd8c8e485ac11bf25819 100644 --- a/netbox/models/service.go +++ b/netbox/models/service.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -311,7 +311,7 @@ type ServiceProtocol struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this service protocol diff --git a/netbox/models/site.go b/netbox/models/site.go index 26716c2b5563b3c10c43077906d79b3a48c85177..0aadb424657beab90a802f81fe069b9cbc29efd8 100644 --- a/netbox/models/site.go +++ b/netbox/models/site.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -495,7 +495,7 @@ type SiteStatus struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this site status diff --git a/netbox/models/tag.go b/netbox/models/tag.go index 4e0dcf117e93b94a666eabc66b69a3fc3323e61d..0f054291e47dde2d6cc01f8fdebb725c698f6aa2 100644 --- a/netbox/models/tag.go +++ b/netbox/models/tag.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/tenant.go b/netbox/models/tenant.go index 77ce0be3f149244585311f9f022666b7e24ab104..889c08409f4eda2be1fda127e9376c94d0c56752 100644 --- a/netbox/models/tenant.go +++ b/netbox/models/tenant.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -37,6 +37,10 @@ type Tenant struct { // Read Only: true CircuitCount int64 `json:"circuit_count,omitempty"` + // Cluster count + // Read Only: true + ClusterCount int64 `json:"cluster_count,omitempty"` + // Comments Comments string `json:"comments,omitempty"` diff --git a/netbox/models/tenant_group.go b/netbox/models/tenant_group.go index 2f4141da1dd4c457c49077a5396b5030b78071a5..be9a06552f9837ff00a983d0a8413a6124cde9c3 100644 --- a/netbox/models/tenant_group.go +++ b/netbox/models/tenant_group.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/termination.go b/netbox/models/termination.go deleted file mode 100644 index 8e579380561126fc9c1666c5ad51e54e147b8494..0000000000000000000000000000000000000000 --- a/netbox/models/termination.go +++ /dev/null @@ -1,14 +0,0 @@ -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// Termination connected_endpoint -// swagger:model ConnectedEndpoint -type Termination struct { - ID uint64 `json:"id,omitempty"` - URL string `json:"url,omitempty"` - Circuit *Circuit `json:"circuit,omitempty"` - Name string `json:"name,omitempty"` - Cable uint64 `json:"cable,omitempty"` -} diff --git a/netbox/models/topology_map.go b/netbox/models/topology_map.go deleted file mode 100644 index 92dd9e49ce0dde431941c9d6e65e96ef345c8e43..0000000000000000000000000000000000000000 --- a/netbox/models/topology_map.go +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TopologyMap topology map -// swagger:model TopologyMap -type TopologyMap struct { - - // Description - // Max Length: 100 - Description string `json:"description,omitempty"` - - // Device patterns - // - // Identify devices to include in the diagram using regular expressions, one per line. Each line will result in a new tier of the drawing. Separate multiple regexes within a line using semicolons. Devices will be rendered in the order they are defined. - // Required: true - // Min Length: 1 - DevicePatterns *string `json:"device_patterns"` - - // ID - // Read Only: true - ID int64 `json:"id,omitempty"` - - // Name - // Required: true - // Max Length: 50 - // Min Length: 1 - Name *string `json:"name"` - - // site - // Required: true - Site *NestedSite `json:"site"` - - // Slug - // Required: true - // Max Length: 50 - // Min Length: 1 - // Pattern: ^[-a-zA-Z0-9_]+$ - Slug *string `json:"slug"` -} - -// Validate validates this topology map -func (m *TopologyMap) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDescription(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDevicePatterns(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSite(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSlug(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TopologyMap) validateDescription(formats strfmt.Registry) error { - - if swag.IsZero(m.Description) { // not required - return nil - } - - if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil { - return err - } - - return nil -} - -func (m *TopologyMap) validateDevicePatterns(formats strfmt.Registry) error { - - if err := validate.Required("device_patterns", "body", m.DevicePatterns); err != nil { - return err - } - - if err := validate.MinLength("device_patterns", "body", string(*m.DevicePatterns), 1); err != nil { - return err - } - - return nil -} - -func (m *TopologyMap) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - if err := validate.MinLength("name", "body", string(*m.Name), 1); err != nil { - return err - } - - if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil { - return err - } - - return nil -} - -func (m *TopologyMap) validateSite(formats strfmt.Registry) error { - - if err := validate.Required("site", "body", m.Site); err != nil { - return err - } - - if m.Site != nil { - if err := m.Site.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("site") - } - return err - } - } - - return nil -} - -func (m *TopologyMap) validateSlug(formats strfmt.Registry) error { - - if err := validate.Required("slug", "body", m.Slug); err != nil { - return err - } - - if err := validate.MinLength("slug", "body", string(*m.Slug), 1); err != nil { - return err - } - - if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil { - return err - } - - if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TopologyMap) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TopologyMap) UnmarshalBinary(b []byte) error { - var res TopologyMap - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/netbox/models/vlan.go b/netbox/models/v_l_a_n.go similarity index 99% rename from netbox/models/vlan.go rename to netbox/models/v_l_a_n.go index ac9500a7fe55d7873a8695486f389fa5300a34fb..4b70240a570fcf33cfa3e0caf8dcc9eaf0924ec5 100644 --- a/netbox/models/vlan.go +++ b/netbox/models/v_l_a_n.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -355,7 +355,7 @@ type VLANStatus struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this v l a n status diff --git a/netbox/models/vlan_group.go b/netbox/models/v_l_a_n_group.go similarity index 99% rename from netbox/models/vlan_group.go rename to netbox/models/v_l_a_n_group.go index 210d3a391c8fbec0f26ef69ca1b8c19b1a4c7338..358e4e7b01366cd238234ebecb3edfa172cd626b 100644 --- a/netbox/models/vlan_group.go +++ b/netbox/models/v_l_a_n_group.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/vrf.go b/netbox/models/v_r_f.go similarity index 99% rename from netbox/models/vrf.go rename to netbox/models/v_r_f.go index 1968698677b94e610fc7eec5b71e2aed6505c1f8..e09bb3d633bae2257a65bb544048e08f509258fb 100644 --- a/netbox/models/vrf.go +++ b/netbox/models/v_r_f.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/virtual_chassis.go b/netbox/models/virtual_chassis.go index 765151cd4e31d5a6790f1ce5e88f07017b2c6805..0dfe06418993d45c640bc11ab8b3da24438e516f 100644 --- a/netbox/models/virtual_chassis.go +++ b/netbox/models/virtual_chassis.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/virtual_machine_interface.go b/netbox/models/virtual_machine_interface.go index ef3e827fdbc9d90a6a22d34839903f3db741558c..909223077c81840a535374882e52b18e56671da5 100644 --- a/netbox/models/virtual_machine_interface.go +++ b/netbox/models/virtual_machine_interface.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -319,7 +319,7 @@ type VirtualMachineInterfaceMode struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this virtual machine interface mode @@ -386,13 +386,13 @@ type VirtualMachineInterfaceType struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } func (m *VirtualMachineInterfaceType) UnmarshalJSON(b []byte) error { type VirtualMachineInterfaceTypeAlias VirtualMachineInterfaceType var t VirtualMachineInterfaceTypeAlias - if err := json.Unmarshal([]byte("{\"label\":\"Virtual\",\"value\":0}"), &t); err != nil { + if err := json.Unmarshal([]byte("{\"label\":\"Virtual\",\"value\":\"virtual\"}"), &t); err != nil { return err } if err := json.Unmarshal(b, &t); err != nil { diff --git a/netbox/models/virtual_machine_with_config_context.go b/netbox/models/virtual_machine_with_config_context.go index 717251b12db1bc0cae02328e67da49f0d429ccc5..2007c781c2c5664ca62743ea49504a549ae7fb3d 100644 --- a/netbox/models/virtual_machine_with_config_context.go +++ b/netbox/models/virtual_machine_with_config_context.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -488,7 +488,7 @@ type VirtualMachineWithConfigContextStatus struct { // value // Required: true - Value *int64 `json:"value"` + Value *string `json:"value"` } // Validate validates this virtual machine with config context status diff --git a/netbox/models/writable_aggregate.go b/netbox/models/writable_aggregate.go index eabc93eafe5c356a78790299bbb30167b52ceafe..0c3de4939fabc45d82a096102ffe5153f07f1d7b 100644 --- a/netbox/models/writable_aggregate.go +++ b/netbox/models/writable_aggregate.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/writable_cable.go b/netbox/models/writable_cable.go index 69083cd0ea8d3d2e6085586509ea089dce41bed5..fb6a33b034a0fa132be5decaaad076bb69bafa48 100644 --- a/netbox/models/writable_cable.go +++ b/netbox/models/writable_cable.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -52,44 +52,44 @@ type WritableCable struct { Length *int64 `json:"length,omitempty"` // Length unit - // Enum: [1200 1100 2100 2000] - LengthUnit *int64 `json:"length_unit,omitempty"` + // Enum: [m cm ft in] + LengthUnit string `json:"length_unit,omitempty"` // Status - // Enum: [false true] - Status bool `json:"status,omitempty"` + // Enum: [connected planned] + Status string `json:"status,omitempty"` // Termination a // Read Only: true - TerminationA map[string]string `json:"termination_a,omitempty"` + Terminationa map[string]string `json:"termination_a,omitempty"` // Termination a id // Required: true // Maximum: 2.147483647e+09 // Minimum: 0 - TerminationAID *int64 `json:"termination_a_id"` + TerminationaID *int64 `json:"termination_a_id"` // Termination a type // Required: true - TerminationAType *string `json:"termination_a_type"` + TerminationaType *string `json:"termination_a_type"` // Termination b // Read Only: true - TerminationB map[string]string `json:"termination_b,omitempty"` + Terminationb map[string]string `json:"termination_b,omitempty"` // Termination b id // Required: true // Maximum: 2.147483647e+09 // Minimum: 0 - TerminationBID *int64 `json:"termination_b_id"` + TerminationbID *int64 `json:"termination_b_id"` // Termination b type // Required: true - TerminationBType *string `json:"termination_b_type"` + TerminationbType *string `json:"termination_b_type"` // Type - // Enum: [1300 1500 1510 1600 1610 1700 1800 1810 3000 3010 3020 3030 3040 3500 3510 3520 3800 5000] - Type *int64 `json:"type,omitempty"` + // Enum: [cat3 cat5 cat5e cat6 cat6a cat7 dac-active dac-passive coaxial mmf mmf-om1 mmf-om2 mmf-om3 mmf-om4 smf smf-os1 smf-os2 aoc power] + Type string `json:"type,omitempty"` } // Validate validates this writable cable @@ -116,19 +116,19 @@ func (m *WritableCable) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateTerminationAID(formats); err != nil { + if err := m.validateTerminationaID(formats); err != nil { res = append(res, err) } - if err := m.validateTerminationAType(formats); err != nil { + if err := m.validateTerminationaType(formats); err != nil { res = append(res, err) } - if err := m.validateTerminationBID(formats); err != nil { + if err := m.validateTerminationbID(formats); err != nil { res = append(res, err) } - if err := m.validateTerminationBType(formats); err != nil { + if err := m.validateTerminationbType(formats); err != nil { res = append(res, err) } @@ -192,8 +192,8 @@ func (m *WritableCable) validateLength(formats strfmt.Registry) error { var writableCableTypeLengthUnitPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1200,1100,2100,2000]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["m","cm","ft","in"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -201,8 +201,23 @@ func init() { } } +const ( + + // WritableCableLengthUnitM captures enum value "m" + WritableCableLengthUnitM string = "m" + + // WritableCableLengthUnitCm captures enum value "cm" + WritableCableLengthUnitCm string = "cm" + + // WritableCableLengthUnitFt captures enum value "ft" + WritableCableLengthUnitFt string = "ft" + + // WritableCableLengthUnitIn captures enum value "in" + WritableCableLengthUnitIn string = "in" +) + // prop value enum -func (m *WritableCable) validateLengthUnitEnum(path, location string, value int64) error { +func (m *WritableCable) validateLengthUnitEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableCableTypeLengthUnitPropEnum); err != nil { return err } @@ -216,7 +231,7 @@ func (m *WritableCable) validateLengthUnit(formats strfmt.Registry) error { } // value enum - if err := m.validateLengthUnitEnum("length_unit", "body", *m.LengthUnit); err != nil { + if err := m.validateLengthUnitEnum("length_unit", "body", m.LengthUnit); err != nil { return err } @@ -226,8 +241,8 @@ func (m *WritableCable) validateLengthUnit(formats strfmt.Registry) error { var writableCableTypeStatusPropEnum []interface{} func init() { - var res []bool - if err := json.Unmarshal([]byte(`[false,true]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["connected","planned"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -235,8 +250,17 @@ func init() { } } +const ( + + // WritableCableStatusConnected captures enum value "connected" + WritableCableStatusConnected string = "connected" + + // WritableCableStatusPlanned captures enum value "planned" + WritableCableStatusPlanned string = "planned" +) + // prop value enum -func (m *WritableCable) validateStatusEnum(path, location string, value bool) error { +func (m *WritableCable) validateStatusEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableCableTypeStatusPropEnum); err != nil { return err } @@ -257,52 +281,52 @@ func (m *WritableCable) validateStatus(formats strfmt.Registry) error { return nil } -func (m *WritableCable) validateTerminationAID(formats strfmt.Registry) error { +func (m *WritableCable) validateTerminationaID(formats strfmt.Registry) error { - if err := validate.Required("termination_a_id", "body", m.TerminationAID); err != nil { + if err := validate.Required("termination_a_id", "body", m.TerminationaID); err != nil { return err } - if err := validate.MinimumInt("termination_a_id", "body", int64(*m.TerminationAID), 0, false); err != nil { + if err := validate.MinimumInt("termination_a_id", "body", int64(*m.TerminationaID), 0, false); err != nil { return err } - if err := validate.MaximumInt("termination_a_id", "body", int64(*m.TerminationAID), 2.147483647e+09, false); err != nil { + if err := validate.MaximumInt("termination_a_id", "body", int64(*m.TerminationaID), 2.147483647e+09, false); err != nil { return err } return nil } -func (m *WritableCable) validateTerminationAType(formats strfmt.Registry) error { +func (m *WritableCable) validateTerminationaType(formats strfmt.Registry) error { - if err := validate.Required("termination_a_type", "body", m.TerminationAType); err != nil { + if err := validate.Required("termination_a_type", "body", m.TerminationaType); err != nil { return err } return nil } -func (m *WritableCable) validateTerminationBID(formats strfmt.Registry) error { +func (m *WritableCable) validateTerminationbID(formats strfmt.Registry) error { - if err := validate.Required("termination_b_id", "body", m.TerminationBID); err != nil { + if err := validate.Required("termination_b_id", "body", m.TerminationbID); err != nil { return err } - if err := validate.MinimumInt("termination_b_id", "body", int64(*m.TerminationBID), 0, false); err != nil { + if err := validate.MinimumInt("termination_b_id", "body", int64(*m.TerminationbID), 0, false); err != nil { return err } - if err := validate.MaximumInt("termination_b_id", "body", int64(*m.TerminationBID), 2.147483647e+09, false); err != nil { + if err := validate.MaximumInt("termination_b_id", "body", int64(*m.TerminationbID), 2.147483647e+09, false); err != nil { return err } return nil } -func (m *WritableCable) validateTerminationBType(formats strfmt.Registry) error { +func (m *WritableCable) validateTerminationbType(formats strfmt.Registry) error { - if err := validate.Required("termination_b_type", "body", m.TerminationBType); err != nil { + if err := validate.Required("termination_b_type", "body", m.TerminationbType); err != nil { return err } @@ -312,8 +336,8 @@ func (m *WritableCable) validateTerminationBType(formats strfmt.Registry) error var writableCableTypeTypePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1300,1500,1510,1600,1610,1700,1800,1810,3000,3010,3020,3030,3040,3500,3510,3520,3800,5000]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["cat3","cat5","cat5e","cat6","cat6a","cat7","dac-active","dac-passive","coaxial","mmf","mmf-om1","mmf-om2","mmf-om3","mmf-om4","smf","smf-os1","smf-os2","aoc","power"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -321,8 +345,68 @@ func init() { } } +const ( + + // WritableCableTypeCat3 captures enum value "cat3" + WritableCableTypeCat3 string = "cat3" + + // WritableCableTypeCat5 captures enum value "cat5" + WritableCableTypeCat5 string = "cat5" + + // WritableCableTypeCat5e captures enum value "cat5e" + WritableCableTypeCat5e string = "cat5e" + + // WritableCableTypeCat6 captures enum value "cat6" + WritableCableTypeCat6 string = "cat6" + + // WritableCableTypeCat6a captures enum value "cat6a" + WritableCableTypeCat6a string = "cat6a" + + // WritableCableTypeCat7 captures enum value "cat7" + WritableCableTypeCat7 string = "cat7" + + // WritableCableTypeDacActive captures enum value "dac-active" + WritableCableTypeDacActive string = "dac-active" + + // WritableCableTypeDacPassive captures enum value "dac-passive" + WritableCableTypeDacPassive string = "dac-passive" + + // WritableCableTypeCoaxial captures enum value "coaxial" + WritableCableTypeCoaxial string = "coaxial" + + // WritableCableTypeMmf captures enum value "mmf" + WritableCableTypeMmf string = "mmf" + + // WritableCableTypeMmfOm1 captures enum value "mmf-om1" + WritableCableTypeMmfOm1 string = "mmf-om1" + + // WritableCableTypeMmfOm2 captures enum value "mmf-om2" + WritableCableTypeMmfOm2 string = "mmf-om2" + + // WritableCableTypeMmfOm3 captures enum value "mmf-om3" + WritableCableTypeMmfOm3 string = "mmf-om3" + + // WritableCableTypeMmfOm4 captures enum value "mmf-om4" + WritableCableTypeMmfOm4 string = "mmf-om4" + + // WritableCableTypeSmf captures enum value "smf" + WritableCableTypeSmf string = "smf" + + // WritableCableTypeSmfOs1 captures enum value "smf-os1" + WritableCableTypeSmfOs1 string = "smf-os1" + + // WritableCableTypeSmfOs2 captures enum value "smf-os2" + WritableCableTypeSmfOs2 string = "smf-os2" + + // WritableCableTypeAoc captures enum value "aoc" + WritableCableTypeAoc string = "aoc" + + // WritableCableTypePower captures enum value "power" + WritableCableTypePower string = "power" +) + // prop value enum -func (m *WritableCable) validateTypeEnum(path, location string, value int64) error { +func (m *WritableCable) validateTypeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableCableTypeTypePropEnum); err != nil { return err } @@ -336,7 +420,7 @@ func (m *WritableCable) validateType(formats strfmt.Registry) error { } // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { return err } diff --git a/netbox/models/writable_circuit.go b/netbox/models/writable_circuit.go index e02cbbad1b5c9afb6638f049b3726e653b3ca675..c84ae6a0adda1dbd8a3b47238eab251cc2c5d6f4 100644 --- a/netbox/models/writable_circuit.go +++ b/netbox/models/writable_circuit.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -78,8 +78,8 @@ type WritableCircuit struct { Provider *int64 `json:"provider"` // Status - // Enum: [2 3 1 4 0 5] - Status int64 `json:"status,omitempty"` + // Enum: [planned provisioning active offline deprovisioning decommissioned] + Status string `json:"status,omitempty"` // tags Tags []string `json:"tags"` @@ -87,6 +87,14 @@ type WritableCircuit struct { // Tenant Tenant *int64 `json:"tenant,omitempty"` + // Termination a + // Read Only: true + Terminationa string `json:"termination_a,omitempty"` + + // Termination z + // Read Only: true + Terminationz string `json:"termination_z,omitempty"` + // Type // Required: true Type *int64 `json:"type"` @@ -240,8 +248,8 @@ func (m *WritableCircuit) validateProvider(formats strfmt.Registry) error { var writableCircuitTypeStatusPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[2,3,1,4,0,5]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["planned","provisioning","active","offline","deprovisioning","decommissioned"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -249,8 +257,29 @@ func init() { } } +const ( + + // WritableCircuitStatusPlanned captures enum value "planned" + WritableCircuitStatusPlanned string = "planned" + + // WritableCircuitStatusProvisioning captures enum value "provisioning" + WritableCircuitStatusProvisioning string = "provisioning" + + // WritableCircuitStatusActive captures enum value "active" + WritableCircuitStatusActive string = "active" + + // WritableCircuitStatusOffline captures enum value "offline" + WritableCircuitStatusOffline string = "offline" + + // WritableCircuitStatusDeprovisioning captures enum value "deprovisioning" + WritableCircuitStatusDeprovisioning string = "deprovisioning" + + // WritableCircuitStatusDecommissioned captures enum value "decommissioned" + WritableCircuitStatusDecommissioned string = "decommissioned" +) + // prop value enum -func (m *WritableCircuit) validateStatusEnum(path, location string, value int64) error { +func (m *WritableCircuit) validateStatusEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableCircuitTypeStatusPropEnum); err != nil { return err } diff --git a/netbox/models/writable_circuit_termination.go b/netbox/models/writable_circuit_termination.go index 2d42b371c420fb28d3e407798cbc2d76b887a2d5..017dc93b0cb52a0c0cce2c918e3966066f2fea14 100644 --- a/netbox/models/writable_circuit_termination.go +++ b/netbox/models/writable_circuit_termination.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/writable_cluster.go b/netbox/models/writable_cluster.go index 01e87bbd124db60a356479a3f6cba34321737c29..15b0094ddd4663f4a30c318337f07ad2df21e1ac 100644 --- a/netbox/models/writable_cluster.go +++ b/netbox/models/writable_cluster.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -72,6 +72,9 @@ type WritableCluster struct { // tags Tags []string `json:"tags"` + // Tenant + Tenant *int64 `json:"tenant,omitempty"` + // Type // Required: true Type *int64 `json:"type"` diff --git a/netbox/models/writable_config_context.go b/netbox/models/writable_config_context.go index 36dbe4c147a3d32e67023d96d6687771e43de177..b8b636ed06fc9377fc025f4b00f09738d5101732 100644 --- a/netbox/models/writable_config_context.go +++ b/netbox/models/writable_config_context.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,10 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "strconv" "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -68,6 +70,10 @@ type WritableConfigContext struct { // Unique: true Sites []int64 `json:"sites"` + // tags + // Unique: true + Tags []string `json:"tags"` + // tenant groups // Unique: true TenantGroups []int64 `json:"tenant_groups"` @@ -114,6 +120,10 @@ func (m *WritableConfigContext) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateTenantGroups(formats); err != nil { res = append(res, err) } @@ -223,6 +233,27 @@ func (m *WritableConfigContext) validateSites(formats strfmt.Registry) error { return nil } +func (m *WritableConfigContext) validateTags(formats strfmt.Registry) error { + + if swag.IsZero(m.Tags) { // not required + return nil + } + + if err := validate.UniqueItems("tags", "body", m.Tags); err != nil { + return err + } + + for i := 0; i < len(m.Tags); i++ { + + if err := validate.Pattern("tags"+"."+strconv.Itoa(i), "body", string(m.Tags[i]), `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + } + + return nil +} + func (m *WritableConfigContext) validateTenantGroups(formats strfmt.Registry) error { if swag.IsZero(m.TenantGroups) { // not required diff --git a/netbox/models/writable_console_port.go b/netbox/models/writable_console_port.go index 1b7e612e9f302fd361ae2f2dc73112f9f3c122e8..5f991f78322d780aa86c2a6ed167e0fee385efc0 100644 --- a/netbox/models/writable_console_port.go +++ b/netbox/models/writable_console_port.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -73,6 +73,10 @@ type WritableConsolePort struct { // tags Tags []string `json:"tags"` + + // Type + // Enum: [de-9 db-25 rj-12 rj-45 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b other] + Type string `json:"type,omitempty"` } // Validate validates this writable console port @@ -103,6 +107,10 @@ func (m *WritableConsolePort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -217,6 +225,79 @@ func (m *WritableConsolePort) validateTags(formats strfmt.Registry) error { return nil } +var writableConsolePortTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["de-9","db-25","rj-12","rj-45","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","other"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableConsolePortTypeTypePropEnum = append(writableConsolePortTypeTypePropEnum, v) + } +} + +const ( + + // WritableConsolePortTypeDe9 captures enum value "de-9" + WritableConsolePortTypeDe9 string = "de-9" + + // WritableConsolePortTypeDb25 captures enum value "db-25" + WritableConsolePortTypeDb25 string = "db-25" + + // WritableConsolePortTypeRj12 captures enum value "rj-12" + WritableConsolePortTypeRj12 string = "rj-12" + + // WritableConsolePortTypeRj45 captures enum value "rj-45" + WritableConsolePortTypeRj45 string = "rj-45" + + // WritableConsolePortTypeUsba captures enum value "usb-a" + WritableConsolePortTypeUsba string = "usb-a" + + // WritableConsolePortTypeUsbb captures enum value "usb-b" + WritableConsolePortTypeUsbb string = "usb-b" + + // WritableConsolePortTypeUsbc captures enum value "usb-c" + WritableConsolePortTypeUsbc string = "usb-c" + + // WritableConsolePortTypeUsbMinia captures enum value "usb-mini-a" + WritableConsolePortTypeUsbMinia string = "usb-mini-a" + + // WritableConsolePortTypeUsbMinib captures enum value "usb-mini-b" + WritableConsolePortTypeUsbMinib string = "usb-mini-b" + + // WritableConsolePortTypeUsbMicroa captures enum value "usb-micro-a" + WritableConsolePortTypeUsbMicroa string = "usb-micro-a" + + // WritableConsolePortTypeUsbMicrob captures enum value "usb-micro-b" + WritableConsolePortTypeUsbMicrob string = "usb-micro-b" + + // WritableConsolePortTypeOther captures enum value "other" + WritableConsolePortTypeOther string = "other" +) + +// prop value enum +func (m *WritableConsolePort) validateTypeEnum(path, location string, value string) error { + if err := validate.Enum(path, location, value, writableConsolePortTypeTypePropEnum); err != nil { + return err + } + return nil +} + +func (m *WritableConsolePort) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *WritableConsolePort) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/netbox/models/writable_console_port_template.go b/netbox/models/writable_console_port_template.go index 9c15e51241868bb9a5bfa6701eead15c711c75a4..2f67cf6855fcd292b42be89e2131e86b419c2595 100644 --- a/netbox/models/writable_console_port_template.go +++ b/netbox/models/writable_console_port_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,10 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "encoding/json" "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -44,6 +46,10 @@ type WritableConsolePortTemplate struct { // Max Length: 50 // Min Length: 1 Name *string `json:"name"` + + // Type + // Enum: [de-9 db-25 rj-12 rj-45 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b other] + Type string `json:"type,omitempty"` } // Validate validates this writable console port template @@ -58,6 +64,10 @@ func (m *WritableConsolePortTemplate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -90,6 +100,79 @@ func (m *WritableConsolePortTemplate) validateName(formats strfmt.Registry) erro return nil } +var writableConsolePortTemplateTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["de-9","db-25","rj-12","rj-45","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","other"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableConsolePortTemplateTypeTypePropEnum = append(writableConsolePortTemplateTypeTypePropEnum, v) + } +} + +const ( + + // WritableConsolePortTemplateTypeDe9 captures enum value "de-9" + WritableConsolePortTemplateTypeDe9 string = "de-9" + + // WritableConsolePortTemplateTypeDb25 captures enum value "db-25" + WritableConsolePortTemplateTypeDb25 string = "db-25" + + // WritableConsolePortTemplateTypeRj12 captures enum value "rj-12" + WritableConsolePortTemplateTypeRj12 string = "rj-12" + + // WritableConsolePortTemplateTypeRj45 captures enum value "rj-45" + WritableConsolePortTemplateTypeRj45 string = "rj-45" + + // WritableConsolePortTemplateTypeUsba captures enum value "usb-a" + WritableConsolePortTemplateTypeUsba string = "usb-a" + + // WritableConsolePortTemplateTypeUsbb captures enum value "usb-b" + WritableConsolePortTemplateTypeUsbb string = "usb-b" + + // WritableConsolePortTemplateTypeUsbc captures enum value "usb-c" + WritableConsolePortTemplateTypeUsbc string = "usb-c" + + // WritableConsolePortTemplateTypeUsbMinia captures enum value "usb-mini-a" + WritableConsolePortTemplateTypeUsbMinia string = "usb-mini-a" + + // WritableConsolePortTemplateTypeUsbMinib captures enum value "usb-mini-b" + WritableConsolePortTemplateTypeUsbMinib string = "usb-mini-b" + + // WritableConsolePortTemplateTypeUsbMicroa captures enum value "usb-micro-a" + WritableConsolePortTemplateTypeUsbMicroa string = "usb-micro-a" + + // WritableConsolePortTemplateTypeUsbMicrob captures enum value "usb-micro-b" + WritableConsolePortTemplateTypeUsbMicrob string = "usb-micro-b" + + // WritableConsolePortTemplateTypeOther captures enum value "other" + WritableConsolePortTemplateTypeOther string = "other" +) + +// prop value enum +func (m *WritableConsolePortTemplate) validateTypeEnum(path, location string, value string) error { + if err := validate.Enum(path, location, value, writableConsolePortTemplateTypeTypePropEnum); err != nil { + return err + } + return nil +} + +func (m *WritableConsolePortTemplate) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *WritableConsolePortTemplate) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/netbox/models/writable_console_server_port.go b/netbox/models/writable_console_server_port.go index dfa474cbb97952df37689e9b9fd91b97a982d6d5..9184e2bc3d17701bb0bef672c4f69305fdb7ddba 100644 --- a/netbox/models/writable_console_server_port.go +++ b/netbox/models/writable_console_server_port.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -73,6 +73,10 @@ type WritableConsoleServerPort struct { // tags Tags []string `json:"tags"` + + // Type + // Enum: [de-9 db-25 rj-12 rj-45 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b other] + Type string `json:"type,omitempty"` } // Validate validates this writable console server port @@ -103,6 +107,10 @@ func (m *WritableConsoleServerPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -217,6 +225,79 @@ func (m *WritableConsoleServerPort) validateTags(formats strfmt.Registry) error return nil } +var writableConsoleServerPortTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["de-9","db-25","rj-12","rj-45","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","other"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableConsoleServerPortTypeTypePropEnum = append(writableConsoleServerPortTypeTypePropEnum, v) + } +} + +const ( + + // WritableConsoleServerPortTypeDe9 captures enum value "de-9" + WritableConsoleServerPortTypeDe9 string = "de-9" + + // WritableConsoleServerPortTypeDb25 captures enum value "db-25" + WritableConsoleServerPortTypeDb25 string = "db-25" + + // WritableConsoleServerPortTypeRj12 captures enum value "rj-12" + WritableConsoleServerPortTypeRj12 string = "rj-12" + + // WritableConsoleServerPortTypeRj45 captures enum value "rj-45" + WritableConsoleServerPortTypeRj45 string = "rj-45" + + // WritableConsoleServerPortTypeUsba captures enum value "usb-a" + WritableConsoleServerPortTypeUsba string = "usb-a" + + // WritableConsoleServerPortTypeUsbb captures enum value "usb-b" + WritableConsoleServerPortTypeUsbb string = "usb-b" + + // WritableConsoleServerPortTypeUsbc captures enum value "usb-c" + WritableConsoleServerPortTypeUsbc string = "usb-c" + + // WritableConsoleServerPortTypeUsbMinia captures enum value "usb-mini-a" + WritableConsoleServerPortTypeUsbMinia string = "usb-mini-a" + + // WritableConsoleServerPortTypeUsbMinib captures enum value "usb-mini-b" + WritableConsoleServerPortTypeUsbMinib string = "usb-mini-b" + + // WritableConsoleServerPortTypeUsbMicroa captures enum value "usb-micro-a" + WritableConsoleServerPortTypeUsbMicroa string = "usb-micro-a" + + // WritableConsoleServerPortTypeUsbMicrob captures enum value "usb-micro-b" + WritableConsoleServerPortTypeUsbMicrob string = "usb-micro-b" + + // WritableConsoleServerPortTypeOther captures enum value "other" + WritableConsoleServerPortTypeOther string = "other" +) + +// prop value enum +func (m *WritableConsoleServerPort) validateTypeEnum(path, location string, value string) error { + if err := validate.Enum(path, location, value, writableConsoleServerPortTypeTypePropEnum); err != nil { + return err + } + return nil +} + +func (m *WritableConsoleServerPort) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *WritableConsoleServerPort) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/netbox/models/writable_console_server_port_template.go b/netbox/models/writable_console_server_port_template.go index 745874c98653657da8a8e54bdbc775dcf23d2f1b..416ee7d807f57a7dc9c73c6b78771de3ad837bf3 100644 --- a/netbox/models/writable_console_server_port_template.go +++ b/netbox/models/writable_console_server_port_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,10 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "encoding/json" "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -44,6 +46,10 @@ type WritableConsoleServerPortTemplate struct { // Max Length: 50 // Min Length: 1 Name *string `json:"name"` + + // Type + // Enum: [de-9 db-25 rj-12 rj-45 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b other] + Type string `json:"type,omitempty"` } // Validate validates this writable console server port template @@ -58,6 +64,10 @@ func (m *WritableConsoleServerPortTemplate) Validate(formats strfmt.Registry) er res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -90,6 +100,79 @@ func (m *WritableConsoleServerPortTemplate) validateName(formats strfmt.Registry return nil } +var writableConsoleServerPortTemplateTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["de-9","db-25","rj-12","rj-45","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","other"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableConsoleServerPortTemplateTypeTypePropEnum = append(writableConsoleServerPortTemplateTypeTypePropEnum, v) + } +} + +const ( + + // WritableConsoleServerPortTemplateTypeDe9 captures enum value "de-9" + WritableConsoleServerPortTemplateTypeDe9 string = "de-9" + + // WritableConsoleServerPortTemplateTypeDb25 captures enum value "db-25" + WritableConsoleServerPortTemplateTypeDb25 string = "db-25" + + // WritableConsoleServerPortTemplateTypeRj12 captures enum value "rj-12" + WritableConsoleServerPortTemplateTypeRj12 string = "rj-12" + + // WritableConsoleServerPortTemplateTypeRj45 captures enum value "rj-45" + WritableConsoleServerPortTemplateTypeRj45 string = "rj-45" + + // WritableConsoleServerPortTemplateTypeUsba captures enum value "usb-a" + WritableConsoleServerPortTemplateTypeUsba string = "usb-a" + + // WritableConsoleServerPortTemplateTypeUsbb captures enum value "usb-b" + WritableConsoleServerPortTemplateTypeUsbb string = "usb-b" + + // WritableConsoleServerPortTemplateTypeUsbc captures enum value "usb-c" + WritableConsoleServerPortTemplateTypeUsbc string = "usb-c" + + // WritableConsoleServerPortTemplateTypeUsbMinia captures enum value "usb-mini-a" + WritableConsoleServerPortTemplateTypeUsbMinia string = "usb-mini-a" + + // WritableConsoleServerPortTemplateTypeUsbMinib captures enum value "usb-mini-b" + WritableConsoleServerPortTemplateTypeUsbMinib string = "usb-mini-b" + + // WritableConsoleServerPortTemplateTypeUsbMicroa captures enum value "usb-micro-a" + WritableConsoleServerPortTemplateTypeUsbMicroa string = "usb-micro-a" + + // WritableConsoleServerPortTemplateTypeUsbMicrob captures enum value "usb-micro-b" + WritableConsoleServerPortTemplateTypeUsbMicrob string = "usb-micro-b" + + // WritableConsoleServerPortTemplateTypeOther captures enum value "other" + WritableConsoleServerPortTemplateTypeOther string = "other" +) + +// prop value enum +func (m *WritableConsoleServerPortTemplate) validateTypeEnum(path, location string, value string) error { + if err := validate.Enum(path, location, value, writableConsoleServerPortTemplateTypeTypePropEnum); err != nil { + return err + } + return nil +} + +func (m *WritableConsoleServerPortTemplate) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *WritableConsoleServerPortTemplate) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/netbox/models/writable_device_bay.go b/netbox/models/writable_device_bay.go index bceb7cbbc12d62e3b5b47f2c6b82dbb17decf180..70a0304c588cdc6dcd048b982d1d67e348d275f5 100644 --- a/netbox/models/writable_device_bay.go +++ b/netbox/models/writable_device_bay.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/writable_device_bay_template.go b/netbox/models/writable_device_bay_template.go index ae5c9ebf097fb53a7235acce826a296c10315aea..49bf2019d69ed778271437cb97036c0cb6da2159 100644 --- a/netbox/models/writable_device_bay_template.go +++ b/netbox/models/writable_device_bay_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/writable_device_interface.go b/netbox/models/writable_device_interface.go index 0be307dcdad516830a2bae37328e925eb956cf4a..22999de64a041768e517872c40be84d180e272e2 100644 --- a/netbox/models/writable_device_interface.go +++ b/netbox/models/writable_device_interface.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -68,10 +68,6 @@ type WritableDeviceInterface struct { // Enabled Enabled bool `json:"enabled,omitempty"` - // Form factor - // Read Only: true - FormFactor string `json:"form_factor,omitempty"` - // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -88,8 +84,8 @@ type WritableDeviceInterface struct { MgmtOnly bool `json:"mgmt_only,omitempty"` // Mode - // Enum: [100 200 300] - Mode *int64 `json:"mode,omitempty"` + // Enum: [access tagged tagged-all] + Mode string `json:"mode,omitempty"` // MTU // Maximum: 65536 @@ -110,8 +106,9 @@ type WritableDeviceInterface struct { Tags []string `json:"tags"` // Type - // Enum: [0 200 800 1000 1120 1130 1150 1170 1050 1100 1200 1300 1310 1320 1350 1400 1420 1500 1510 1650 1520 1550 1600 1700 1750 2600 2610 2620 2630 2640 2810 2820 2830 6100 6200 6300 6400 6500 6600 6700 3010 3020 3040 3080 3160 3320 3400 4000 4010 4040 4050 5000 5050 5100 5150 5200 5300 5310 5320 5330 32767] - Type int64 `json:"type,omitempty"` + // Required: true + // Enum: [virtual lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 128gfc-sfp28 inifiband-sdr inifiband-ddr inifiband-qdr inifiband-fdr10 inifiband-fdr inifiband-edr inifiband-hdr inifiband-ndr inifiband-xdr t1 e1 t3 e3 cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] + Type *string `json:"type"` // Untagged VLAN UntaggedVlan *int64 `json:"untagged_vlan,omitempty"` @@ -244,8 +241,8 @@ func (m *WritableDeviceInterface) validateDevice(formats strfmt.Registry) error var writableDeviceInterfaceTypeModePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[100,200,300]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["access","tagged","tagged-all"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -253,8 +250,20 @@ func init() { } } +const ( + + // WritableDeviceInterfaceModeAccess captures enum value "access" + WritableDeviceInterfaceModeAccess string = "access" + + // WritableDeviceInterfaceModeTagged captures enum value "tagged" + WritableDeviceInterfaceModeTagged string = "tagged" + + // WritableDeviceInterfaceModeTaggedAll captures enum value "tagged-all" + WritableDeviceInterfaceModeTaggedAll string = "tagged-all" +) + // prop value enum -func (m *WritableDeviceInterface) validateModeEnum(path, location string, value int64) error { +func (m *WritableDeviceInterface) validateModeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableDeviceInterfaceTypeModePropEnum); err != nil { return err } @@ -268,7 +277,7 @@ func (m *WritableDeviceInterface) validateMode(formats strfmt.Registry) error { } // value enum - if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { + if err := m.validateModeEnum("mode", "body", m.Mode); err != nil { return err } @@ -342,8 +351,8 @@ func (m *WritableDeviceInterface) validateTags(formats strfmt.Registry) error { var writableDeviceInterfaceTypeTypePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[0,200,800,1000,1120,1130,1150,1170,1050,1100,1200,1300,1310,1320,1350,1400,1420,1500,1510,1650,1520,1550,1600,1700,1750,2600,2610,2620,2630,2640,2810,2820,2830,6100,6200,6300,6400,6500,6600,6700,3010,3020,3040,3080,3160,3320,3400,4000,4010,4040,4050,5000,5050,5100,5150,5200,5300,5310,5320,5330,32767]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["virtual","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","128gfc-sfp28","inifiband-sdr","inifiband-ddr","inifiband-qdr","inifiband-fdr10","inifiband-fdr","inifiband-edr","inifiband-hdr","inifiband-ndr","inifiband-xdr","t1","e1","t3","e3","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -351,8 +360,227 @@ func init() { } } +const ( + + // WritableDeviceInterfaceTypeVirtual captures enum value "virtual" + WritableDeviceInterfaceTypeVirtual string = "virtual" + + // WritableDeviceInterfaceTypeLag captures enum value "lag" + WritableDeviceInterfaceTypeLag string = "lag" + + // WritableDeviceInterfaceTypeNr100baseTx captures enum value "100base-tx" + WritableDeviceInterfaceTypeNr100baseTx string = "100base-tx" + + // WritableDeviceInterfaceTypeNr1000baset captures enum value "1000base-t" + WritableDeviceInterfaceTypeNr1000baset string = "1000base-t" + + // WritableDeviceInterfaceTypeNr25gbaset captures enum value "2.5gbase-t" + WritableDeviceInterfaceTypeNr25gbaset string = "2.5gbase-t" + + // WritableDeviceInterfaceTypeNr5gbaset captures enum value "5gbase-t" + WritableDeviceInterfaceTypeNr5gbaset string = "5gbase-t" + + // WritableDeviceInterfaceTypeNr10gbaset captures enum value "10gbase-t" + WritableDeviceInterfaceTypeNr10gbaset string = "10gbase-t" + + // WritableDeviceInterfaceTypeNr10gbaseCx4 captures enum value "10gbase-cx4" + WritableDeviceInterfaceTypeNr10gbaseCx4 string = "10gbase-cx4" + + // WritableDeviceInterfaceTypeNr1000basexGbic captures enum value "1000base-x-gbic" + WritableDeviceInterfaceTypeNr1000basexGbic string = "1000base-x-gbic" + + // WritableDeviceInterfaceTypeNr1000basexSfp captures enum value "1000base-x-sfp" + WritableDeviceInterfaceTypeNr1000basexSfp string = "1000base-x-sfp" + + // WritableDeviceInterfaceTypeNr10gbasexSfpp captures enum value "10gbase-x-sfpp" + WritableDeviceInterfaceTypeNr10gbasexSfpp string = "10gbase-x-sfpp" + + // WritableDeviceInterfaceTypeNr10gbasexXfp captures enum value "10gbase-x-xfp" + WritableDeviceInterfaceTypeNr10gbasexXfp string = "10gbase-x-xfp" + + // WritableDeviceInterfaceTypeNr10gbasexXenpak captures enum value "10gbase-x-xenpak" + WritableDeviceInterfaceTypeNr10gbasexXenpak string = "10gbase-x-xenpak" + + // WritableDeviceInterfaceTypeNr10gbasexX2 captures enum value "10gbase-x-x2" + WritableDeviceInterfaceTypeNr10gbasexX2 string = "10gbase-x-x2" + + // WritableDeviceInterfaceTypeNr25gbasexSfp28 captures enum value "25gbase-x-sfp28" + WritableDeviceInterfaceTypeNr25gbasexSfp28 string = "25gbase-x-sfp28" + + // WritableDeviceInterfaceTypeNr40gbasexQsfpp captures enum value "40gbase-x-qsfpp" + WritableDeviceInterfaceTypeNr40gbasexQsfpp string = "40gbase-x-qsfpp" + + // WritableDeviceInterfaceTypeNr50gbasexSfp28 captures enum value "50gbase-x-sfp28" + WritableDeviceInterfaceTypeNr50gbasexSfp28 string = "50gbase-x-sfp28" + + // WritableDeviceInterfaceTypeNr100gbasexCfp captures enum value "100gbase-x-cfp" + WritableDeviceInterfaceTypeNr100gbasexCfp string = "100gbase-x-cfp" + + // WritableDeviceInterfaceTypeNr100gbasexCfp2 captures enum value "100gbase-x-cfp2" + WritableDeviceInterfaceTypeNr100gbasexCfp2 string = "100gbase-x-cfp2" + + // WritableDeviceInterfaceTypeNr200gbasexCfp2 captures enum value "200gbase-x-cfp2" + WritableDeviceInterfaceTypeNr200gbasexCfp2 string = "200gbase-x-cfp2" + + // WritableDeviceInterfaceTypeNr100gbasexCfp4 captures enum value "100gbase-x-cfp4" + WritableDeviceInterfaceTypeNr100gbasexCfp4 string = "100gbase-x-cfp4" + + // WritableDeviceInterfaceTypeNr100gbasexCpak captures enum value "100gbase-x-cpak" + WritableDeviceInterfaceTypeNr100gbasexCpak string = "100gbase-x-cpak" + + // WritableDeviceInterfaceTypeNr100gbasexQsfp28 captures enum value "100gbase-x-qsfp28" + WritableDeviceInterfaceTypeNr100gbasexQsfp28 string = "100gbase-x-qsfp28" + + // WritableDeviceInterfaceTypeNr200gbasexQsfp56 captures enum value "200gbase-x-qsfp56" + WritableDeviceInterfaceTypeNr200gbasexQsfp56 string = "200gbase-x-qsfp56" + + // WritableDeviceInterfaceTypeNr400gbasexQsfpdd captures enum value "400gbase-x-qsfpdd" + WritableDeviceInterfaceTypeNr400gbasexQsfpdd string = "400gbase-x-qsfpdd" + + // WritableDeviceInterfaceTypeNr400gbasexOsfp captures enum value "400gbase-x-osfp" + WritableDeviceInterfaceTypeNr400gbasexOsfp string = "400gbase-x-osfp" + + // WritableDeviceInterfaceTypeIeee80211a captures enum value "ieee802.11a" + WritableDeviceInterfaceTypeIeee80211a string = "ieee802.11a" + + // WritableDeviceInterfaceTypeIeee80211g captures enum value "ieee802.11g" + WritableDeviceInterfaceTypeIeee80211g string = "ieee802.11g" + + // WritableDeviceInterfaceTypeIeee80211n captures enum value "ieee802.11n" + WritableDeviceInterfaceTypeIeee80211n string = "ieee802.11n" + + // WritableDeviceInterfaceTypeIeee80211ac captures enum value "ieee802.11ac" + WritableDeviceInterfaceTypeIeee80211ac string = "ieee802.11ac" + + // WritableDeviceInterfaceTypeIeee80211ad captures enum value "ieee802.11ad" + WritableDeviceInterfaceTypeIeee80211ad string = "ieee802.11ad" + + // WritableDeviceInterfaceTypeIeee80211ax captures enum value "ieee802.11ax" + WritableDeviceInterfaceTypeIeee80211ax string = "ieee802.11ax" + + // WritableDeviceInterfaceTypeGsm captures enum value "gsm" + WritableDeviceInterfaceTypeGsm string = "gsm" + + // WritableDeviceInterfaceTypeCdma captures enum value "cdma" + WritableDeviceInterfaceTypeCdma string = "cdma" + + // WritableDeviceInterfaceTypeLte captures enum value "lte" + WritableDeviceInterfaceTypeLte string = "lte" + + // WritableDeviceInterfaceTypeSonetOc3 captures enum value "sonet-oc3" + WritableDeviceInterfaceTypeSonetOc3 string = "sonet-oc3" + + // WritableDeviceInterfaceTypeSonetOc12 captures enum value "sonet-oc12" + WritableDeviceInterfaceTypeSonetOc12 string = "sonet-oc12" + + // WritableDeviceInterfaceTypeSonetOc48 captures enum value "sonet-oc48" + WritableDeviceInterfaceTypeSonetOc48 string = "sonet-oc48" + + // WritableDeviceInterfaceTypeSonetOc192 captures enum value "sonet-oc192" + WritableDeviceInterfaceTypeSonetOc192 string = "sonet-oc192" + + // WritableDeviceInterfaceTypeSonetOc768 captures enum value "sonet-oc768" + WritableDeviceInterfaceTypeSonetOc768 string = "sonet-oc768" + + // WritableDeviceInterfaceTypeSonetOc1920 captures enum value "sonet-oc1920" + WritableDeviceInterfaceTypeSonetOc1920 string = "sonet-oc1920" + + // WritableDeviceInterfaceTypeSonetOc3840 captures enum value "sonet-oc3840" + WritableDeviceInterfaceTypeSonetOc3840 string = "sonet-oc3840" + + // WritableDeviceInterfaceTypeNr1gfcSfp captures enum value "1gfc-sfp" + WritableDeviceInterfaceTypeNr1gfcSfp string = "1gfc-sfp" + + // WritableDeviceInterfaceTypeNr2gfcSfp captures enum value "2gfc-sfp" + WritableDeviceInterfaceTypeNr2gfcSfp string = "2gfc-sfp" + + // WritableDeviceInterfaceTypeNr4gfcSfp captures enum value "4gfc-sfp" + WritableDeviceInterfaceTypeNr4gfcSfp string = "4gfc-sfp" + + // WritableDeviceInterfaceTypeNr8gfcSfpp captures enum value "8gfc-sfpp" + WritableDeviceInterfaceTypeNr8gfcSfpp string = "8gfc-sfpp" + + // WritableDeviceInterfaceTypeNr16gfcSfpp captures enum value "16gfc-sfpp" + WritableDeviceInterfaceTypeNr16gfcSfpp string = "16gfc-sfpp" + + // WritableDeviceInterfaceTypeNr32gfcSfp28 captures enum value "32gfc-sfp28" + WritableDeviceInterfaceTypeNr32gfcSfp28 string = "32gfc-sfp28" + + // WritableDeviceInterfaceTypeNr128gfcSfp28 captures enum value "128gfc-sfp28" + WritableDeviceInterfaceTypeNr128gfcSfp28 string = "128gfc-sfp28" + + // WritableDeviceInterfaceTypeInifibandSdr captures enum value "inifiband-sdr" + WritableDeviceInterfaceTypeInifibandSdr string = "inifiband-sdr" + + // WritableDeviceInterfaceTypeInifibandDdr captures enum value "inifiband-ddr" + WritableDeviceInterfaceTypeInifibandDdr string = "inifiband-ddr" + + // WritableDeviceInterfaceTypeInifibandQdr captures enum value "inifiband-qdr" + WritableDeviceInterfaceTypeInifibandQdr string = "inifiband-qdr" + + // WritableDeviceInterfaceTypeInifibandFdr10 captures enum value "inifiband-fdr10" + WritableDeviceInterfaceTypeInifibandFdr10 string = "inifiband-fdr10" + + // WritableDeviceInterfaceTypeInifibandFdr captures enum value "inifiband-fdr" + WritableDeviceInterfaceTypeInifibandFdr string = "inifiband-fdr" + + // WritableDeviceInterfaceTypeInifibandEdr captures enum value "inifiband-edr" + WritableDeviceInterfaceTypeInifibandEdr string = "inifiband-edr" + + // WritableDeviceInterfaceTypeInifibandHdr captures enum value "inifiband-hdr" + WritableDeviceInterfaceTypeInifibandHdr string = "inifiband-hdr" + + // WritableDeviceInterfaceTypeInifibandNdr captures enum value "inifiband-ndr" + WritableDeviceInterfaceTypeInifibandNdr string = "inifiband-ndr" + + // WritableDeviceInterfaceTypeInifibandXdr captures enum value "inifiband-xdr" + WritableDeviceInterfaceTypeInifibandXdr string = "inifiband-xdr" + + // WritableDeviceInterfaceTypeT1 captures enum value "t1" + WritableDeviceInterfaceTypeT1 string = "t1" + + // WritableDeviceInterfaceTypeE1 captures enum value "e1" + WritableDeviceInterfaceTypeE1 string = "e1" + + // WritableDeviceInterfaceTypeT3 captures enum value "t3" + WritableDeviceInterfaceTypeT3 string = "t3" + + // WritableDeviceInterfaceTypeE3 captures enum value "e3" + WritableDeviceInterfaceTypeE3 string = "e3" + + // WritableDeviceInterfaceTypeCiscoStackwise captures enum value "cisco-stackwise" + WritableDeviceInterfaceTypeCiscoStackwise string = "cisco-stackwise" + + // WritableDeviceInterfaceTypeCiscoStackwisePlus captures enum value "cisco-stackwise-plus" + WritableDeviceInterfaceTypeCiscoStackwisePlus string = "cisco-stackwise-plus" + + // WritableDeviceInterfaceTypeCiscoFlexstack captures enum value "cisco-flexstack" + WritableDeviceInterfaceTypeCiscoFlexstack string = "cisco-flexstack" + + // WritableDeviceInterfaceTypeCiscoFlexstackPlus captures enum value "cisco-flexstack-plus" + WritableDeviceInterfaceTypeCiscoFlexstackPlus string = "cisco-flexstack-plus" + + // WritableDeviceInterfaceTypeJuniperVcp captures enum value "juniper-vcp" + WritableDeviceInterfaceTypeJuniperVcp string = "juniper-vcp" + + // WritableDeviceInterfaceTypeExtremeSummitstack captures enum value "extreme-summitstack" + WritableDeviceInterfaceTypeExtremeSummitstack string = "extreme-summitstack" + + // WritableDeviceInterfaceTypeExtremeSummitstack128 captures enum value "extreme-summitstack-128" + WritableDeviceInterfaceTypeExtremeSummitstack128 string = "extreme-summitstack-128" + + // WritableDeviceInterfaceTypeExtremeSummitstack256 captures enum value "extreme-summitstack-256" + WritableDeviceInterfaceTypeExtremeSummitstack256 string = "extreme-summitstack-256" + + // WritableDeviceInterfaceTypeExtremeSummitstack512 captures enum value "extreme-summitstack-512" + WritableDeviceInterfaceTypeExtremeSummitstack512 string = "extreme-summitstack-512" + + // WritableDeviceInterfaceTypeOther captures enum value "other" + WritableDeviceInterfaceTypeOther string = "other" +) + // prop value enum -func (m *WritableDeviceInterface) validateTypeEnum(path, location string, value int64) error { +func (m *WritableDeviceInterface) validateTypeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableDeviceInterfaceTypeTypePropEnum); err != nil { return err } @@ -361,12 +589,12 @@ func (m *WritableDeviceInterface) validateTypeEnum(path, location string, value func (m *WritableDeviceInterface) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil + if err := validate.Required("type", "body", m.Type); err != nil { + return err } // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { return err } diff --git a/netbox/models/writable_device_type.go b/netbox/models/writable_device_type.go index 5d8239648d633cc0d99ede2680bba41c60635e42..7c8a403335c59ce599e0614eea5d5be91b529a1e 100644 --- a/netbox/models/writable_device_type.go +++ b/netbox/models/writable_device_type.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -92,9 +92,9 @@ type WritableDeviceType struct { // Parent/child status // - // Parent devices house child devices in device bays. Select "None" if this device type is neither a parent nor a child. - // Enum: [<nil> true false] - SubdeviceRole bool `json:"subdevice_role,omitempty"` + // Parent devices house child devices in device bays. Leave blank if this device type is neither a parent nor a child. + // Enum: [parent child] + SubdeviceRole string `json:"subdevice_role,omitempty"` // tags Tags []string `json:"tags"` @@ -240,8 +240,8 @@ func (m *WritableDeviceType) validateSlug(formats strfmt.Registry) error { var writableDeviceTypeTypeSubdeviceRolePropEnum []interface{} func init() { - var res []bool - if err := json.Unmarshal([]byte(`[null,true,false]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["parent","child"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -249,8 +249,17 @@ func init() { } } +const ( + + // WritableDeviceTypeSubdeviceRoleParent captures enum value "parent" + WritableDeviceTypeSubdeviceRoleParent string = "parent" + + // WritableDeviceTypeSubdeviceRoleChild captures enum value "child" + WritableDeviceTypeSubdeviceRoleChild string = "child" +) + // prop value enum -func (m *WritableDeviceType) validateSubdeviceRoleEnum(path, location string, value bool) error { +func (m *WritableDeviceType) validateSubdeviceRoleEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableDeviceTypeTypeSubdeviceRolePropEnum); err != nil { return err } diff --git a/netbox/models/writable_device_with_config_context.go b/netbox/models/writable_device_with_config_context.go index e4a16e9968a4195fe5fb87cdc5b3db93eff54ca1..3021993c5e18b1888f33269265ba43bd1756bf77 100644 --- a/netbox/models/writable_device_with_config_context.go +++ b/netbox/models/writable_device_with_config_context.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -71,8 +71,8 @@ type WritableDeviceWithConfigContext struct { DisplayName string `json:"display_name,omitempty"` // Rack face - // Enum: [0 1] - Face *int64 `json:"face,omitempty"` + // Enum: [front rear] + Face string `json:"face,omitempty"` // ID // Read Only: true @@ -125,8 +125,8 @@ type WritableDeviceWithConfigContext struct { Site *int64 `json:"site"` // Status - // Enum: [1 0 2 3 4 5 6] - Status int64 `json:"status,omitempty"` + // Enum: [offline active planned staged failed inventory decommissioning] + Status string `json:"status,omitempty"` // tags Tags []string `json:"tags"` @@ -265,8 +265,8 @@ func (m *WritableDeviceWithConfigContext) validateDeviceType(formats strfmt.Regi var writableDeviceWithConfigContextTypeFacePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[0,1]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["front","rear"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -274,8 +274,17 @@ func init() { } } +const ( + + // WritableDeviceWithConfigContextFaceFront captures enum value "front" + WritableDeviceWithConfigContextFaceFront string = "front" + + // WritableDeviceWithConfigContextFaceRear captures enum value "rear" + WritableDeviceWithConfigContextFaceRear string = "rear" +) + // prop value enum -func (m *WritableDeviceWithConfigContext) validateFaceEnum(path, location string, value int64) error { +func (m *WritableDeviceWithConfigContext) validateFaceEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableDeviceWithConfigContextTypeFacePropEnum); err != nil { return err } @@ -289,7 +298,7 @@ func (m *WritableDeviceWithConfigContext) validateFace(formats strfmt.Registry) } // value enum - if err := m.validateFaceEnum("face", "body", *m.Face); err != nil { + if err := m.validateFaceEnum("face", "body", m.Face); err != nil { return err } @@ -382,8 +391,8 @@ func (m *WritableDeviceWithConfigContext) validateSite(formats strfmt.Registry) var writableDeviceWithConfigContextTypeStatusPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1,0,2,3,4,5,6]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["offline","active","planned","staged","failed","inventory","decommissioning"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -391,8 +400,32 @@ func init() { } } +const ( + + // WritableDeviceWithConfigContextStatusOffline captures enum value "offline" + WritableDeviceWithConfigContextStatusOffline string = "offline" + + // WritableDeviceWithConfigContextStatusActive captures enum value "active" + WritableDeviceWithConfigContextStatusActive string = "active" + + // WritableDeviceWithConfigContextStatusPlanned captures enum value "planned" + WritableDeviceWithConfigContextStatusPlanned string = "planned" + + // WritableDeviceWithConfigContextStatusStaged captures enum value "staged" + WritableDeviceWithConfigContextStatusStaged string = "staged" + + // WritableDeviceWithConfigContextStatusFailed captures enum value "failed" + WritableDeviceWithConfigContextStatusFailed string = "failed" + + // WritableDeviceWithConfigContextStatusInventory captures enum value "inventory" + WritableDeviceWithConfigContextStatusInventory string = "inventory" + + // WritableDeviceWithConfigContextStatusDecommissioning captures enum value "decommissioning" + WritableDeviceWithConfigContextStatusDecommissioning string = "decommissioning" +) + // prop value enum -func (m *WritableDeviceWithConfigContext) validateStatusEnum(path, location string, value int64) error { +func (m *WritableDeviceWithConfigContext) validateStatusEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableDeviceWithConfigContextTypeStatusPropEnum); err != nil { return err } diff --git a/netbox/models/writable_export_template.go b/netbox/models/writable_export_template.go index e58627219571ad047c7632c13e99252109f35077..6a49b903a35248e1606f9469fb438a920f1540fe 100644 --- a/netbox/models/writable_export_template.go +++ b/netbox/models/writable_export_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -42,6 +42,8 @@ type WritableExportTemplate struct { Description string `json:"description,omitempty"` // File extension + // + // Extension to append to the rendered filename // Max Length: 15 FileExtension string `json:"file_extension,omitempty"` @@ -49,7 +51,9 @@ type WritableExportTemplate struct { // Read Only: true ID int64 `json:"id,omitempty"` - // Mime type + // MIME type + // + // Defaults to <code>text/plain</code> // Max Length: 50 MimeType string `json:"mime_type,omitempty"` @@ -60,13 +64,15 @@ type WritableExportTemplate struct { Name *string `json:"name"` // Template code + // + // The list of objects being exported is passed as a context variable named <code>queryset</code>. // Required: true // Min Length: 1 TemplateCode *string `json:"template_code"` // Template language - // Enum: [10 20] - TemplateLanguage int64 `json:"template_language,omitempty"` + // Enum: [django jinja2] + TemplateLanguage string `json:"template_language,omitempty"` } // Validate validates this writable export template @@ -188,8 +194,8 @@ func (m *WritableExportTemplate) validateTemplateCode(formats strfmt.Registry) e var writableExportTemplateTypeTemplateLanguagePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[10,20]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["django","jinja2"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -197,8 +203,17 @@ func init() { } } +const ( + + // WritableExportTemplateTemplateLanguageDjango captures enum value "django" + WritableExportTemplateTemplateLanguageDjango string = "django" + + // WritableExportTemplateTemplateLanguageJinja2 captures enum value "jinja2" + WritableExportTemplateTemplateLanguageJinja2 string = "jinja2" +) + // prop value enum -func (m *WritableExportTemplate) validateTemplateLanguageEnum(path, location string, value int64) error { +func (m *WritableExportTemplate) validateTemplateLanguageEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableExportTemplateTypeTemplateLanguagePropEnum); err != nil { return err } diff --git a/netbox/models/writable_front_port.go b/netbox/models/writable_front_port.go index 1acedc53796a8858e61fadd952ee093b80492ef8..8aa2e7d60abb197eea6c268d1cc9bb3b65128eb7 100644 --- a/netbox/models/writable_front_port.go +++ b/netbox/models/writable_front_port.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -69,8 +69,8 @@ type WritableFrontPort struct { // Type // Required: true - // Enum: [1000 1100 2200 2300 2310 2600 2610 2500 2400 2100 2110 2000] - Type *int64 `json:"type"` + // Enum: [8p8c 110-punch bnc fc lc lc-apc lsh lsh-apc mpo mtrj sc sc-apc st] + Type *string `json:"type"` } // Validate validates this writable front port @@ -218,8 +218,8 @@ func (m *WritableFrontPort) validateTags(formats strfmt.Registry) error { var writableFrontPortTypeTypePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1000,1100,2200,2300,2310,2600,2610,2500,2400,2100,2110,2000]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["8p8c","110-punch","bnc","fc","lc","lc-apc","lsh","lsh-apc","mpo","mtrj","sc","sc-apc","st"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -227,8 +227,50 @@ func init() { } } +const ( + + // WritableFrontPortTypeNr8p8c captures enum value "8p8c" + WritableFrontPortTypeNr8p8c string = "8p8c" + + // WritableFrontPortTypeNr110Punch captures enum value "110-punch" + WritableFrontPortTypeNr110Punch string = "110-punch" + + // WritableFrontPortTypeBnc captures enum value "bnc" + WritableFrontPortTypeBnc string = "bnc" + + // WritableFrontPortTypeFc captures enum value "fc" + WritableFrontPortTypeFc string = "fc" + + // WritableFrontPortTypeLc captures enum value "lc" + WritableFrontPortTypeLc string = "lc" + + // WritableFrontPortTypeLcApc captures enum value "lc-apc" + WritableFrontPortTypeLcApc string = "lc-apc" + + // WritableFrontPortTypeLsh captures enum value "lsh" + WritableFrontPortTypeLsh string = "lsh" + + // WritableFrontPortTypeLshApc captures enum value "lsh-apc" + WritableFrontPortTypeLshApc string = "lsh-apc" + + // WritableFrontPortTypeMpo captures enum value "mpo" + WritableFrontPortTypeMpo string = "mpo" + + // WritableFrontPortTypeMtrj captures enum value "mtrj" + WritableFrontPortTypeMtrj string = "mtrj" + + // WritableFrontPortTypeSc captures enum value "sc" + WritableFrontPortTypeSc string = "sc" + + // WritableFrontPortTypeScApc captures enum value "sc-apc" + WritableFrontPortTypeScApc string = "sc-apc" + + // WritableFrontPortTypeSt captures enum value "st" + WritableFrontPortTypeSt string = "st" +) + // prop value enum -func (m *WritableFrontPort) validateTypeEnum(path, location string, value int64) error { +func (m *WritableFrontPort) validateTypeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableFrontPortTypeTypePropEnum); err != nil { return err } diff --git a/netbox/models/writable_front_port_template.go b/netbox/models/writable_front_port_template.go index 317ffc87ca8eb5f1a929c57813aea9dc90e94db4..a3f3b7b0de49bccbe9215bae41763a32a7aeaafb 100644 --- a/netbox/models/writable_front_port_template.go +++ b/netbox/models/writable_front_port_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -58,8 +58,8 @@ type WritableFrontPortTemplate struct { // Type // Required: true - // Enum: [1000 1100 2200 2300 2310 2600 2610 2500 2400 2100 2110 2000] - Type *int64 `json:"type"` + // Enum: [8p8c 110-punch bnc fc lc lc-apc lsh lsh-apc mpo mtrj sc sc-apc st] + Type *string `json:"type"` } // Validate validates this writable front port template @@ -147,8 +147,8 @@ func (m *WritableFrontPortTemplate) validateRearPortPosition(formats strfmt.Regi var writableFrontPortTemplateTypeTypePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1000,1100,2200,2300,2310,2600,2610,2500,2400,2100,2110,2000]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["8p8c","110-punch","bnc","fc","lc","lc-apc","lsh","lsh-apc","mpo","mtrj","sc","sc-apc","st"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -156,8 +156,50 @@ func init() { } } +const ( + + // WritableFrontPortTemplateTypeNr8p8c captures enum value "8p8c" + WritableFrontPortTemplateTypeNr8p8c string = "8p8c" + + // WritableFrontPortTemplateTypeNr110Punch captures enum value "110-punch" + WritableFrontPortTemplateTypeNr110Punch string = "110-punch" + + // WritableFrontPortTemplateTypeBnc captures enum value "bnc" + WritableFrontPortTemplateTypeBnc string = "bnc" + + // WritableFrontPortTemplateTypeFc captures enum value "fc" + WritableFrontPortTemplateTypeFc string = "fc" + + // WritableFrontPortTemplateTypeLc captures enum value "lc" + WritableFrontPortTemplateTypeLc string = "lc" + + // WritableFrontPortTemplateTypeLcApc captures enum value "lc-apc" + WritableFrontPortTemplateTypeLcApc string = "lc-apc" + + // WritableFrontPortTemplateTypeLsh captures enum value "lsh" + WritableFrontPortTemplateTypeLsh string = "lsh" + + // WritableFrontPortTemplateTypeLshApc captures enum value "lsh-apc" + WritableFrontPortTemplateTypeLshApc string = "lsh-apc" + + // WritableFrontPortTemplateTypeMpo captures enum value "mpo" + WritableFrontPortTemplateTypeMpo string = "mpo" + + // WritableFrontPortTemplateTypeMtrj captures enum value "mtrj" + WritableFrontPortTemplateTypeMtrj string = "mtrj" + + // WritableFrontPortTemplateTypeSc captures enum value "sc" + WritableFrontPortTemplateTypeSc string = "sc" + + // WritableFrontPortTemplateTypeScApc captures enum value "sc-apc" + WritableFrontPortTemplateTypeScApc string = "sc-apc" + + // WritableFrontPortTemplateTypeSt captures enum value "st" + WritableFrontPortTemplateTypeSt string = "st" +) + // prop value enum -func (m *WritableFrontPortTemplate) validateTypeEnum(path, location string, value int64) error { +func (m *WritableFrontPortTemplate) validateTypeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableFrontPortTemplateTypeTypePropEnum); err != nil { return err } diff --git a/netbox/models/writable_graph.go b/netbox/models/writable_graph.go deleted file mode 100644 index 3e5f5da28f7c1296ae412ac4814a09d1652a1c29..0000000000000000000000000000000000000000 --- a/netbox/models/writable_graph.go +++ /dev/null @@ -1,216 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// WritableGraph writable graph -// swagger:model WritableGraph -type WritableGraph struct { - - // ID - // Read Only: true - ID int64 `json:"id,omitempty"` - - // Link URL - // Max Length: 200 - // Format: uri - Link strfmt.URI `json:"link,omitempty"` - - // Name - // Required: true - // Max Length: 100 - // Min Length: 1 - Name *string `json:"name"` - - // Source URL - // Required: true - // Max Length: 500 - // Min Length: 1 - Source *string `json:"source"` - - // Type - // Required: true - // Enum: [100 200 300] - Type *int64 `json:"type"` - - // Weight - // Maximum: 32767 - // Minimum: 0 - Weight *int64 `json:"weight,omitempty"` -} - -// Validate validates this writable graph -func (m *WritableGraph) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLink(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWeight(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *WritableGraph) validateLink(formats strfmt.Registry) error { - - if swag.IsZero(m.Link) { // not required - return nil - } - - if err := validate.MaxLength("link", "body", string(m.Link), 200); err != nil { - return err - } - - if err := validate.FormatOf("link", "body", "uri", m.Link.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *WritableGraph) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - if err := validate.MinLength("name", "body", string(*m.Name), 1); err != nil { - return err - } - - if err := validate.MaxLength("name", "body", string(*m.Name), 100); err != nil { - return err - } - - return nil -} - -func (m *WritableGraph) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if err := validate.MinLength("source", "body", string(*m.Source), 1); err != nil { - return err - } - - if err := validate.MaxLength("source", "body", string(*m.Source), 500); err != nil { - return err - } - - return nil -} - -var writableGraphTypeTypePropEnum []interface{} - -func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[100,200,300]`), &res); err != nil { - panic(err) - } - for _, v := range res { - writableGraphTypeTypePropEnum = append(writableGraphTypeTypePropEnum, v) - } -} - -// prop value enum -func (m *WritableGraph) validateTypeEnum(path, location string, value int64) error { - if err := validate.Enum(path, location, value, writableGraphTypeTypePropEnum); err != nil { - return err - } - return nil -} - -func (m *WritableGraph) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *WritableGraph) validateWeight(formats strfmt.Registry) error { - - if swag.IsZero(m.Weight) { // not required - return nil - } - - if err := validate.MinimumInt("weight", "body", int64(*m.Weight), 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("weight", "body", int64(*m.Weight), 32767, false); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *WritableGraph) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WritableGraph) UnmarshalBinary(b []byte) error { - var res WritableGraph - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/netbox/models/writable_interface_template.go b/netbox/models/writable_interface_template.go index 2083366e2713f051a35c96bad636acb2ed0797fb..1aaed152301ba8a86607c5007ad4e2ba4bf5f259 100644 --- a/netbox/models/writable_interface_template.go +++ b/netbox/models/writable_interface_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -37,10 +37,6 @@ type WritableInterfaceTemplate struct { // Required: true DeviceType *int64 `json:"device_type"` - // Form factor - // Read Only: true - FormFactor string `json:"form_factor,omitempty"` - // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -55,8 +51,9 @@ type WritableInterfaceTemplate struct { Name *string `json:"name"` // Type - // Enum: [0 200 800 1000 1120 1130 1150 1170 1050 1100 1200 1300 1310 1320 1350 1400 1420 1500 1510 1650 1520 1550 1600 1700 1750 2600 2610 2620 2630 2640 2810 2820 2830 6100 6200 6300 6400 6500 6600 6700 3010 3020 3040 3080 3160 3320 3400 4000 4010 4040 4050 5000 5050 5100 5150 5200 5300 5310 5320 5330 32767] - Type int64 `json:"type,omitempty"` + // Required: true + // Enum: [virtual lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 128gfc-sfp28 inifiband-sdr inifiband-ddr inifiband-qdr inifiband-fdr10 inifiband-fdr inifiband-edr inifiband-hdr inifiband-ndr inifiband-xdr t1 e1 t3 e3 cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] + Type *string `json:"type"` } // Validate validates this writable interface template @@ -110,8 +107,8 @@ func (m *WritableInterfaceTemplate) validateName(formats strfmt.Registry) error var writableInterfaceTemplateTypeTypePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[0,200,800,1000,1120,1130,1150,1170,1050,1100,1200,1300,1310,1320,1350,1400,1420,1500,1510,1650,1520,1550,1600,1700,1750,2600,2610,2620,2630,2640,2810,2820,2830,6100,6200,6300,6400,6500,6600,6700,3010,3020,3040,3080,3160,3320,3400,4000,4010,4040,4050,5000,5050,5100,5150,5200,5300,5310,5320,5330,32767]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["virtual","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","128gfc-sfp28","inifiband-sdr","inifiband-ddr","inifiband-qdr","inifiband-fdr10","inifiband-fdr","inifiband-edr","inifiband-hdr","inifiband-ndr","inifiband-xdr","t1","e1","t3","e3","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -119,8 +116,227 @@ func init() { } } +const ( + + // WritableInterfaceTemplateTypeVirtual captures enum value "virtual" + WritableInterfaceTemplateTypeVirtual string = "virtual" + + // WritableInterfaceTemplateTypeLag captures enum value "lag" + WritableInterfaceTemplateTypeLag string = "lag" + + // WritableInterfaceTemplateTypeNr100baseTx captures enum value "100base-tx" + WritableInterfaceTemplateTypeNr100baseTx string = "100base-tx" + + // WritableInterfaceTemplateTypeNr1000baset captures enum value "1000base-t" + WritableInterfaceTemplateTypeNr1000baset string = "1000base-t" + + // WritableInterfaceTemplateTypeNr25gbaset captures enum value "2.5gbase-t" + WritableInterfaceTemplateTypeNr25gbaset string = "2.5gbase-t" + + // WritableInterfaceTemplateTypeNr5gbaset captures enum value "5gbase-t" + WritableInterfaceTemplateTypeNr5gbaset string = "5gbase-t" + + // WritableInterfaceTemplateTypeNr10gbaset captures enum value "10gbase-t" + WritableInterfaceTemplateTypeNr10gbaset string = "10gbase-t" + + // WritableInterfaceTemplateTypeNr10gbaseCx4 captures enum value "10gbase-cx4" + WritableInterfaceTemplateTypeNr10gbaseCx4 string = "10gbase-cx4" + + // WritableInterfaceTemplateTypeNr1000basexGbic captures enum value "1000base-x-gbic" + WritableInterfaceTemplateTypeNr1000basexGbic string = "1000base-x-gbic" + + // WritableInterfaceTemplateTypeNr1000basexSfp captures enum value "1000base-x-sfp" + WritableInterfaceTemplateTypeNr1000basexSfp string = "1000base-x-sfp" + + // WritableInterfaceTemplateTypeNr10gbasexSfpp captures enum value "10gbase-x-sfpp" + WritableInterfaceTemplateTypeNr10gbasexSfpp string = "10gbase-x-sfpp" + + // WritableInterfaceTemplateTypeNr10gbasexXfp captures enum value "10gbase-x-xfp" + WritableInterfaceTemplateTypeNr10gbasexXfp string = "10gbase-x-xfp" + + // WritableInterfaceTemplateTypeNr10gbasexXenpak captures enum value "10gbase-x-xenpak" + WritableInterfaceTemplateTypeNr10gbasexXenpak string = "10gbase-x-xenpak" + + // WritableInterfaceTemplateTypeNr10gbasexX2 captures enum value "10gbase-x-x2" + WritableInterfaceTemplateTypeNr10gbasexX2 string = "10gbase-x-x2" + + // WritableInterfaceTemplateTypeNr25gbasexSfp28 captures enum value "25gbase-x-sfp28" + WritableInterfaceTemplateTypeNr25gbasexSfp28 string = "25gbase-x-sfp28" + + // WritableInterfaceTemplateTypeNr40gbasexQsfpp captures enum value "40gbase-x-qsfpp" + WritableInterfaceTemplateTypeNr40gbasexQsfpp string = "40gbase-x-qsfpp" + + // WritableInterfaceTemplateTypeNr50gbasexSfp28 captures enum value "50gbase-x-sfp28" + WritableInterfaceTemplateTypeNr50gbasexSfp28 string = "50gbase-x-sfp28" + + // WritableInterfaceTemplateTypeNr100gbasexCfp captures enum value "100gbase-x-cfp" + WritableInterfaceTemplateTypeNr100gbasexCfp string = "100gbase-x-cfp" + + // WritableInterfaceTemplateTypeNr100gbasexCfp2 captures enum value "100gbase-x-cfp2" + WritableInterfaceTemplateTypeNr100gbasexCfp2 string = "100gbase-x-cfp2" + + // WritableInterfaceTemplateTypeNr200gbasexCfp2 captures enum value "200gbase-x-cfp2" + WritableInterfaceTemplateTypeNr200gbasexCfp2 string = "200gbase-x-cfp2" + + // WritableInterfaceTemplateTypeNr100gbasexCfp4 captures enum value "100gbase-x-cfp4" + WritableInterfaceTemplateTypeNr100gbasexCfp4 string = "100gbase-x-cfp4" + + // WritableInterfaceTemplateTypeNr100gbasexCpak captures enum value "100gbase-x-cpak" + WritableInterfaceTemplateTypeNr100gbasexCpak string = "100gbase-x-cpak" + + // WritableInterfaceTemplateTypeNr100gbasexQsfp28 captures enum value "100gbase-x-qsfp28" + WritableInterfaceTemplateTypeNr100gbasexQsfp28 string = "100gbase-x-qsfp28" + + // WritableInterfaceTemplateTypeNr200gbasexQsfp56 captures enum value "200gbase-x-qsfp56" + WritableInterfaceTemplateTypeNr200gbasexQsfp56 string = "200gbase-x-qsfp56" + + // WritableInterfaceTemplateTypeNr400gbasexQsfpdd captures enum value "400gbase-x-qsfpdd" + WritableInterfaceTemplateTypeNr400gbasexQsfpdd string = "400gbase-x-qsfpdd" + + // WritableInterfaceTemplateTypeNr400gbasexOsfp captures enum value "400gbase-x-osfp" + WritableInterfaceTemplateTypeNr400gbasexOsfp string = "400gbase-x-osfp" + + // WritableInterfaceTemplateTypeIeee80211a captures enum value "ieee802.11a" + WritableInterfaceTemplateTypeIeee80211a string = "ieee802.11a" + + // WritableInterfaceTemplateTypeIeee80211g captures enum value "ieee802.11g" + WritableInterfaceTemplateTypeIeee80211g string = "ieee802.11g" + + // WritableInterfaceTemplateTypeIeee80211n captures enum value "ieee802.11n" + WritableInterfaceTemplateTypeIeee80211n string = "ieee802.11n" + + // WritableInterfaceTemplateTypeIeee80211ac captures enum value "ieee802.11ac" + WritableInterfaceTemplateTypeIeee80211ac string = "ieee802.11ac" + + // WritableInterfaceTemplateTypeIeee80211ad captures enum value "ieee802.11ad" + WritableInterfaceTemplateTypeIeee80211ad string = "ieee802.11ad" + + // WritableInterfaceTemplateTypeIeee80211ax captures enum value "ieee802.11ax" + WritableInterfaceTemplateTypeIeee80211ax string = "ieee802.11ax" + + // WritableInterfaceTemplateTypeGsm captures enum value "gsm" + WritableInterfaceTemplateTypeGsm string = "gsm" + + // WritableInterfaceTemplateTypeCdma captures enum value "cdma" + WritableInterfaceTemplateTypeCdma string = "cdma" + + // WritableInterfaceTemplateTypeLte captures enum value "lte" + WritableInterfaceTemplateTypeLte string = "lte" + + // WritableInterfaceTemplateTypeSonetOc3 captures enum value "sonet-oc3" + WritableInterfaceTemplateTypeSonetOc3 string = "sonet-oc3" + + // WritableInterfaceTemplateTypeSonetOc12 captures enum value "sonet-oc12" + WritableInterfaceTemplateTypeSonetOc12 string = "sonet-oc12" + + // WritableInterfaceTemplateTypeSonetOc48 captures enum value "sonet-oc48" + WritableInterfaceTemplateTypeSonetOc48 string = "sonet-oc48" + + // WritableInterfaceTemplateTypeSonetOc192 captures enum value "sonet-oc192" + WritableInterfaceTemplateTypeSonetOc192 string = "sonet-oc192" + + // WritableInterfaceTemplateTypeSonetOc768 captures enum value "sonet-oc768" + WritableInterfaceTemplateTypeSonetOc768 string = "sonet-oc768" + + // WritableInterfaceTemplateTypeSonetOc1920 captures enum value "sonet-oc1920" + WritableInterfaceTemplateTypeSonetOc1920 string = "sonet-oc1920" + + // WritableInterfaceTemplateTypeSonetOc3840 captures enum value "sonet-oc3840" + WritableInterfaceTemplateTypeSonetOc3840 string = "sonet-oc3840" + + // WritableInterfaceTemplateTypeNr1gfcSfp captures enum value "1gfc-sfp" + WritableInterfaceTemplateTypeNr1gfcSfp string = "1gfc-sfp" + + // WritableInterfaceTemplateTypeNr2gfcSfp captures enum value "2gfc-sfp" + WritableInterfaceTemplateTypeNr2gfcSfp string = "2gfc-sfp" + + // WritableInterfaceTemplateTypeNr4gfcSfp captures enum value "4gfc-sfp" + WritableInterfaceTemplateTypeNr4gfcSfp string = "4gfc-sfp" + + // WritableInterfaceTemplateTypeNr8gfcSfpp captures enum value "8gfc-sfpp" + WritableInterfaceTemplateTypeNr8gfcSfpp string = "8gfc-sfpp" + + // WritableInterfaceTemplateTypeNr16gfcSfpp captures enum value "16gfc-sfpp" + WritableInterfaceTemplateTypeNr16gfcSfpp string = "16gfc-sfpp" + + // WritableInterfaceTemplateTypeNr32gfcSfp28 captures enum value "32gfc-sfp28" + WritableInterfaceTemplateTypeNr32gfcSfp28 string = "32gfc-sfp28" + + // WritableInterfaceTemplateTypeNr128gfcSfp28 captures enum value "128gfc-sfp28" + WritableInterfaceTemplateTypeNr128gfcSfp28 string = "128gfc-sfp28" + + // WritableInterfaceTemplateTypeInifibandSdr captures enum value "inifiband-sdr" + WritableInterfaceTemplateTypeInifibandSdr string = "inifiband-sdr" + + // WritableInterfaceTemplateTypeInifibandDdr captures enum value "inifiband-ddr" + WritableInterfaceTemplateTypeInifibandDdr string = "inifiband-ddr" + + // WritableInterfaceTemplateTypeInifibandQdr captures enum value "inifiband-qdr" + WritableInterfaceTemplateTypeInifibandQdr string = "inifiband-qdr" + + // WritableInterfaceTemplateTypeInifibandFdr10 captures enum value "inifiband-fdr10" + WritableInterfaceTemplateTypeInifibandFdr10 string = "inifiband-fdr10" + + // WritableInterfaceTemplateTypeInifibandFdr captures enum value "inifiband-fdr" + WritableInterfaceTemplateTypeInifibandFdr string = "inifiband-fdr" + + // WritableInterfaceTemplateTypeInifibandEdr captures enum value "inifiband-edr" + WritableInterfaceTemplateTypeInifibandEdr string = "inifiband-edr" + + // WritableInterfaceTemplateTypeInifibandHdr captures enum value "inifiband-hdr" + WritableInterfaceTemplateTypeInifibandHdr string = "inifiband-hdr" + + // WritableInterfaceTemplateTypeInifibandNdr captures enum value "inifiband-ndr" + WritableInterfaceTemplateTypeInifibandNdr string = "inifiband-ndr" + + // WritableInterfaceTemplateTypeInifibandXdr captures enum value "inifiband-xdr" + WritableInterfaceTemplateTypeInifibandXdr string = "inifiband-xdr" + + // WritableInterfaceTemplateTypeT1 captures enum value "t1" + WritableInterfaceTemplateTypeT1 string = "t1" + + // WritableInterfaceTemplateTypeE1 captures enum value "e1" + WritableInterfaceTemplateTypeE1 string = "e1" + + // WritableInterfaceTemplateTypeT3 captures enum value "t3" + WritableInterfaceTemplateTypeT3 string = "t3" + + // WritableInterfaceTemplateTypeE3 captures enum value "e3" + WritableInterfaceTemplateTypeE3 string = "e3" + + // WritableInterfaceTemplateTypeCiscoStackwise captures enum value "cisco-stackwise" + WritableInterfaceTemplateTypeCiscoStackwise string = "cisco-stackwise" + + // WritableInterfaceTemplateTypeCiscoStackwisePlus captures enum value "cisco-stackwise-plus" + WritableInterfaceTemplateTypeCiscoStackwisePlus string = "cisco-stackwise-plus" + + // WritableInterfaceTemplateTypeCiscoFlexstack captures enum value "cisco-flexstack" + WritableInterfaceTemplateTypeCiscoFlexstack string = "cisco-flexstack" + + // WritableInterfaceTemplateTypeCiscoFlexstackPlus captures enum value "cisco-flexstack-plus" + WritableInterfaceTemplateTypeCiscoFlexstackPlus string = "cisco-flexstack-plus" + + // WritableInterfaceTemplateTypeJuniperVcp captures enum value "juniper-vcp" + WritableInterfaceTemplateTypeJuniperVcp string = "juniper-vcp" + + // WritableInterfaceTemplateTypeExtremeSummitstack captures enum value "extreme-summitstack" + WritableInterfaceTemplateTypeExtremeSummitstack string = "extreme-summitstack" + + // WritableInterfaceTemplateTypeExtremeSummitstack128 captures enum value "extreme-summitstack-128" + WritableInterfaceTemplateTypeExtremeSummitstack128 string = "extreme-summitstack-128" + + // WritableInterfaceTemplateTypeExtremeSummitstack256 captures enum value "extreme-summitstack-256" + WritableInterfaceTemplateTypeExtremeSummitstack256 string = "extreme-summitstack-256" + + // WritableInterfaceTemplateTypeExtremeSummitstack512 captures enum value "extreme-summitstack-512" + WritableInterfaceTemplateTypeExtremeSummitstack512 string = "extreme-summitstack-512" + + // WritableInterfaceTemplateTypeOther captures enum value "other" + WritableInterfaceTemplateTypeOther string = "other" +) + // prop value enum -func (m *WritableInterfaceTemplate) validateTypeEnum(path, location string, value int64) error { +func (m *WritableInterfaceTemplate) validateTypeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableInterfaceTemplateTypeTypePropEnum); err != nil { return err } @@ -129,12 +345,12 @@ func (m *WritableInterfaceTemplate) validateTypeEnum(path, location string, valu func (m *WritableInterfaceTemplate) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil + if err := validate.Required("type", "body", m.Type); err != nil { + return err } // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { return err } diff --git a/netbox/models/writable_inventory_item.go b/netbox/models/writable_inventory_item.go index 658925233401c27a0204b369d5de1f9d1d784402..a5f037bcbea383ff2318d34633e959b8182dadba 100644 --- a/netbox/models/writable_inventory_item.go +++ b/netbox/models/writable_inventory_item.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/writable_ip_address.go b/netbox/models/writable_ip_address.go index 7dd9d20b4d809d679e2b7bc28336c4bae09989ab..2a48eaf67dc696ec68872fcb6e57802f63460de4 100644 --- a/netbox/models/writable_ip_address.go +++ b/netbox/models/writable_ip_address.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -56,7 +56,7 @@ type WritableIPAddress struct { // // Hostname or FQDN (not case-sensitive) // Max Length: 255 - // Pattern: ^[0-9A-Za-z.-]+$ + // Pattern: ^[0-9A-Za-z._-]+$ DNSName string `json:"dns_name,omitempty"` // Family @@ -87,14 +87,14 @@ type WritableIPAddress struct { // Role // // The functional role of this IP - // Enum: [10 20 30 40 41 42 43 44] - Role *int64 `json:"role,omitempty"` + // Enum: [loopback secondary anycast vip vrrp hsrp glbp carp] + Role string `json:"role,omitempty"` // Status // // The operational status of this IP - // Enum: [1 2 3 5] - Status int64 `json:"status,omitempty"` + // Enum: [active reserved deprecated dhcp] + Status string `json:"status,omitempty"` // tags Tags []string `json:"tags"` @@ -197,7 +197,7 @@ func (m *WritableIPAddress) validateDNSName(formats strfmt.Registry) error { return err } - if err := validate.Pattern("dns_name", "body", string(m.DNSName), `^[0-9A-Za-z.-]+$`); err != nil { + if err := validate.Pattern("dns_name", "body", string(m.DNSName), `^[0-9A-Za-z._-]+$`); err != nil { return err } @@ -229,8 +229,8 @@ func (m *WritableIPAddress) validateNatOutside(formats strfmt.Registry) error { var writableIpAddressTypeRolePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[10,20,30,40,41,42,43,44]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["loopback","secondary","anycast","vip","vrrp","hsrp","glbp","carp"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -238,8 +238,35 @@ func init() { } } +const ( + + // WritableIPAddressRoleLoopback captures enum value "loopback" + WritableIPAddressRoleLoopback string = "loopback" + + // WritableIPAddressRoleSecondary captures enum value "secondary" + WritableIPAddressRoleSecondary string = "secondary" + + // WritableIPAddressRoleAnycast captures enum value "anycast" + WritableIPAddressRoleAnycast string = "anycast" + + // WritableIPAddressRoleVip captures enum value "vip" + WritableIPAddressRoleVip string = "vip" + + // WritableIPAddressRoleVrrp captures enum value "vrrp" + WritableIPAddressRoleVrrp string = "vrrp" + + // WritableIPAddressRoleHsrp captures enum value "hsrp" + WritableIPAddressRoleHsrp string = "hsrp" + + // WritableIPAddressRoleGlbp captures enum value "glbp" + WritableIPAddressRoleGlbp string = "glbp" + + // WritableIPAddressRoleCarp captures enum value "carp" + WritableIPAddressRoleCarp string = "carp" +) + // prop value enum -func (m *WritableIPAddress) validateRoleEnum(path, location string, value int64) error { +func (m *WritableIPAddress) validateRoleEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableIpAddressTypeRolePropEnum); err != nil { return err } @@ -253,7 +280,7 @@ func (m *WritableIPAddress) validateRole(formats strfmt.Registry) error { } // value enum - if err := m.validateRoleEnum("role", "body", *m.Role); err != nil { + if err := m.validateRoleEnum("role", "body", m.Role); err != nil { return err } @@ -263,8 +290,8 @@ func (m *WritableIPAddress) validateRole(formats strfmt.Registry) error { var writableIpAddressTypeStatusPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1,2,3,5]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["active","reserved","deprecated","dhcp"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -272,8 +299,23 @@ func init() { } } +const ( + + // WritableIPAddressStatusActive captures enum value "active" + WritableIPAddressStatusActive string = "active" + + // WritableIPAddressStatusReserved captures enum value "reserved" + WritableIPAddressStatusReserved string = "reserved" + + // WritableIPAddressStatusDeprecated captures enum value "deprecated" + WritableIPAddressStatusDeprecated string = "deprecated" + + // WritableIPAddressStatusDhcp captures enum value "dhcp" + WritableIPAddressStatusDhcp string = "dhcp" +) + // prop value enum -func (m *WritableIPAddress) validateStatusEnum(path, location string, value int64) error { +func (m *WritableIPAddress) validateStatusEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableIpAddressTypeStatusPropEnum); err != nil { return err } diff --git a/netbox/models/writable_platform.go b/netbox/models/writable_platform.go index 72218a03543513ba9a358ec9db6698595f237636..87e49b6b7c7e71f46a4c88ce23130b7f1015e803 100644 --- a/netbox/models/writable_platform.go +++ b/netbox/models/writable_platform.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -46,7 +46,7 @@ type WritablePlatform struct { // Name // Required: true - // Max Length: 50 + // Max Length: 100 // Min Length: 1 Name *string `json:"name"` @@ -63,7 +63,7 @@ type WritablePlatform struct { // Slug // Required: true - // Max Length: 50 + // Max Length: 100 // Min Length: 1 // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` @@ -105,7 +105,7 @@ func (m *WritablePlatform) validateName(formats strfmt.Registry) error { return err } - if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil { + if err := validate.MaxLength("name", "body", string(*m.Name), 100); err != nil { return err } @@ -135,7 +135,7 @@ func (m *WritablePlatform) validateSlug(formats strfmt.Registry) error { return err } - if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil { + if err := validate.MaxLength("slug", "body", string(*m.Slug), 100); err != nil { return err } diff --git a/netbox/models/writable_power_feed.go b/netbox/models/writable_power_feed.go index 6f47a5807bfc28699ae5005e52fa4fed2aedb634..f8a011ac6e3f7571a3aec57482d739764dafdd36 100644 --- a/netbox/models/writable_power_feed.go +++ b/netbox/models/writable_power_feed.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -73,8 +73,8 @@ type WritablePowerFeed struct { Name *string `json:"name"` // Phase - // Enum: [1 3] - Phase int64 `json:"phase,omitempty"` + // Enum: [single-phase three-phase] + Phase string `json:"phase,omitempty"` // Power panel // Required: true @@ -84,19 +84,19 @@ type WritablePowerFeed struct { Rack *int64 `json:"rack,omitempty"` // Status - // Enum: [1 0 2 4] - Status int64 `json:"status,omitempty"` + // Enum: [offline active planned failed] + Status string `json:"status,omitempty"` // Supply - // Enum: [1 2] - Supply int64 `json:"supply,omitempty"` + // Enum: [ac dc] + Supply string `json:"supply,omitempty"` // tags Tags []string `json:"tags"` // Type - // Enum: [1 2] - Type int64 `json:"type,omitempty"` + // Enum: [primary redundant] + Type string `json:"type,omitempty"` // Voltage // Maximum: 32767 @@ -242,8 +242,8 @@ func (m *WritablePowerFeed) validateName(formats strfmt.Registry) error { var writablePowerFeedTypePhasePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1,3]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["single-phase","three-phase"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -251,8 +251,17 @@ func init() { } } +const ( + + // WritablePowerFeedPhaseSinglePhase captures enum value "single-phase" + WritablePowerFeedPhaseSinglePhase string = "single-phase" + + // WritablePowerFeedPhaseThreePhase captures enum value "three-phase" + WritablePowerFeedPhaseThreePhase string = "three-phase" +) + // prop value enum -func (m *WritablePowerFeed) validatePhaseEnum(path, location string, value int64) error { +func (m *WritablePowerFeed) validatePhaseEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writablePowerFeedTypePhasePropEnum); err != nil { return err } @@ -285,8 +294,8 @@ func (m *WritablePowerFeed) validatePowerPanel(formats strfmt.Registry) error { var writablePowerFeedTypeStatusPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1,0,2,4]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["offline","active","planned","failed"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -294,8 +303,23 @@ func init() { } } +const ( + + // WritablePowerFeedStatusOffline captures enum value "offline" + WritablePowerFeedStatusOffline string = "offline" + + // WritablePowerFeedStatusActive captures enum value "active" + WritablePowerFeedStatusActive string = "active" + + // WritablePowerFeedStatusPlanned captures enum value "planned" + WritablePowerFeedStatusPlanned string = "planned" + + // WritablePowerFeedStatusFailed captures enum value "failed" + WritablePowerFeedStatusFailed string = "failed" +) + // prop value enum -func (m *WritablePowerFeed) validateStatusEnum(path, location string, value int64) error { +func (m *WritablePowerFeed) validateStatusEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writablePowerFeedTypeStatusPropEnum); err != nil { return err } @@ -319,8 +343,8 @@ func (m *WritablePowerFeed) validateStatus(formats strfmt.Registry) error { var writablePowerFeedTypeSupplyPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1,2]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["ac","dc"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -328,8 +352,17 @@ func init() { } } +const ( + + // WritablePowerFeedSupplyAc captures enum value "ac" + WritablePowerFeedSupplyAc string = "ac" + + // WritablePowerFeedSupplyDc captures enum value "dc" + WritablePowerFeedSupplyDc string = "dc" +) + // prop value enum -func (m *WritablePowerFeed) validateSupplyEnum(path, location string, value int64) error { +func (m *WritablePowerFeed) validateSupplyEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writablePowerFeedTypeSupplyPropEnum); err != nil { return err } @@ -370,8 +403,8 @@ func (m *WritablePowerFeed) validateTags(formats strfmt.Registry) error { var writablePowerFeedTypeTypePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1,2]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["primary","redundant"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -379,8 +412,17 @@ func init() { } } +const ( + + // WritablePowerFeedTypePrimary captures enum value "primary" + WritablePowerFeedTypePrimary string = "primary" + + // WritablePowerFeedTypeRedundant captures enum value "redundant" + WritablePowerFeedTypeRedundant string = "redundant" +) + // prop value enum -func (m *WritablePowerFeed) validateTypeEnum(path, location string, value int64) error { +func (m *WritablePowerFeed) validateTypeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writablePowerFeedTypeTypePropEnum); err != nil { return err } diff --git a/netbox/models/writable_power_outlet.go b/netbox/models/writable_power_outlet.go index 0462ac7cebd0ff6f76de3dab24716ac0170ead4d..1e53fdb8373e325a899e1012f08cd1b14ff0d881 100644 --- a/netbox/models/writable_power_outlet.go +++ b/netbox/models/writable_power_outlet.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -64,8 +64,8 @@ type WritablePowerOutlet struct { // Feed leg // // Phase (for three-phase feeds) - // Enum: [1 2 3] - FeedLeg *int64 `json:"feed_leg,omitempty"` + // Enum: [A B C] + FeedLeg string `json:"feed_leg,omitempty"` // ID // Read Only: true @@ -82,6 +82,10 @@ type WritablePowerOutlet struct { // tags Tags []string `json:"tags"` + + // Type + // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 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-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-20r nema-l6-30r nema-l6-50r 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] + Type string `json:"type,omitempty"` } // Validate validates this writable power outlet @@ -116,6 +120,10 @@ func (m *WritablePowerOutlet) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -199,8 +207,8 @@ func (m *WritablePowerOutlet) validateDevice(formats strfmt.Registry) error { var writablePowerOutletTypeFeedLegPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1,2,3]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["A","B","C"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -208,8 +216,20 @@ func init() { } } +const ( + + // WritablePowerOutletFeedLegA captures enum value "A" + WritablePowerOutletFeedLegA string = "A" + + // WritablePowerOutletFeedLegB captures enum value "B" + WritablePowerOutletFeedLegB string = "B" + + // WritablePowerOutletFeedLegC captures enum value "C" + WritablePowerOutletFeedLegC string = "C" +) + // prop value enum -func (m *WritablePowerOutlet) validateFeedLegEnum(path, location string, value int64) error { +func (m *WritablePowerOutlet) validateFeedLegEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writablePowerOutletTypeFeedLegPropEnum); err != nil { return err } @@ -223,7 +243,7 @@ func (m *WritablePowerOutlet) validateFeedLeg(formats strfmt.Registry) error { } // value enum - if err := m.validateFeedLegEnum("feed_leg", "body", *m.FeedLeg); err != nil { + if err := m.validateFeedLegEnum("feed_leg", "body", m.FeedLeg); err != nil { return err } @@ -264,6 +284,190 @@ func (m *WritablePowerOutlet) validateTags(formats strfmt.Registry) error { return nil } +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-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-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-20r","nema-l6-30r","nema-l6-50r","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"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writablePowerOutletTypeTypePropEnum = append(writablePowerOutletTypeTypePropEnum, v) + } +} + +const ( + + // WritablePowerOutletTypeIec60320C5 captures enum value "iec-60320-c5" + WritablePowerOutletTypeIec60320C5 string = "iec-60320-c5" + + // WritablePowerOutletTypeIec60320C7 captures enum value "iec-60320-c7" + WritablePowerOutletTypeIec60320C7 string = "iec-60320-c7" + + // WritablePowerOutletTypeIec60320C13 captures enum value "iec-60320-c13" + WritablePowerOutletTypeIec60320C13 string = "iec-60320-c13" + + // WritablePowerOutletTypeIec60320C15 captures enum value "iec-60320-c15" + WritablePowerOutletTypeIec60320C15 string = "iec-60320-c15" + + // WritablePowerOutletTypeIec60320C19 captures enum value "iec-60320-c19" + WritablePowerOutletTypeIec60320C19 string = "iec-60320-c19" + + // WritablePowerOutletTypeIec60309pne4h captures enum value "iec-60309-p-n-e-4h" + WritablePowerOutletTypeIec60309pne4h string = "iec-60309-p-n-e-4h" + + // WritablePowerOutletTypeIec60309pne6h captures enum value "iec-60309-p-n-e-6h" + WritablePowerOutletTypeIec60309pne6h string = "iec-60309-p-n-e-6h" + + // WritablePowerOutletTypeIec60309pne9h captures enum value "iec-60309-p-n-e-9h" + WritablePowerOutletTypeIec60309pne9h string = "iec-60309-p-n-e-9h" + + // WritablePowerOutletTypeIec603092pe4h captures enum value "iec-60309-2p-e-4h" + WritablePowerOutletTypeIec603092pe4h string = "iec-60309-2p-e-4h" + + // WritablePowerOutletTypeIec603092pe6h captures enum value "iec-60309-2p-e-6h" + WritablePowerOutletTypeIec603092pe6h string = "iec-60309-2p-e-6h" + + // WritablePowerOutletTypeIec603092pe9h captures enum value "iec-60309-2p-e-9h" + WritablePowerOutletTypeIec603092pe9h string = "iec-60309-2p-e-9h" + + // WritablePowerOutletTypeIec603093pe4h captures enum value "iec-60309-3p-e-4h" + WritablePowerOutletTypeIec603093pe4h string = "iec-60309-3p-e-4h" + + // WritablePowerOutletTypeIec603093pe6h captures enum value "iec-60309-3p-e-6h" + WritablePowerOutletTypeIec603093pe6h string = "iec-60309-3p-e-6h" + + // WritablePowerOutletTypeIec603093pe9h captures enum value "iec-60309-3p-e-9h" + WritablePowerOutletTypeIec603093pe9h string = "iec-60309-3p-e-9h" + + // WritablePowerOutletTypeIec603093pne4h captures enum value "iec-60309-3p-n-e-4h" + WritablePowerOutletTypeIec603093pne4h string = "iec-60309-3p-n-e-4h" + + // WritablePowerOutletTypeIec603093pne6h captures enum value "iec-60309-3p-n-e-6h" + WritablePowerOutletTypeIec603093pne6h string = "iec-60309-3p-n-e-6h" + + // WritablePowerOutletTypeIec603093pne9h captures enum value "iec-60309-3p-n-e-9h" + WritablePowerOutletTypeIec603093pne9h string = "iec-60309-3p-n-e-9h" + + // WritablePowerOutletTypeNema515r captures enum value "nema-5-15r" + WritablePowerOutletTypeNema515r string = "nema-5-15r" + + // WritablePowerOutletTypeNema520r captures enum value "nema-5-20r" + WritablePowerOutletTypeNema520r string = "nema-5-20r" + + // WritablePowerOutletTypeNema530r captures enum value "nema-5-30r" + WritablePowerOutletTypeNema530r string = "nema-5-30r" + + // WritablePowerOutletTypeNema550r captures enum value "nema-5-50r" + WritablePowerOutletTypeNema550r string = "nema-5-50r" + + // WritablePowerOutletTypeNema615r captures enum value "nema-6-15r" + WritablePowerOutletTypeNema615r string = "nema-6-15r" + + // WritablePowerOutletTypeNema620r captures enum value "nema-6-20r" + WritablePowerOutletTypeNema620r string = "nema-6-20r" + + // WritablePowerOutletTypeNema630r captures enum value "nema-6-30r" + WritablePowerOutletTypeNema630r string = "nema-6-30r" + + // WritablePowerOutletTypeNema650r captures enum value "nema-6-50r" + WritablePowerOutletTypeNema650r string = "nema-6-50r" + + // WritablePowerOutletTypeNemaL515r captures enum value "nema-l5-15r" + WritablePowerOutletTypeNemaL515r string = "nema-l5-15r" + + // WritablePowerOutletTypeNemaL520r captures enum value "nema-l5-20r" + WritablePowerOutletTypeNemaL520r string = "nema-l5-20r" + + // WritablePowerOutletTypeNemaL530r captures enum value "nema-l5-30r" + WritablePowerOutletTypeNemaL530r string = "nema-l5-30r" + + // WritablePowerOutletTypeNemaL550r captures enum value "nema-l5-50r" + WritablePowerOutletTypeNemaL550r string = "nema-l5-50r" + + // WritablePowerOutletTypeNemaL620r captures enum value "nema-l6-20r" + WritablePowerOutletTypeNemaL620r string = "nema-l6-20r" + + // WritablePowerOutletTypeNemaL630r captures enum value "nema-l6-30r" + WritablePowerOutletTypeNemaL630r string = "nema-l6-30r" + + // WritablePowerOutletTypeNemaL650r captures enum value "nema-l6-50r" + WritablePowerOutletTypeNemaL650r string = "nema-l6-50r" + + // WritablePowerOutletTypeCS6360C captures enum value "CS6360C" + WritablePowerOutletTypeCS6360C string = "CS6360C" + + // WritablePowerOutletTypeCS6364C captures enum value "CS6364C" + WritablePowerOutletTypeCS6364C string = "CS6364C" + + // WritablePowerOutletTypeCS8164C captures enum value "CS8164C" + WritablePowerOutletTypeCS8164C string = "CS8164C" + + // WritablePowerOutletTypeCS8264C captures enum value "CS8264C" + WritablePowerOutletTypeCS8264C string = "CS8264C" + + // WritablePowerOutletTypeCS8364C captures enum value "CS8364C" + WritablePowerOutletTypeCS8364C string = "CS8364C" + + // WritablePowerOutletTypeCS8464C captures enum value "CS8464C" + WritablePowerOutletTypeCS8464C string = "CS8464C" + + // WritablePowerOutletTypeItae captures enum value "ita-e" + WritablePowerOutletTypeItae string = "ita-e" + + // WritablePowerOutletTypeItaf captures enum value "ita-f" + WritablePowerOutletTypeItaf string = "ita-f" + + // WritablePowerOutletTypeItag captures enum value "ita-g" + WritablePowerOutletTypeItag string = "ita-g" + + // WritablePowerOutletTypeItah captures enum value "ita-h" + WritablePowerOutletTypeItah string = "ita-h" + + // WritablePowerOutletTypeItai captures enum value "ita-i" + WritablePowerOutletTypeItai string = "ita-i" + + // WritablePowerOutletTypeItaj captures enum value "ita-j" + WritablePowerOutletTypeItaj string = "ita-j" + + // WritablePowerOutletTypeItak captures enum value "ita-k" + WritablePowerOutletTypeItak string = "ita-k" + + // WritablePowerOutletTypeItal captures enum value "ita-l" + WritablePowerOutletTypeItal string = "ita-l" + + // WritablePowerOutletTypeItam captures enum value "ita-m" + WritablePowerOutletTypeItam string = "ita-m" + + // WritablePowerOutletTypeItan captures enum value "ita-n" + WritablePowerOutletTypeItan string = "ita-n" + + // WritablePowerOutletTypeItao captures enum value "ita-o" + WritablePowerOutletTypeItao string = "ita-o" +) + +// prop value enum +func (m *WritablePowerOutlet) validateTypeEnum(path, location string, value string) error { + if err := validate.Enum(path, location, value, writablePowerOutletTypeTypePropEnum); err != nil { + return err + } + return nil +} + +func (m *WritablePowerOutlet) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *WritablePowerOutlet) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/netbox/models/writable_power_outlet_template.go b/netbox/models/writable_power_outlet_template.go index c3b3f9db0afa24783e22acb7e0b92fe3d828bfd7..f6c049329bfa84124b3901dd697eee01cc6e7056 100644 --- a/netbox/models/writable_power_outlet_template.go +++ b/netbox/models/writable_power_outlet_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -40,8 +40,8 @@ type WritablePowerOutletTemplate struct { // Feed leg // // Phase (for three-phase feeds) - // Enum: [1 2 3] - FeedLeg *int64 `json:"feed_leg,omitempty"` + // Enum: [A B C] + FeedLeg string `json:"feed_leg,omitempty"` // ID // Read Only: true @@ -55,6 +55,10 @@ type WritablePowerOutletTemplate struct { // power port PowerPort *PowerPortTemplate `json:"power_port,omitempty"` + + // Type + // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 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-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-20r nema-l6-30r nema-l6-50r 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] + Type string `json:"type,omitempty"` } // Validate validates this writable power outlet template @@ -77,6 +81,10 @@ func (m *WritablePowerOutletTemplate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -95,8 +103,8 @@ func (m *WritablePowerOutletTemplate) validateDeviceType(formats strfmt.Registry var writablePowerOutletTemplateTypeFeedLegPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1,2,3]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["A","B","C"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -104,8 +112,20 @@ func init() { } } +const ( + + // WritablePowerOutletTemplateFeedLegA captures enum value "A" + WritablePowerOutletTemplateFeedLegA string = "A" + + // WritablePowerOutletTemplateFeedLegB captures enum value "B" + WritablePowerOutletTemplateFeedLegB string = "B" + + // WritablePowerOutletTemplateFeedLegC captures enum value "C" + WritablePowerOutletTemplateFeedLegC string = "C" +) + // prop value enum -func (m *WritablePowerOutletTemplate) validateFeedLegEnum(path, location string, value int64) error { +func (m *WritablePowerOutletTemplate) validateFeedLegEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writablePowerOutletTemplateTypeFeedLegPropEnum); err != nil { return err } @@ -119,7 +139,7 @@ func (m *WritablePowerOutletTemplate) validateFeedLeg(formats strfmt.Registry) e } // value enum - if err := m.validateFeedLegEnum("feed_leg", "body", *m.FeedLeg); err != nil { + if err := m.validateFeedLegEnum("feed_leg", "body", m.FeedLeg); err != nil { return err } @@ -161,6 +181,190 @@ func (m *WritablePowerOutletTemplate) validatePowerPort(formats strfmt.Registry) return nil } +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-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-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-20r","nema-l6-30r","nema-l6-50r","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"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writablePowerOutletTemplateTypeTypePropEnum = append(writablePowerOutletTemplateTypeTypePropEnum, v) + } +} + +const ( + + // WritablePowerOutletTemplateTypeIec60320C5 captures enum value "iec-60320-c5" + WritablePowerOutletTemplateTypeIec60320C5 string = "iec-60320-c5" + + // WritablePowerOutletTemplateTypeIec60320C7 captures enum value "iec-60320-c7" + WritablePowerOutletTemplateTypeIec60320C7 string = "iec-60320-c7" + + // WritablePowerOutletTemplateTypeIec60320C13 captures enum value "iec-60320-c13" + WritablePowerOutletTemplateTypeIec60320C13 string = "iec-60320-c13" + + // WritablePowerOutletTemplateTypeIec60320C15 captures enum value "iec-60320-c15" + WritablePowerOutletTemplateTypeIec60320C15 string = "iec-60320-c15" + + // WritablePowerOutletTemplateTypeIec60320C19 captures enum value "iec-60320-c19" + WritablePowerOutletTemplateTypeIec60320C19 string = "iec-60320-c19" + + // WritablePowerOutletTemplateTypeIec60309pne4h captures enum value "iec-60309-p-n-e-4h" + WritablePowerOutletTemplateTypeIec60309pne4h string = "iec-60309-p-n-e-4h" + + // WritablePowerOutletTemplateTypeIec60309pne6h captures enum value "iec-60309-p-n-e-6h" + WritablePowerOutletTemplateTypeIec60309pne6h string = "iec-60309-p-n-e-6h" + + // WritablePowerOutletTemplateTypeIec60309pne9h captures enum value "iec-60309-p-n-e-9h" + WritablePowerOutletTemplateTypeIec60309pne9h string = "iec-60309-p-n-e-9h" + + // WritablePowerOutletTemplateTypeIec603092pe4h captures enum value "iec-60309-2p-e-4h" + WritablePowerOutletTemplateTypeIec603092pe4h string = "iec-60309-2p-e-4h" + + // WritablePowerOutletTemplateTypeIec603092pe6h captures enum value "iec-60309-2p-e-6h" + WritablePowerOutletTemplateTypeIec603092pe6h string = "iec-60309-2p-e-6h" + + // WritablePowerOutletTemplateTypeIec603092pe9h captures enum value "iec-60309-2p-e-9h" + WritablePowerOutletTemplateTypeIec603092pe9h string = "iec-60309-2p-e-9h" + + // WritablePowerOutletTemplateTypeIec603093pe4h captures enum value "iec-60309-3p-e-4h" + WritablePowerOutletTemplateTypeIec603093pe4h string = "iec-60309-3p-e-4h" + + // WritablePowerOutletTemplateTypeIec603093pe6h captures enum value "iec-60309-3p-e-6h" + WritablePowerOutletTemplateTypeIec603093pe6h string = "iec-60309-3p-e-6h" + + // WritablePowerOutletTemplateTypeIec603093pe9h captures enum value "iec-60309-3p-e-9h" + WritablePowerOutletTemplateTypeIec603093pe9h string = "iec-60309-3p-e-9h" + + // WritablePowerOutletTemplateTypeIec603093pne4h captures enum value "iec-60309-3p-n-e-4h" + WritablePowerOutletTemplateTypeIec603093pne4h string = "iec-60309-3p-n-e-4h" + + // WritablePowerOutletTemplateTypeIec603093pne6h captures enum value "iec-60309-3p-n-e-6h" + WritablePowerOutletTemplateTypeIec603093pne6h string = "iec-60309-3p-n-e-6h" + + // WritablePowerOutletTemplateTypeIec603093pne9h captures enum value "iec-60309-3p-n-e-9h" + WritablePowerOutletTemplateTypeIec603093pne9h string = "iec-60309-3p-n-e-9h" + + // WritablePowerOutletTemplateTypeNema515r captures enum value "nema-5-15r" + WritablePowerOutletTemplateTypeNema515r string = "nema-5-15r" + + // WritablePowerOutletTemplateTypeNema520r captures enum value "nema-5-20r" + WritablePowerOutletTemplateTypeNema520r string = "nema-5-20r" + + // WritablePowerOutletTemplateTypeNema530r captures enum value "nema-5-30r" + WritablePowerOutletTemplateTypeNema530r string = "nema-5-30r" + + // WritablePowerOutletTemplateTypeNema550r captures enum value "nema-5-50r" + WritablePowerOutletTemplateTypeNema550r string = "nema-5-50r" + + // WritablePowerOutletTemplateTypeNema615r captures enum value "nema-6-15r" + WritablePowerOutletTemplateTypeNema615r string = "nema-6-15r" + + // WritablePowerOutletTemplateTypeNema620r captures enum value "nema-6-20r" + WritablePowerOutletTemplateTypeNema620r string = "nema-6-20r" + + // WritablePowerOutletTemplateTypeNema630r captures enum value "nema-6-30r" + WritablePowerOutletTemplateTypeNema630r string = "nema-6-30r" + + // WritablePowerOutletTemplateTypeNema650r captures enum value "nema-6-50r" + WritablePowerOutletTemplateTypeNema650r string = "nema-6-50r" + + // WritablePowerOutletTemplateTypeNemaL515r captures enum value "nema-l5-15r" + WritablePowerOutletTemplateTypeNemaL515r string = "nema-l5-15r" + + // WritablePowerOutletTemplateTypeNemaL520r captures enum value "nema-l5-20r" + WritablePowerOutletTemplateTypeNemaL520r string = "nema-l5-20r" + + // WritablePowerOutletTemplateTypeNemaL530r captures enum value "nema-l5-30r" + WritablePowerOutletTemplateTypeNemaL530r string = "nema-l5-30r" + + // WritablePowerOutletTemplateTypeNemaL550r captures enum value "nema-l5-50r" + WritablePowerOutletTemplateTypeNemaL550r string = "nema-l5-50r" + + // WritablePowerOutletTemplateTypeNemaL620r captures enum value "nema-l6-20r" + WritablePowerOutletTemplateTypeNemaL620r string = "nema-l6-20r" + + // WritablePowerOutletTemplateTypeNemaL630r captures enum value "nema-l6-30r" + WritablePowerOutletTemplateTypeNemaL630r string = "nema-l6-30r" + + // WritablePowerOutletTemplateTypeNemaL650r captures enum value "nema-l6-50r" + WritablePowerOutletTemplateTypeNemaL650r string = "nema-l6-50r" + + // WritablePowerOutletTemplateTypeCS6360C captures enum value "CS6360C" + WritablePowerOutletTemplateTypeCS6360C string = "CS6360C" + + // WritablePowerOutletTemplateTypeCS6364C captures enum value "CS6364C" + WritablePowerOutletTemplateTypeCS6364C string = "CS6364C" + + // WritablePowerOutletTemplateTypeCS8164C captures enum value "CS8164C" + WritablePowerOutletTemplateTypeCS8164C string = "CS8164C" + + // WritablePowerOutletTemplateTypeCS8264C captures enum value "CS8264C" + WritablePowerOutletTemplateTypeCS8264C string = "CS8264C" + + // WritablePowerOutletTemplateTypeCS8364C captures enum value "CS8364C" + WritablePowerOutletTemplateTypeCS8364C string = "CS8364C" + + // WritablePowerOutletTemplateTypeCS8464C captures enum value "CS8464C" + WritablePowerOutletTemplateTypeCS8464C string = "CS8464C" + + // WritablePowerOutletTemplateTypeItae captures enum value "ita-e" + WritablePowerOutletTemplateTypeItae string = "ita-e" + + // WritablePowerOutletTemplateTypeItaf captures enum value "ita-f" + WritablePowerOutletTemplateTypeItaf string = "ita-f" + + // WritablePowerOutletTemplateTypeItag captures enum value "ita-g" + WritablePowerOutletTemplateTypeItag string = "ita-g" + + // WritablePowerOutletTemplateTypeItah captures enum value "ita-h" + WritablePowerOutletTemplateTypeItah string = "ita-h" + + // WritablePowerOutletTemplateTypeItai captures enum value "ita-i" + WritablePowerOutletTemplateTypeItai string = "ita-i" + + // WritablePowerOutletTemplateTypeItaj captures enum value "ita-j" + WritablePowerOutletTemplateTypeItaj string = "ita-j" + + // WritablePowerOutletTemplateTypeItak captures enum value "ita-k" + WritablePowerOutletTemplateTypeItak string = "ita-k" + + // WritablePowerOutletTemplateTypeItal captures enum value "ita-l" + WritablePowerOutletTemplateTypeItal string = "ita-l" + + // WritablePowerOutletTemplateTypeItam captures enum value "ita-m" + WritablePowerOutletTemplateTypeItam string = "ita-m" + + // WritablePowerOutletTemplateTypeItan captures enum value "ita-n" + WritablePowerOutletTemplateTypeItan string = "ita-n" + + // WritablePowerOutletTemplateTypeItao captures enum value "ita-o" + WritablePowerOutletTemplateTypeItao string = "ita-o" +) + +// prop value enum +func (m *WritablePowerOutletTemplate) validateTypeEnum(path, location string, value string) error { + if err := validate.Enum(path, location, value, writablePowerOutletTemplateTypeTypePropEnum); err != nil { + return err + } + return nil +} + +func (m *WritablePowerOutletTemplate) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *WritablePowerOutletTemplate) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/netbox/models/writable_power_panel.go b/netbox/models/writable_power_panel.go index 5387f87047439427745843cbf988529d907e51e8..72f8758f23feb3ae93a8134bcc10b344746514ff 100644 --- a/netbox/models/writable_power_panel.go +++ b/netbox/models/writable_power_panel.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/writable_power_port.go b/netbox/models/writable_power_port.go index 4315dc7c62054469e3bc48ecee3c34644ff1fc87..286ea0981e7c8cb79b45e4e52d8e8801494e4e5b 100644 --- a/netbox/models/writable_power_port.go +++ b/netbox/models/writable_power_port.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -36,7 +36,7 @@ type WritablePowerPort struct { // Allocated draw // - // Allocated current draw (watts) + // Allocated power draw (watts) // Maximum: 32767 // Minimum: 1 AllocatedDraw *int64 `json:"allocated_draw,omitempty"` @@ -74,7 +74,7 @@ type WritablePowerPort struct { // Maximum draw // - // Maximum current draw (watts) + // Maximum power draw (watts) // Maximum: 32767 // Minimum: 1 MaximumDraw *int64 `json:"maximum_draw,omitempty"` @@ -87,6 +87,10 @@ type WritablePowerPort struct { // tags Tags []string `json:"tags"` + + // Type + // Enum: [iec-60320-c6 iec-60320-c8 iec-60320-c14 iec-60320-c16 iec-60320-c20 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-5-15p nema-5-20p nema-5-30p nema-5-50p nema-6-15p nema-6-20p nema-6-30p nema-6-50p nema-l5-15p nema-l5-20p nema-l5-30p nema-l5-50p nema-l6-20p nema-l6-30p nema-l6-50p cs6361c cs6365c cs8165c cs8265c cs8365c cs8465c ita-e ita-f ita-ef ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o] + Type string `json:"type,omitempty"` } // Validate validates this writable power port @@ -125,6 +129,10 @@ func (m *WritablePowerPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -273,6 +281,193 @@ func (m *WritablePowerPort) validateTags(formats strfmt.Registry) error { return nil } +var writablePowerPortTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["iec-60320-c6","iec-60320-c8","iec-60320-c14","iec-60320-c16","iec-60320-c20","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-5-15p","nema-5-20p","nema-5-30p","nema-5-50p","nema-6-15p","nema-6-20p","nema-6-30p","nema-6-50p","nema-l5-15p","nema-l5-20p","nema-l5-30p","nema-l5-50p","nema-l6-20p","nema-l6-30p","nema-l6-50p","cs6361c","cs6365c","cs8165c","cs8265c","cs8365c","cs8465c","ita-e","ita-f","ita-ef","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writablePowerPortTypeTypePropEnum = append(writablePowerPortTypeTypePropEnum, v) + } +} + +const ( + + // WritablePowerPortTypeIec60320C6 captures enum value "iec-60320-c6" + WritablePowerPortTypeIec60320C6 string = "iec-60320-c6" + + // WritablePowerPortTypeIec60320C8 captures enum value "iec-60320-c8" + WritablePowerPortTypeIec60320C8 string = "iec-60320-c8" + + // WritablePowerPortTypeIec60320C14 captures enum value "iec-60320-c14" + WritablePowerPortTypeIec60320C14 string = "iec-60320-c14" + + // WritablePowerPortTypeIec60320C16 captures enum value "iec-60320-c16" + WritablePowerPortTypeIec60320C16 string = "iec-60320-c16" + + // WritablePowerPortTypeIec60320C20 captures enum value "iec-60320-c20" + WritablePowerPortTypeIec60320C20 string = "iec-60320-c20" + + // WritablePowerPortTypeIec60309pne4h captures enum value "iec-60309-p-n-e-4h" + WritablePowerPortTypeIec60309pne4h string = "iec-60309-p-n-e-4h" + + // WritablePowerPortTypeIec60309pne6h captures enum value "iec-60309-p-n-e-6h" + WritablePowerPortTypeIec60309pne6h string = "iec-60309-p-n-e-6h" + + // WritablePowerPortTypeIec60309pne9h captures enum value "iec-60309-p-n-e-9h" + WritablePowerPortTypeIec60309pne9h string = "iec-60309-p-n-e-9h" + + // WritablePowerPortTypeIec603092pe4h captures enum value "iec-60309-2p-e-4h" + WritablePowerPortTypeIec603092pe4h string = "iec-60309-2p-e-4h" + + // WritablePowerPortTypeIec603092pe6h captures enum value "iec-60309-2p-e-6h" + WritablePowerPortTypeIec603092pe6h string = "iec-60309-2p-e-6h" + + // WritablePowerPortTypeIec603092pe9h captures enum value "iec-60309-2p-e-9h" + WritablePowerPortTypeIec603092pe9h string = "iec-60309-2p-e-9h" + + // WritablePowerPortTypeIec603093pe4h captures enum value "iec-60309-3p-e-4h" + WritablePowerPortTypeIec603093pe4h string = "iec-60309-3p-e-4h" + + // WritablePowerPortTypeIec603093pe6h captures enum value "iec-60309-3p-e-6h" + WritablePowerPortTypeIec603093pe6h string = "iec-60309-3p-e-6h" + + // WritablePowerPortTypeIec603093pe9h captures enum value "iec-60309-3p-e-9h" + WritablePowerPortTypeIec603093pe9h string = "iec-60309-3p-e-9h" + + // WritablePowerPortTypeIec603093pne4h captures enum value "iec-60309-3p-n-e-4h" + WritablePowerPortTypeIec603093pne4h string = "iec-60309-3p-n-e-4h" + + // WritablePowerPortTypeIec603093pne6h captures enum value "iec-60309-3p-n-e-6h" + WritablePowerPortTypeIec603093pne6h string = "iec-60309-3p-n-e-6h" + + // WritablePowerPortTypeIec603093pne9h captures enum value "iec-60309-3p-n-e-9h" + WritablePowerPortTypeIec603093pne9h string = "iec-60309-3p-n-e-9h" + + // WritablePowerPortTypeNema515p captures enum value "nema-5-15p" + WritablePowerPortTypeNema515p string = "nema-5-15p" + + // WritablePowerPortTypeNema520p captures enum value "nema-5-20p" + WritablePowerPortTypeNema520p string = "nema-5-20p" + + // WritablePowerPortTypeNema530p captures enum value "nema-5-30p" + WritablePowerPortTypeNema530p string = "nema-5-30p" + + // WritablePowerPortTypeNema550p captures enum value "nema-5-50p" + WritablePowerPortTypeNema550p string = "nema-5-50p" + + // WritablePowerPortTypeNema615p captures enum value "nema-6-15p" + WritablePowerPortTypeNema615p string = "nema-6-15p" + + // WritablePowerPortTypeNema620p captures enum value "nema-6-20p" + WritablePowerPortTypeNema620p string = "nema-6-20p" + + // WritablePowerPortTypeNema630p captures enum value "nema-6-30p" + WritablePowerPortTypeNema630p string = "nema-6-30p" + + // WritablePowerPortTypeNema650p captures enum value "nema-6-50p" + WritablePowerPortTypeNema650p string = "nema-6-50p" + + // WritablePowerPortTypeNemaL515p captures enum value "nema-l5-15p" + WritablePowerPortTypeNemaL515p string = "nema-l5-15p" + + // WritablePowerPortTypeNemaL520p captures enum value "nema-l5-20p" + WritablePowerPortTypeNemaL520p string = "nema-l5-20p" + + // WritablePowerPortTypeNemaL530p captures enum value "nema-l5-30p" + WritablePowerPortTypeNemaL530p string = "nema-l5-30p" + + // WritablePowerPortTypeNemaL550p captures enum value "nema-l5-50p" + WritablePowerPortTypeNemaL550p string = "nema-l5-50p" + + // WritablePowerPortTypeNemaL620p captures enum value "nema-l6-20p" + WritablePowerPortTypeNemaL620p string = "nema-l6-20p" + + // WritablePowerPortTypeNemaL630p captures enum value "nema-l6-30p" + WritablePowerPortTypeNemaL630p string = "nema-l6-30p" + + // WritablePowerPortTypeNemaL650p captures enum value "nema-l6-50p" + WritablePowerPortTypeNemaL650p string = "nema-l6-50p" + + // WritablePowerPortTypeCs6361c captures enum value "cs6361c" + WritablePowerPortTypeCs6361c string = "cs6361c" + + // WritablePowerPortTypeCs6365c captures enum value "cs6365c" + WritablePowerPortTypeCs6365c string = "cs6365c" + + // WritablePowerPortTypeCs8165c captures enum value "cs8165c" + WritablePowerPortTypeCs8165c string = "cs8165c" + + // WritablePowerPortTypeCs8265c captures enum value "cs8265c" + WritablePowerPortTypeCs8265c string = "cs8265c" + + // WritablePowerPortTypeCs8365c captures enum value "cs8365c" + WritablePowerPortTypeCs8365c string = "cs8365c" + + // WritablePowerPortTypeCs8465c captures enum value "cs8465c" + WritablePowerPortTypeCs8465c string = "cs8465c" + + // WritablePowerPortTypeItae captures enum value "ita-e" + WritablePowerPortTypeItae string = "ita-e" + + // WritablePowerPortTypeItaf captures enum value "ita-f" + WritablePowerPortTypeItaf string = "ita-f" + + // WritablePowerPortTypeItaEf captures enum value "ita-ef" + WritablePowerPortTypeItaEf string = "ita-ef" + + // WritablePowerPortTypeItag captures enum value "ita-g" + WritablePowerPortTypeItag string = "ita-g" + + // WritablePowerPortTypeItah captures enum value "ita-h" + WritablePowerPortTypeItah string = "ita-h" + + // WritablePowerPortTypeItai captures enum value "ita-i" + WritablePowerPortTypeItai string = "ita-i" + + // WritablePowerPortTypeItaj captures enum value "ita-j" + WritablePowerPortTypeItaj string = "ita-j" + + // WritablePowerPortTypeItak captures enum value "ita-k" + WritablePowerPortTypeItak string = "ita-k" + + // WritablePowerPortTypeItal captures enum value "ita-l" + WritablePowerPortTypeItal string = "ita-l" + + // WritablePowerPortTypeItam captures enum value "ita-m" + WritablePowerPortTypeItam string = "ita-m" + + // WritablePowerPortTypeItan captures enum value "ita-n" + WritablePowerPortTypeItan string = "ita-n" + + // WritablePowerPortTypeItao captures enum value "ita-o" + WritablePowerPortTypeItao string = "ita-o" +) + +// prop value enum +func (m *WritablePowerPort) validateTypeEnum(path, location string, value string) error { + if err := validate.Enum(path, location, value, writablePowerPortTypeTypePropEnum); err != nil { + return err + } + return nil +} + +func (m *WritablePowerPort) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *WritablePowerPort) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/netbox/models/writable_power_port_template.go b/netbox/models/writable_power_port_template.go index a79c39ef514b76a552a138828a554802be87a032..5f6abf018065bfc71b2e38c8809d002f93d28545 100644 --- a/netbox/models/writable_power_port_template.go +++ b/netbox/models/writable_power_port_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,10 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "encoding/json" "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -33,7 +35,7 @@ type WritablePowerPortTemplate struct { // Allocated draw // - // Allocated current draw (watts) + // Allocated power draw (watts) // Maximum: 32767 // Minimum: 1 AllocatedDraw *int64 `json:"allocated_draw,omitempty"` @@ -48,7 +50,7 @@ type WritablePowerPortTemplate struct { // Maximum draw // - // Maximum current draw (watts) + // Maximum power draw (watts) // Maximum: 32767 // Minimum: 1 MaximumDraw *int64 `json:"maximum_draw,omitempty"` @@ -58,6 +60,10 @@ type WritablePowerPortTemplate struct { // Max Length: 50 // Min Length: 1 Name *string `json:"name"` + + // Type + // Enum: [iec-60320-c6 iec-60320-c8 iec-60320-c14 iec-60320-c16 iec-60320-c20 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-5-15p nema-5-20p nema-5-30p nema-5-50p nema-6-15p nema-6-20p nema-6-30p nema-6-50p nema-l5-15p nema-l5-20p nema-l5-30p nema-l5-50p nema-l6-20p nema-l6-30p nema-l6-50p cs6361c cs6365c cs8165c cs8265c cs8365c cs8465c ita-e ita-f ita-ef ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o] + Type string `json:"type,omitempty"` } // Validate validates this writable power port template @@ -80,6 +86,10 @@ func (m *WritablePowerPortTemplate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -146,6 +156,193 @@ func (m *WritablePowerPortTemplate) validateName(formats strfmt.Registry) error return nil } +var writablePowerPortTemplateTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["iec-60320-c6","iec-60320-c8","iec-60320-c14","iec-60320-c16","iec-60320-c20","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-5-15p","nema-5-20p","nema-5-30p","nema-5-50p","nema-6-15p","nema-6-20p","nema-6-30p","nema-6-50p","nema-l5-15p","nema-l5-20p","nema-l5-30p","nema-l5-50p","nema-l6-20p","nema-l6-30p","nema-l6-50p","cs6361c","cs6365c","cs8165c","cs8265c","cs8365c","cs8465c","ita-e","ita-f","ita-ef","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writablePowerPortTemplateTypeTypePropEnum = append(writablePowerPortTemplateTypeTypePropEnum, v) + } +} + +const ( + + // WritablePowerPortTemplateTypeIec60320C6 captures enum value "iec-60320-c6" + WritablePowerPortTemplateTypeIec60320C6 string = "iec-60320-c6" + + // WritablePowerPortTemplateTypeIec60320C8 captures enum value "iec-60320-c8" + WritablePowerPortTemplateTypeIec60320C8 string = "iec-60320-c8" + + // WritablePowerPortTemplateTypeIec60320C14 captures enum value "iec-60320-c14" + WritablePowerPortTemplateTypeIec60320C14 string = "iec-60320-c14" + + // WritablePowerPortTemplateTypeIec60320C16 captures enum value "iec-60320-c16" + WritablePowerPortTemplateTypeIec60320C16 string = "iec-60320-c16" + + // WritablePowerPortTemplateTypeIec60320C20 captures enum value "iec-60320-c20" + WritablePowerPortTemplateTypeIec60320C20 string = "iec-60320-c20" + + // WritablePowerPortTemplateTypeIec60309pne4h captures enum value "iec-60309-p-n-e-4h" + WritablePowerPortTemplateTypeIec60309pne4h string = "iec-60309-p-n-e-4h" + + // WritablePowerPortTemplateTypeIec60309pne6h captures enum value "iec-60309-p-n-e-6h" + WritablePowerPortTemplateTypeIec60309pne6h string = "iec-60309-p-n-e-6h" + + // WritablePowerPortTemplateTypeIec60309pne9h captures enum value "iec-60309-p-n-e-9h" + WritablePowerPortTemplateTypeIec60309pne9h string = "iec-60309-p-n-e-9h" + + // WritablePowerPortTemplateTypeIec603092pe4h captures enum value "iec-60309-2p-e-4h" + WritablePowerPortTemplateTypeIec603092pe4h string = "iec-60309-2p-e-4h" + + // WritablePowerPortTemplateTypeIec603092pe6h captures enum value "iec-60309-2p-e-6h" + WritablePowerPortTemplateTypeIec603092pe6h string = "iec-60309-2p-e-6h" + + // WritablePowerPortTemplateTypeIec603092pe9h captures enum value "iec-60309-2p-e-9h" + WritablePowerPortTemplateTypeIec603092pe9h string = "iec-60309-2p-e-9h" + + // WritablePowerPortTemplateTypeIec603093pe4h captures enum value "iec-60309-3p-e-4h" + WritablePowerPortTemplateTypeIec603093pe4h string = "iec-60309-3p-e-4h" + + // WritablePowerPortTemplateTypeIec603093pe6h captures enum value "iec-60309-3p-e-6h" + WritablePowerPortTemplateTypeIec603093pe6h string = "iec-60309-3p-e-6h" + + // WritablePowerPortTemplateTypeIec603093pe9h captures enum value "iec-60309-3p-e-9h" + WritablePowerPortTemplateTypeIec603093pe9h string = "iec-60309-3p-e-9h" + + // WritablePowerPortTemplateTypeIec603093pne4h captures enum value "iec-60309-3p-n-e-4h" + WritablePowerPortTemplateTypeIec603093pne4h string = "iec-60309-3p-n-e-4h" + + // WritablePowerPortTemplateTypeIec603093pne6h captures enum value "iec-60309-3p-n-e-6h" + WritablePowerPortTemplateTypeIec603093pne6h string = "iec-60309-3p-n-e-6h" + + // WritablePowerPortTemplateTypeIec603093pne9h captures enum value "iec-60309-3p-n-e-9h" + WritablePowerPortTemplateTypeIec603093pne9h string = "iec-60309-3p-n-e-9h" + + // WritablePowerPortTemplateTypeNema515p captures enum value "nema-5-15p" + WritablePowerPortTemplateTypeNema515p string = "nema-5-15p" + + // WritablePowerPortTemplateTypeNema520p captures enum value "nema-5-20p" + WritablePowerPortTemplateTypeNema520p string = "nema-5-20p" + + // WritablePowerPortTemplateTypeNema530p captures enum value "nema-5-30p" + WritablePowerPortTemplateTypeNema530p string = "nema-5-30p" + + // WritablePowerPortTemplateTypeNema550p captures enum value "nema-5-50p" + WritablePowerPortTemplateTypeNema550p string = "nema-5-50p" + + // WritablePowerPortTemplateTypeNema615p captures enum value "nema-6-15p" + WritablePowerPortTemplateTypeNema615p string = "nema-6-15p" + + // WritablePowerPortTemplateTypeNema620p captures enum value "nema-6-20p" + WritablePowerPortTemplateTypeNema620p string = "nema-6-20p" + + // WritablePowerPortTemplateTypeNema630p captures enum value "nema-6-30p" + WritablePowerPortTemplateTypeNema630p string = "nema-6-30p" + + // WritablePowerPortTemplateTypeNema650p captures enum value "nema-6-50p" + WritablePowerPortTemplateTypeNema650p string = "nema-6-50p" + + // WritablePowerPortTemplateTypeNemaL515p captures enum value "nema-l5-15p" + WritablePowerPortTemplateTypeNemaL515p string = "nema-l5-15p" + + // WritablePowerPortTemplateTypeNemaL520p captures enum value "nema-l5-20p" + WritablePowerPortTemplateTypeNemaL520p string = "nema-l5-20p" + + // WritablePowerPortTemplateTypeNemaL530p captures enum value "nema-l5-30p" + WritablePowerPortTemplateTypeNemaL530p string = "nema-l5-30p" + + // WritablePowerPortTemplateTypeNemaL550p captures enum value "nema-l5-50p" + WritablePowerPortTemplateTypeNemaL550p string = "nema-l5-50p" + + // WritablePowerPortTemplateTypeNemaL620p captures enum value "nema-l6-20p" + WritablePowerPortTemplateTypeNemaL620p string = "nema-l6-20p" + + // WritablePowerPortTemplateTypeNemaL630p captures enum value "nema-l6-30p" + WritablePowerPortTemplateTypeNemaL630p string = "nema-l6-30p" + + // WritablePowerPortTemplateTypeNemaL650p captures enum value "nema-l6-50p" + WritablePowerPortTemplateTypeNemaL650p string = "nema-l6-50p" + + // WritablePowerPortTemplateTypeCs6361c captures enum value "cs6361c" + WritablePowerPortTemplateTypeCs6361c string = "cs6361c" + + // WritablePowerPortTemplateTypeCs6365c captures enum value "cs6365c" + WritablePowerPortTemplateTypeCs6365c string = "cs6365c" + + // WritablePowerPortTemplateTypeCs8165c captures enum value "cs8165c" + WritablePowerPortTemplateTypeCs8165c string = "cs8165c" + + // WritablePowerPortTemplateTypeCs8265c captures enum value "cs8265c" + WritablePowerPortTemplateTypeCs8265c string = "cs8265c" + + // WritablePowerPortTemplateTypeCs8365c captures enum value "cs8365c" + WritablePowerPortTemplateTypeCs8365c string = "cs8365c" + + // WritablePowerPortTemplateTypeCs8465c captures enum value "cs8465c" + WritablePowerPortTemplateTypeCs8465c string = "cs8465c" + + // WritablePowerPortTemplateTypeItae captures enum value "ita-e" + WritablePowerPortTemplateTypeItae string = "ita-e" + + // WritablePowerPortTemplateTypeItaf captures enum value "ita-f" + WritablePowerPortTemplateTypeItaf string = "ita-f" + + // WritablePowerPortTemplateTypeItaEf captures enum value "ita-ef" + WritablePowerPortTemplateTypeItaEf string = "ita-ef" + + // WritablePowerPortTemplateTypeItag captures enum value "ita-g" + WritablePowerPortTemplateTypeItag string = "ita-g" + + // WritablePowerPortTemplateTypeItah captures enum value "ita-h" + WritablePowerPortTemplateTypeItah string = "ita-h" + + // WritablePowerPortTemplateTypeItai captures enum value "ita-i" + WritablePowerPortTemplateTypeItai string = "ita-i" + + // WritablePowerPortTemplateTypeItaj captures enum value "ita-j" + WritablePowerPortTemplateTypeItaj string = "ita-j" + + // WritablePowerPortTemplateTypeItak captures enum value "ita-k" + WritablePowerPortTemplateTypeItak string = "ita-k" + + // WritablePowerPortTemplateTypeItal captures enum value "ita-l" + WritablePowerPortTemplateTypeItal string = "ita-l" + + // WritablePowerPortTemplateTypeItam captures enum value "ita-m" + WritablePowerPortTemplateTypeItam string = "ita-m" + + // WritablePowerPortTemplateTypeItan captures enum value "ita-n" + WritablePowerPortTemplateTypeItan string = "ita-n" + + // WritablePowerPortTemplateTypeItao captures enum value "ita-o" + WritablePowerPortTemplateTypeItao string = "ita-o" +) + +// prop value enum +func (m *WritablePowerPortTemplate) validateTypeEnum(path, location string, value string) error { + if err := validate.Enum(path, location, value, writablePowerPortTemplateTypeTypePropEnum); err != nil { + return err + } + return nil +} + +func (m *WritablePowerPortTemplate) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *WritablePowerPortTemplate) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/netbox/models/writable_prefix.go b/netbox/models/writable_prefix.go index 81ce97a6ae2759684ca551c05cff5e3a1ad2ff72..b3e94e0e38aff29664a203369eb313d87e2b4e85 100644 --- a/netbox/models/writable_prefix.go +++ b/netbox/models/writable_prefix.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -81,8 +81,8 @@ type WritablePrefix struct { // Status // // Operational status of this prefix - // Enum: [0 1 2 3] - Status int64 `json:"status,omitempty"` + // Enum: [container active reserved deprecated] + Status string `json:"status,omitempty"` // tags Tags []string `json:"tags"` @@ -182,8 +182,8 @@ func (m *WritablePrefix) validatePrefix(formats strfmt.Registry) error { var writablePrefixTypeStatusPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[0,1,2,3]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["container","active","reserved","deprecated"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -191,8 +191,23 @@ func init() { } } +const ( + + // WritablePrefixStatusContainer captures enum value "container" + WritablePrefixStatusContainer string = "container" + + // WritablePrefixStatusActive captures enum value "active" + WritablePrefixStatusActive string = "active" + + // WritablePrefixStatusReserved captures enum value "reserved" + WritablePrefixStatusReserved string = "reserved" + + // WritablePrefixStatusDeprecated captures enum value "deprecated" + WritablePrefixStatusDeprecated string = "deprecated" +) + // prop value enum -func (m *WritablePrefix) validateStatusEnum(path, location string, value int64) error { +func (m *WritablePrefix) validateStatusEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writablePrefixTypeStatusPropEnum); err != nil { return err } diff --git a/netbox/models/writable_rack.go b/netbox/models/writable_rack.go index ad4d10bd7688ad56f04e809e121f40bffb3fda90..e4537d9796ecff02aa1135f6e8f7e4565e92baaf 100644 --- a/netbox/models/writable_rack.go +++ b/netbox/models/writable_rack.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -92,8 +92,8 @@ type WritableRack struct { OuterDepth *int64 `json:"outer_depth,omitempty"` // Outer unit - // Enum: [1000 2000] - OuterUnit *int64 `json:"outer_unit,omitempty"` + // Enum: [mm in] + OuterUnit string `json:"outer_unit,omitempty"` // Outer width // Maximum: 32767 @@ -116,8 +116,8 @@ type WritableRack struct { Site *int64 `json:"site"` // Status - // Enum: [3 2 0 1 4] - Status int64 `json:"status,omitempty"` + // Enum: [reserved available planned active deprecated] + Status string `json:"status,omitempty"` // tags Tags []string `json:"tags"` @@ -126,8 +126,8 @@ type WritableRack struct { Tenant *int64 `json:"tenant,omitempty"` // Type - // Enum: [100 200 300 1000 1100] - Type *int64 `json:"type,omitempty"` + // Enum: [2-post-frame 4-post-frame 4-post-cabinet wall-frame wall-cabinet] + Type string `json:"type,omitempty"` // Height (U) // Maximum: 100 @@ -300,8 +300,8 @@ func (m *WritableRack) validateOuterDepth(formats strfmt.Registry) error { var writableRackTypeOuterUnitPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1000,2000]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["mm","in"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -309,8 +309,17 @@ func init() { } } +const ( + + // WritableRackOuterUnitMm captures enum value "mm" + WritableRackOuterUnitMm string = "mm" + + // WritableRackOuterUnitIn captures enum value "in" + WritableRackOuterUnitIn string = "in" +) + // prop value enum -func (m *WritableRack) validateOuterUnitEnum(path, location string, value int64) error { +func (m *WritableRack) validateOuterUnitEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableRackTypeOuterUnitPropEnum); err != nil { return err } @@ -324,7 +333,7 @@ func (m *WritableRack) validateOuterUnit(formats strfmt.Registry) error { } // value enum - if err := m.validateOuterUnitEnum("outer_unit", "body", *m.OuterUnit); err != nil { + if err := m.validateOuterUnitEnum("outer_unit", "body", m.OuterUnit); err != nil { return err } @@ -373,8 +382,8 @@ func (m *WritableRack) validateSite(formats strfmt.Registry) error { var writableRackTypeStatusPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[3,2,0,1,4]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["reserved","available","planned","active","deprecated"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -382,8 +391,26 @@ func init() { } } +const ( + + // WritableRackStatusReserved captures enum value "reserved" + WritableRackStatusReserved string = "reserved" + + // WritableRackStatusAvailable captures enum value "available" + WritableRackStatusAvailable string = "available" + + // WritableRackStatusPlanned captures enum value "planned" + WritableRackStatusPlanned string = "planned" + + // WritableRackStatusActive captures enum value "active" + WritableRackStatusActive string = "active" + + // WritableRackStatusDeprecated captures enum value "deprecated" + WritableRackStatusDeprecated string = "deprecated" +) + // prop value enum -func (m *WritableRack) validateStatusEnum(path, location string, value int64) error { +func (m *WritableRack) validateStatusEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableRackTypeStatusPropEnum); err != nil { return err } @@ -424,8 +451,8 @@ func (m *WritableRack) validateTags(formats strfmt.Registry) error { var writableRackTypeTypePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[100,200,300,1000,1100]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["2-post-frame","4-post-frame","4-post-cabinet","wall-frame","wall-cabinet"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -433,8 +460,26 @@ func init() { } } +const ( + + // WritableRackTypeNr2PostFrame captures enum value "2-post-frame" + WritableRackTypeNr2PostFrame string = "2-post-frame" + + // WritableRackTypeNr4PostFrame captures enum value "4-post-frame" + WritableRackTypeNr4PostFrame string = "4-post-frame" + + // WritableRackTypeNr4PostCabinet captures enum value "4-post-cabinet" + WritableRackTypeNr4PostCabinet string = "4-post-cabinet" + + // WritableRackTypeWallFrame captures enum value "wall-frame" + WritableRackTypeWallFrame string = "wall-frame" + + // WritableRackTypeWallCabinet captures enum value "wall-cabinet" + WritableRackTypeWallCabinet string = "wall-cabinet" +) + // prop value enum -func (m *WritableRack) validateTypeEnum(path, location string, value int64) error { +func (m *WritableRack) validateTypeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableRackTypeTypePropEnum); err != nil { return err } @@ -448,7 +493,7 @@ func (m *WritableRack) validateType(formats strfmt.Registry) error { } // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { return err } diff --git a/netbox/models/writable_rack_group.go b/netbox/models/writable_rack_group.go index 38766c287a04864f9731f3ca3a3595ff217fe20f..930341b8a47b9aff1549c5d752cd4070a3ce6f53 100644 --- a/netbox/models/writable_rack_group.go +++ b/netbox/models/writable_rack_group.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/writable_rack_reservation.go b/netbox/models/writable_rack_reservation.go index 6963d2a318ca32ac7ad238a5596e901985eb293f..e9ab5d48264f4fb8ff1ca83a1ad7c306f97df3b6 100644 --- a/netbox/models/writable_rack_reservation.go +++ b/netbox/models/writable_rack_reservation.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/writable_rear_port.go b/netbox/models/writable_rear_port.go index a1802d1fc10d7e0adf1cab20d90bacc4fd0e8985..75fe2addf621d640d7f384aafc45351acaf3088b 100644 --- a/netbox/models/writable_rear_port.go +++ b/netbox/models/writable_rear_port.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -65,8 +65,8 @@ type WritableRearPort struct { // Type // Required: true - // Enum: [1000 1100 2200 2300 2310 2600 2610 2500 2400 2100 2110 2000] - Type *int64 `json:"type"` + // Enum: [8p8c 110-punch bnc fc lc lc-apc lsh lsh-apc mpo mtrj sc sc-apc st] + Type *string `json:"type"` } // Validate validates this writable rear port @@ -201,8 +201,8 @@ func (m *WritableRearPort) validateTags(formats strfmt.Registry) error { var writableRearPortTypeTypePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1000,1100,2200,2300,2310,2600,2610,2500,2400,2100,2110,2000]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["8p8c","110-punch","bnc","fc","lc","lc-apc","lsh","lsh-apc","mpo","mtrj","sc","sc-apc","st"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -210,8 +210,50 @@ func init() { } } +const ( + + // WritableRearPortTypeNr8p8c captures enum value "8p8c" + WritableRearPortTypeNr8p8c string = "8p8c" + + // WritableRearPortTypeNr110Punch captures enum value "110-punch" + WritableRearPortTypeNr110Punch string = "110-punch" + + // WritableRearPortTypeBnc captures enum value "bnc" + WritableRearPortTypeBnc string = "bnc" + + // WritableRearPortTypeFc captures enum value "fc" + WritableRearPortTypeFc string = "fc" + + // WritableRearPortTypeLc captures enum value "lc" + WritableRearPortTypeLc string = "lc" + + // WritableRearPortTypeLcApc captures enum value "lc-apc" + WritableRearPortTypeLcApc string = "lc-apc" + + // WritableRearPortTypeLsh captures enum value "lsh" + WritableRearPortTypeLsh string = "lsh" + + // WritableRearPortTypeLshApc captures enum value "lsh-apc" + WritableRearPortTypeLshApc string = "lsh-apc" + + // WritableRearPortTypeMpo captures enum value "mpo" + WritableRearPortTypeMpo string = "mpo" + + // WritableRearPortTypeMtrj captures enum value "mtrj" + WritableRearPortTypeMtrj string = "mtrj" + + // WritableRearPortTypeSc captures enum value "sc" + WritableRearPortTypeSc string = "sc" + + // WritableRearPortTypeScApc captures enum value "sc-apc" + WritableRearPortTypeScApc string = "sc-apc" + + // WritableRearPortTypeSt captures enum value "st" + WritableRearPortTypeSt string = "st" +) + // prop value enum -func (m *WritableRearPort) validateTypeEnum(path, location string, value int64) error { +func (m *WritableRearPort) validateTypeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableRearPortTypeTypePropEnum); err != nil { return err } diff --git a/netbox/models/writable_rear_port_template.go b/netbox/models/writable_rear_port_template.go index 38857bc456454adfa2e4ded917b5ed7f30320461..9a71601fbd6ee12fed2e3160ad5bed3186125e81 100644 --- a/netbox/models/writable_rear_port_template.go +++ b/netbox/models/writable_rear_port_template.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -54,8 +54,8 @@ type WritableRearPortTemplate struct { // Type // Required: true - // Enum: [1000 1100 2200 2300 2310 2600 2610 2500 2400 2100 2110 2000] - Type *int64 `json:"type"` + // Enum: [8p8c 110-punch bnc fc lc lc-apc lsh lsh-apc mpo mtrj sc sc-apc st] + Type *string `json:"type"` } // Validate validates this writable rear port template @@ -130,8 +130,8 @@ func (m *WritableRearPortTemplate) validatePositions(formats strfmt.Registry) er var writableRearPortTemplateTypeTypePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1000,1100,2200,2300,2310,2600,2610,2500,2400,2100,2110,2000]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["8p8c","110-punch","bnc","fc","lc","lc-apc","lsh","lsh-apc","mpo","mtrj","sc","sc-apc","st"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -139,8 +139,50 @@ func init() { } } +const ( + + // WritableRearPortTemplateTypeNr8p8c captures enum value "8p8c" + WritableRearPortTemplateTypeNr8p8c string = "8p8c" + + // WritableRearPortTemplateTypeNr110Punch captures enum value "110-punch" + WritableRearPortTemplateTypeNr110Punch string = "110-punch" + + // WritableRearPortTemplateTypeBnc captures enum value "bnc" + WritableRearPortTemplateTypeBnc string = "bnc" + + // WritableRearPortTemplateTypeFc captures enum value "fc" + WritableRearPortTemplateTypeFc string = "fc" + + // WritableRearPortTemplateTypeLc captures enum value "lc" + WritableRearPortTemplateTypeLc string = "lc" + + // WritableRearPortTemplateTypeLcApc captures enum value "lc-apc" + WritableRearPortTemplateTypeLcApc string = "lc-apc" + + // WritableRearPortTemplateTypeLsh captures enum value "lsh" + WritableRearPortTemplateTypeLsh string = "lsh" + + // WritableRearPortTemplateTypeLshApc captures enum value "lsh-apc" + WritableRearPortTemplateTypeLshApc string = "lsh-apc" + + // WritableRearPortTemplateTypeMpo captures enum value "mpo" + WritableRearPortTemplateTypeMpo string = "mpo" + + // WritableRearPortTemplateTypeMtrj captures enum value "mtrj" + WritableRearPortTemplateTypeMtrj string = "mtrj" + + // WritableRearPortTemplateTypeSc captures enum value "sc" + WritableRearPortTemplateTypeSc string = "sc" + + // WritableRearPortTemplateTypeScApc captures enum value "sc-apc" + WritableRearPortTemplateTypeScApc string = "sc-apc" + + // WritableRearPortTemplateTypeSt captures enum value "st" + WritableRearPortTemplateTypeSt string = "st" +) + // prop value enum -func (m *WritableRearPortTemplate) validateTypeEnum(path, location string, value int64) error { +func (m *WritableRearPortTemplate) validateTypeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableRearPortTemplateTypeTypePropEnum); err != nil { return err } diff --git a/netbox/models/writable_region.go b/netbox/models/writable_region.go index 877f75124bad7be8f9bc2ee8d10e8a80d7b1606b..1b3fd45a635216863a01dd4a7af6804a10ad3691 100644 --- a/netbox/models/writable_region.go +++ b/netbox/models/writable_region.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/writable_secret.go b/netbox/models/writable_secret.go index 62760a9d3804dafb4261fb83650e95dca3e063ef..2fe9cbe08293ed08169bce30e20727b2f245a780 100644 --- a/netbox/models/writable_secret.go +++ b/netbox/models/writable_secret.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/writable_service.go b/netbox/models/writable_service.go index 779e720ddfcef4d46854b1342bede4e7c44f05d2..1a028e584cf6761460798d222d2ae8d397ab7811 100644 --- a/netbox/models/writable_service.go +++ b/netbox/models/writable_service.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -75,8 +75,8 @@ type WritableService struct { // Protocol // Required: true - // Enum: [6 17] - Protocol *int64 `json:"protocol"` + // Enum: [tcp udp] + Protocol *string `json:"protocol"` // Virtual machine VirtualMachine *int64 `json:"virtual_machine,omitempty"` @@ -209,8 +209,8 @@ func (m *WritableService) validatePort(formats strfmt.Registry) error { var writableServiceTypeProtocolPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[6,17]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["tcp","udp"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -218,8 +218,17 @@ func init() { } } +const ( + + // WritableServiceProtocolTCP captures enum value "tcp" + WritableServiceProtocolTCP string = "tcp" + + // WritableServiceProtocolUDP captures enum value "udp" + WritableServiceProtocolUDP string = "udp" +) + // prop value enum -func (m *WritableService) validateProtocolEnum(path, location string, value int64) error { +func (m *WritableService) validateProtocolEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableServiceTypeProtocolPropEnum); err != nil { return err } diff --git a/netbox/models/writable_site.go b/netbox/models/writable_site.go index 59fe0214580bc9a2d56c1a5ee0285bf090d68329..599ace61eac5dc83d2c633cb21cad34ec22445c1 100644 --- a/netbox/models/writable_site.go +++ b/netbox/models/writable_site.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -127,8 +127,8 @@ type WritableSite struct { Slug *string `json:"slug"` // Status - // Enum: [1 2 4] - Status int64 `json:"status,omitempty"` + // Enum: [active planned retired] + Status string `json:"status,omitempty"` // tags Tags []string `json:"tags"` @@ -393,8 +393,8 @@ func (m *WritableSite) validateSlug(formats strfmt.Registry) error { var writableSiteTypeStatusPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1,2,4]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["active","planned","retired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -402,8 +402,20 @@ func init() { } } +const ( + + // WritableSiteStatusActive captures enum value "active" + WritableSiteStatusActive string = "active" + + // WritableSiteStatusPlanned captures enum value "planned" + WritableSiteStatusPlanned string = "planned" + + // WritableSiteStatusRetired captures enum value "retired" + WritableSiteStatusRetired string = "retired" +) + // prop value enum -func (m *WritableSite) validateStatusEnum(path, location string, value int64) error { +func (m *WritableSite) validateStatusEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableSiteTypeStatusPropEnum); err != nil { return err } diff --git a/netbox/models/writable_tenant.go b/netbox/models/writable_tenant.go index bc483e232f572fe8fd727ca0bb10c85680e99474..99c170ed3b0b1366ab8e1a175b1908ef3073692a 100644 --- a/netbox/models/writable_tenant.go +++ b/netbox/models/writable_tenant.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -37,6 +37,10 @@ type WritableTenant struct { // Read Only: true CircuitCount int64 `json:"circuit_count,omitempty"` + // Cluster count + // Read Only: true + ClusterCount int64 `json:"cluster_count,omitempty"` + // Comments Comments string `json:"comments,omitempty"` diff --git a/netbox/models/writable_topology_map.go b/netbox/models/writable_topology_map.go deleted file mode 100644 index b308d83506609ab8e590277d35f234d9827e4b82..0000000000000000000000000000000000000000 --- a/netbox/models/writable_topology_map.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2018 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// WritableTopologyMap writable topology map -// swagger:model WritableTopologyMap -type WritableTopologyMap struct { - - // Description - // Max Length: 100 - Description string `json:"description,omitempty"` - - // Device patterns - // - // Identify devices to include in the diagram using regular expressions, one per line. Each line will result in a new tier of the drawing. Separate multiple regexes within a line using semicolons. Devices will be rendered in the order they are defined. - // Required: true - // Min Length: 1 - DevicePatterns *string `json:"device_patterns"` - - // ID - // Read Only: true - ID int64 `json:"id,omitempty"` - - // Name - // Required: true - // Max Length: 50 - // Min Length: 1 - Name *string `json:"name"` - - // Site - Site *int64 `json:"site,omitempty"` - - // Slug - // Required: true - // Max Length: 50 - // Min Length: 1 - // Pattern: ^[-a-zA-Z0-9_]+$ - Slug *string `json:"slug"` -} - -// Validate validates this writable topology map -func (m *WritableTopologyMap) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDescription(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDevicePatterns(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSlug(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *WritableTopologyMap) validateDescription(formats strfmt.Registry) error { - - if swag.IsZero(m.Description) { // not required - return nil - } - - if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil { - return err - } - - return nil -} - -func (m *WritableTopologyMap) validateDevicePatterns(formats strfmt.Registry) error { - - if err := validate.Required("device_patterns", "body", m.DevicePatterns); err != nil { - return err - } - - if err := validate.MinLength("device_patterns", "body", string(*m.DevicePatterns), 1); err != nil { - return err - } - - return nil -} - -func (m *WritableTopologyMap) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - if err := validate.MinLength("name", "body", string(*m.Name), 1); err != nil { - return err - } - - if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil { - return err - } - - return nil -} - -func (m *WritableTopologyMap) validateSlug(formats strfmt.Registry) error { - - if err := validate.Required("slug", "body", m.Slug); err != nil { - return err - } - - if err := validate.MinLength("slug", "body", string(*m.Slug), 1); err != nil { - return err - } - - if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil { - return err - } - - if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *WritableTopologyMap) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WritableTopologyMap) UnmarshalBinary(b []byte) error { - var res WritableTopologyMap - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/netbox/models/writable_vlan.go b/netbox/models/writable_v_l_a_n.go similarity index 91% rename from netbox/models/writable_vlan.go rename to netbox/models/writable_v_l_a_n.go index 41e306b40775ba870e284b697c99b0d1324c6b03..badac7803fc1726b73e4357da12ce8882bb1b5c9 100644 --- a/netbox/models/writable_vlan.go +++ b/netbox/models/writable_v_l_a_n.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -79,8 +79,8 @@ type WritableVLAN struct { Site *int64 `json:"site,omitempty"` // Status - // Enum: [1 2 3] - Status int64 `json:"status,omitempty"` + // Enum: [active reserved deprecated] + Status string `json:"status,omitempty"` // tags Tags []string `json:"tags"` @@ -192,8 +192,8 @@ func (m *WritableVLAN) validateName(formats strfmt.Registry) error { var writableVLANTypeStatusPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1,2,3]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["active","reserved","deprecated"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -201,8 +201,20 @@ func init() { } } +const ( + + // WritableVLANStatusActive captures enum value "active" + WritableVLANStatusActive string = "active" + + // WritableVLANStatusReserved captures enum value "reserved" + WritableVLANStatusReserved string = "reserved" + + // WritableVLANStatusDeprecated captures enum value "deprecated" + WritableVLANStatusDeprecated string = "deprecated" +) + // prop value enum -func (m *WritableVLAN) validateStatusEnum(path, location string, value int64) error { +func (m *WritableVLAN) validateStatusEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableVLANTypeStatusPropEnum); err != nil { return err } diff --git a/netbox/models/writable_vlan_group.go b/netbox/models/writable_v_l_a_n_group.go similarity index 99% rename from netbox/models/writable_vlan_group.go rename to netbox/models/writable_v_l_a_n_group.go index f83a1611599ad656e696da662a6198be7db168d3..a8fd50be1eefe0bd15f1d690a628219cd5666f7e 100644 --- a/netbox/models/writable_vlan_group.go +++ b/netbox/models/writable_v_l_a_n_group.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -20,9 +21,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/writable_vrf.go b/netbox/models/writable_v_r_f.go similarity index 99% rename from netbox/models/writable_vrf.go rename to netbox/models/writable_v_r_f.go index 1b51db6f8a5bcfd7b6796748ae3e7c1aeb4c4ded..1d60651d0e4791d1f636618121f1567713eae6ef 100644 --- a/netbox/models/writable_vrf.go +++ b/netbox/models/writable_v_r_f.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/writable_virtual_chassis.go b/netbox/models/writable_virtual_chassis.go index 6581198b7f120f730caa243c38240594d19f4459..c4cb5d9548935e2d0622e3c9e32d6a7662b83a31 100644 --- a/netbox/models/writable_virtual_chassis.go +++ b/netbox/models/writable_virtual_chassis.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -22,9 +23,8 @@ package models import ( "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) diff --git a/netbox/models/writable_virtual_machine_interface.go b/netbox/models/writable_virtual_machine_interface.go index f016b695086a5a371b3474ad5e2f3de97a1178fe..104580cc299078ac6c6133e4fdff6cdc20645aa6 100644 --- a/netbox/models/writable_virtual_machine_interface.go +++ b/netbox/models/writable_virtual_machine_interface.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -49,8 +49,8 @@ type WritableVirtualMachineInterface struct { MacAddress *string `json:"mac_address,omitempty"` // Mode - // Enum: [100 200 300] - Mode *int64 `json:"mode,omitempty"` + // Enum: [access tagged tagged-all] + Mode string `json:"mode,omitempty"` // MTU // Maximum: 65536 @@ -71,8 +71,9 @@ type WritableVirtualMachineInterface struct { Tags []string `json:"tags"` // Type - // Enum: [0 200 800 1000 1120 1130 1150 1170 1050 1100 1200 1300 1310 1320 1350 1400 1420 1500 1510 1650 1520 1550 1600 1700 1750 2600 2610 2620 2630 2640 2810 2820 2830 6100 6200 6300 6400 6500 6600 6700 3010 3020 3040 3080 3160 3320 3400 4000 4010 4040 4050 5000 5050 5100 5150 5200 5300 5310 5320 5330 32767] - Type int64 `json:"type,omitempty"` + // Required: true + // Enum: [virtual lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 128gfc-sfp28 inifiband-sdr inifiband-ddr inifiband-qdr inifiband-fdr10 inifiband-fdr inifiband-edr inifiband-hdr inifiband-ndr inifiband-xdr t1 e1 t3 e3 cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] + Type *string `json:"type"` // Untagged VLAN UntaggedVlan *int64 `json:"untagged_vlan,omitempty"` @@ -135,8 +136,8 @@ func (m *WritableVirtualMachineInterface) validateDescription(formats strfmt.Reg var writableVirtualMachineInterfaceTypeModePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[100,200,300]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["access","tagged","tagged-all"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -144,8 +145,20 @@ func init() { } } +const ( + + // WritableVirtualMachineInterfaceModeAccess captures enum value "access" + WritableVirtualMachineInterfaceModeAccess string = "access" + + // WritableVirtualMachineInterfaceModeTagged captures enum value "tagged" + WritableVirtualMachineInterfaceModeTagged string = "tagged" + + // WritableVirtualMachineInterfaceModeTaggedAll captures enum value "tagged-all" + WritableVirtualMachineInterfaceModeTaggedAll string = "tagged-all" +) + // prop value enum -func (m *WritableVirtualMachineInterface) validateModeEnum(path, location string, value int64) error { +func (m *WritableVirtualMachineInterface) validateModeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableVirtualMachineInterfaceTypeModePropEnum); err != nil { return err } @@ -159,7 +172,7 @@ func (m *WritableVirtualMachineInterface) validateMode(formats strfmt.Registry) } // value enum - if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { + if err := m.validateModeEnum("mode", "body", m.Mode); err != nil { return err } @@ -233,8 +246,8 @@ func (m *WritableVirtualMachineInterface) validateTags(formats strfmt.Registry) var writableVirtualMachineInterfaceTypeTypePropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[0,200,800,1000,1120,1130,1150,1170,1050,1100,1200,1300,1310,1320,1350,1400,1420,1500,1510,1650,1520,1550,1600,1700,1750,2600,2610,2620,2630,2640,2810,2820,2830,6100,6200,6300,6400,6500,6600,6700,3010,3020,3040,3080,3160,3320,3400,4000,4010,4040,4050,5000,5050,5100,5150,5200,5300,5310,5320,5330,32767]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["virtual","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","128gfc-sfp28","inifiband-sdr","inifiband-ddr","inifiband-qdr","inifiband-fdr10","inifiband-fdr","inifiband-edr","inifiband-hdr","inifiband-ndr","inifiband-xdr","t1","e1","t3","e3","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -242,8 +255,227 @@ func init() { } } +const ( + + // WritableVirtualMachineInterfaceTypeVirtual captures enum value "virtual" + WritableVirtualMachineInterfaceTypeVirtual string = "virtual" + + // WritableVirtualMachineInterfaceTypeLag captures enum value "lag" + WritableVirtualMachineInterfaceTypeLag string = "lag" + + // WritableVirtualMachineInterfaceTypeNr100baseTx captures enum value "100base-tx" + WritableVirtualMachineInterfaceTypeNr100baseTx string = "100base-tx" + + // WritableVirtualMachineInterfaceTypeNr1000baset captures enum value "1000base-t" + WritableVirtualMachineInterfaceTypeNr1000baset string = "1000base-t" + + // WritableVirtualMachineInterfaceTypeNr25gbaset captures enum value "2.5gbase-t" + WritableVirtualMachineInterfaceTypeNr25gbaset string = "2.5gbase-t" + + // WritableVirtualMachineInterfaceTypeNr5gbaset captures enum value "5gbase-t" + WritableVirtualMachineInterfaceTypeNr5gbaset string = "5gbase-t" + + // WritableVirtualMachineInterfaceTypeNr10gbaset captures enum value "10gbase-t" + WritableVirtualMachineInterfaceTypeNr10gbaset string = "10gbase-t" + + // WritableVirtualMachineInterfaceTypeNr10gbaseCx4 captures enum value "10gbase-cx4" + WritableVirtualMachineInterfaceTypeNr10gbaseCx4 string = "10gbase-cx4" + + // WritableVirtualMachineInterfaceTypeNr1000basexGbic captures enum value "1000base-x-gbic" + WritableVirtualMachineInterfaceTypeNr1000basexGbic string = "1000base-x-gbic" + + // WritableVirtualMachineInterfaceTypeNr1000basexSfp captures enum value "1000base-x-sfp" + WritableVirtualMachineInterfaceTypeNr1000basexSfp string = "1000base-x-sfp" + + // WritableVirtualMachineInterfaceTypeNr10gbasexSfpp captures enum value "10gbase-x-sfpp" + WritableVirtualMachineInterfaceTypeNr10gbasexSfpp string = "10gbase-x-sfpp" + + // WritableVirtualMachineInterfaceTypeNr10gbasexXfp captures enum value "10gbase-x-xfp" + WritableVirtualMachineInterfaceTypeNr10gbasexXfp string = "10gbase-x-xfp" + + // WritableVirtualMachineInterfaceTypeNr10gbasexXenpak captures enum value "10gbase-x-xenpak" + WritableVirtualMachineInterfaceTypeNr10gbasexXenpak string = "10gbase-x-xenpak" + + // WritableVirtualMachineInterfaceTypeNr10gbasexX2 captures enum value "10gbase-x-x2" + WritableVirtualMachineInterfaceTypeNr10gbasexX2 string = "10gbase-x-x2" + + // WritableVirtualMachineInterfaceTypeNr25gbasexSfp28 captures enum value "25gbase-x-sfp28" + WritableVirtualMachineInterfaceTypeNr25gbasexSfp28 string = "25gbase-x-sfp28" + + // WritableVirtualMachineInterfaceTypeNr40gbasexQsfpp captures enum value "40gbase-x-qsfpp" + WritableVirtualMachineInterfaceTypeNr40gbasexQsfpp string = "40gbase-x-qsfpp" + + // WritableVirtualMachineInterfaceTypeNr50gbasexSfp28 captures enum value "50gbase-x-sfp28" + WritableVirtualMachineInterfaceTypeNr50gbasexSfp28 string = "50gbase-x-sfp28" + + // WritableVirtualMachineInterfaceTypeNr100gbasexCfp captures enum value "100gbase-x-cfp" + WritableVirtualMachineInterfaceTypeNr100gbasexCfp string = "100gbase-x-cfp" + + // WritableVirtualMachineInterfaceTypeNr100gbasexCfp2 captures enum value "100gbase-x-cfp2" + WritableVirtualMachineInterfaceTypeNr100gbasexCfp2 string = "100gbase-x-cfp2" + + // WritableVirtualMachineInterfaceTypeNr200gbasexCfp2 captures enum value "200gbase-x-cfp2" + WritableVirtualMachineInterfaceTypeNr200gbasexCfp2 string = "200gbase-x-cfp2" + + // WritableVirtualMachineInterfaceTypeNr100gbasexCfp4 captures enum value "100gbase-x-cfp4" + WritableVirtualMachineInterfaceTypeNr100gbasexCfp4 string = "100gbase-x-cfp4" + + // WritableVirtualMachineInterfaceTypeNr100gbasexCpak captures enum value "100gbase-x-cpak" + WritableVirtualMachineInterfaceTypeNr100gbasexCpak string = "100gbase-x-cpak" + + // WritableVirtualMachineInterfaceTypeNr100gbasexQsfp28 captures enum value "100gbase-x-qsfp28" + WritableVirtualMachineInterfaceTypeNr100gbasexQsfp28 string = "100gbase-x-qsfp28" + + // WritableVirtualMachineInterfaceTypeNr200gbasexQsfp56 captures enum value "200gbase-x-qsfp56" + WritableVirtualMachineInterfaceTypeNr200gbasexQsfp56 string = "200gbase-x-qsfp56" + + // WritableVirtualMachineInterfaceTypeNr400gbasexQsfpdd captures enum value "400gbase-x-qsfpdd" + WritableVirtualMachineInterfaceTypeNr400gbasexQsfpdd string = "400gbase-x-qsfpdd" + + // WritableVirtualMachineInterfaceTypeNr400gbasexOsfp captures enum value "400gbase-x-osfp" + WritableVirtualMachineInterfaceTypeNr400gbasexOsfp string = "400gbase-x-osfp" + + // WritableVirtualMachineInterfaceTypeIeee80211a captures enum value "ieee802.11a" + WritableVirtualMachineInterfaceTypeIeee80211a string = "ieee802.11a" + + // WritableVirtualMachineInterfaceTypeIeee80211g captures enum value "ieee802.11g" + WritableVirtualMachineInterfaceTypeIeee80211g string = "ieee802.11g" + + // WritableVirtualMachineInterfaceTypeIeee80211n captures enum value "ieee802.11n" + WritableVirtualMachineInterfaceTypeIeee80211n string = "ieee802.11n" + + // WritableVirtualMachineInterfaceTypeIeee80211ac captures enum value "ieee802.11ac" + WritableVirtualMachineInterfaceTypeIeee80211ac string = "ieee802.11ac" + + // WritableVirtualMachineInterfaceTypeIeee80211ad captures enum value "ieee802.11ad" + WritableVirtualMachineInterfaceTypeIeee80211ad string = "ieee802.11ad" + + // WritableVirtualMachineInterfaceTypeIeee80211ax captures enum value "ieee802.11ax" + WritableVirtualMachineInterfaceTypeIeee80211ax string = "ieee802.11ax" + + // WritableVirtualMachineInterfaceTypeGsm captures enum value "gsm" + WritableVirtualMachineInterfaceTypeGsm string = "gsm" + + // WritableVirtualMachineInterfaceTypeCdma captures enum value "cdma" + WritableVirtualMachineInterfaceTypeCdma string = "cdma" + + // WritableVirtualMachineInterfaceTypeLte captures enum value "lte" + WritableVirtualMachineInterfaceTypeLte string = "lte" + + // WritableVirtualMachineInterfaceTypeSonetOc3 captures enum value "sonet-oc3" + WritableVirtualMachineInterfaceTypeSonetOc3 string = "sonet-oc3" + + // WritableVirtualMachineInterfaceTypeSonetOc12 captures enum value "sonet-oc12" + WritableVirtualMachineInterfaceTypeSonetOc12 string = "sonet-oc12" + + // WritableVirtualMachineInterfaceTypeSonetOc48 captures enum value "sonet-oc48" + WritableVirtualMachineInterfaceTypeSonetOc48 string = "sonet-oc48" + + // WritableVirtualMachineInterfaceTypeSonetOc192 captures enum value "sonet-oc192" + WritableVirtualMachineInterfaceTypeSonetOc192 string = "sonet-oc192" + + // WritableVirtualMachineInterfaceTypeSonetOc768 captures enum value "sonet-oc768" + WritableVirtualMachineInterfaceTypeSonetOc768 string = "sonet-oc768" + + // WritableVirtualMachineInterfaceTypeSonetOc1920 captures enum value "sonet-oc1920" + WritableVirtualMachineInterfaceTypeSonetOc1920 string = "sonet-oc1920" + + // WritableVirtualMachineInterfaceTypeSonetOc3840 captures enum value "sonet-oc3840" + WritableVirtualMachineInterfaceTypeSonetOc3840 string = "sonet-oc3840" + + // WritableVirtualMachineInterfaceTypeNr1gfcSfp captures enum value "1gfc-sfp" + WritableVirtualMachineInterfaceTypeNr1gfcSfp string = "1gfc-sfp" + + // WritableVirtualMachineInterfaceTypeNr2gfcSfp captures enum value "2gfc-sfp" + WritableVirtualMachineInterfaceTypeNr2gfcSfp string = "2gfc-sfp" + + // WritableVirtualMachineInterfaceTypeNr4gfcSfp captures enum value "4gfc-sfp" + WritableVirtualMachineInterfaceTypeNr4gfcSfp string = "4gfc-sfp" + + // WritableVirtualMachineInterfaceTypeNr8gfcSfpp captures enum value "8gfc-sfpp" + WritableVirtualMachineInterfaceTypeNr8gfcSfpp string = "8gfc-sfpp" + + // WritableVirtualMachineInterfaceTypeNr16gfcSfpp captures enum value "16gfc-sfpp" + WritableVirtualMachineInterfaceTypeNr16gfcSfpp string = "16gfc-sfpp" + + // WritableVirtualMachineInterfaceTypeNr32gfcSfp28 captures enum value "32gfc-sfp28" + WritableVirtualMachineInterfaceTypeNr32gfcSfp28 string = "32gfc-sfp28" + + // WritableVirtualMachineInterfaceTypeNr128gfcSfp28 captures enum value "128gfc-sfp28" + WritableVirtualMachineInterfaceTypeNr128gfcSfp28 string = "128gfc-sfp28" + + // WritableVirtualMachineInterfaceTypeInifibandSdr captures enum value "inifiband-sdr" + WritableVirtualMachineInterfaceTypeInifibandSdr string = "inifiband-sdr" + + // WritableVirtualMachineInterfaceTypeInifibandDdr captures enum value "inifiband-ddr" + WritableVirtualMachineInterfaceTypeInifibandDdr string = "inifiband-ddr" + + // WritableVirtualMachineInterfaceTypeInifibandQdr captures enum value "inifiband-qdr" + WritableVirtualMachineInterfaceTypeInifibandQdr string = "inifiband-qdr" + + // WritableVirtualMachineInterfaceTypeInifibandFdr10 captures enum value "inifiband-fdr10" + WritableVirtualMachineInterfaceTypeInifibandFdr10 string = "inifiband-fdr10" + + // WritableVirtualMachineInterfaceTypeInifibandFdr captures enum value "inifiband-fdr" + WritableVirtualMachineInterfaceTypeInifibandFdr string = "inifiband-fdr" + + // WritableVirtualMachineInterfaceTypeInifibandEdr captures enum value "inifiband-edr" + WritableVirtualMachineInterfaceTypeInifibandEdr string = "inifiband-edr" + + // WritableVirtualMachineInterfaceTypeInifibandHdr captures enum value "inifiband-hdr" + WritableVirtualMachineInterfaceTypeInifibandHdr string = "inifiband-hdr" + + // WritableVirtualMachineInterfaceTypeInifibandNdr captures enum value "inifiband-ndr" + WritableVirtualMachineInterfaceTypeInifibandNdr string = "inifiband-ndr" + + // WritableVirtualMachineInterfaceTypeInifibandXdr captures enum value "inifiband-xdr" + WritableVirtualMachineInterfaceTypeInifibandXdr string = "inifiband-xdr" + + // WritableVirtualMachineInterfaceTypeT1 captures enum value "t1" + WritableVirtualMachineInterfaceTypeT1 string = "t1" + + // WritableVirtualMachineInterfaceTypeE1 captures enum value "e1" + WritableVirtualMachineInterfaceTypeE1 string = "e1" + + // WritableVirtualMachineInterfaceTypeT3 captures enum value "t3" + WritableVirtualMachineInterfaceTypeT3 string = "t3" + + // WritableVirtualMachineInterfaceTypeE3 captures enum value "e3" + WritableVirtualMachineInterfaceTypeE3 string = "e3" + + // WritableVirtualMachineInterfaceTypeCiscoStackwise captures enum value "cisco-stackwise" + WritableVirtualMachineInterfaceTypeCiscoStackwise string = "cisco-stackwise" + + // WritableVirtualMachineInterfaceTypeCiscoStackwisePlus captures enum value "cisco-stackwise-plus" + WritableVirtualMachineInterfaceTypeCiscoStackwisePlus string = "cisco-stackwise-plus" + + // WritableVirtualMachineInterfaceTypeCiscoFlexstack captures enum value "cisco-flexstack" + WritableVirtualMachineInterfaceTypeCiscoFlexstack string = "cisco-flexstack" + + // WritableVirtualMachineInterfaceTypeCiscoFlexstackPlus captures enum value "cisco-flexstack-plus" + WritableVirtualMachineInterfaceTypeCiscoFlexstackPlus string = "cisco-flexstack-plus" + + // WritableVirtualMachineInterfaceTypeJuniperVcp captures enum value "juniper-vcp" + WritableVirtualMachineInterfaceTypeJuniperVcp string = "juniper-vcp" + + // WritableVirtualMachineInterfaceTypeExtremeSummitstack captures enum value "extreme-summitstack" + WritableVirtualMachineInterfaceTypeExtremeSummitstack string = "extreme-summitstack" + + // WritableVirtualMachineInterfaceTypeExtremeSummitstack128 captures enum value "extreme-summitstack-128" + WritableVirtualMachineInterfaceTypeExtremeSummitstack128 string = "extreme-summitstack-128" + + // WritableVirtualMachineInterfaceTypeExtremeSummitstack256 captures enum value "extreme-summitstack-256" + WritableVirtualMachineInterfaceTypeExtremeSummitstack256 string = "extreme-summitstack-256" + + // WritableVirtualMachineInterfaceTypeExtremeSummitstack512 captures enum value "extreme-summitstack-512" + WritableVirtualMachineInterfaceTypeExtremeSummitstack512 string = "extreme-summitstack-512" + + // WritableVirtualMachineInterfaceTypeOther captures enum value "other" + WritableVirtualMachineInterfaceTypeOther string = "other" +) + // prop value enum -func (m *WritableVirtualMachineInterface) validateTypeEnum(path, location string, value int64) error { +func (m *WritableVirtualMachineInterface) validateTypeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableVirtualMachineInterfaceTypeTypePropEnum); err != nil { return err } @@ -252,12 +484,12 @@ func (m *WritableVirtualMachineInterface) validateTypeEnum(path, location string func (m *WritableVirtualMachineInterface) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil + if err := validate.Required("type", "body", m.Type); err != nil { + return err } // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { return err } diff --git a/netbox/models/writable_virtual_machine_with_config_context.go b/netbox/models/writable_virtual_machine_with_config_context.go index a3fe8ade6af5dc674d2529b075463dd172e6d378..1e39f1e2391b8ac6c105f2bbd6a07752355230ba 100644 --- a/netbox/models/writable_virtual_machine_with_config_context.go +++ b/netbox/models/writable_virtual_machine_with_config_context.go @@ -13,6 +13,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package models @@ -23,9 +24,8 @@ import ( "encoding/json" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) @@ -102,8 +102,8 @@ type WritableVirtualMachineWithConfigContext struct { Site string `json:"site,omitempty"` // Status - // Enum: [1 0 3] - Status int64 `json:"status,omitempty"` + // Enum: [active offline staged] + Status string `json:"status,omitempty"` // tags Tags []string `json:"tags"` @@ -252,8 +252,8 @@ func (m *WritableVirtualMachineWithConfigContext) validateName(formats strfmt.Re var writableVirtualMachineWithConfigContextTypeStatusPropEnum []interface{} func init() { - var res []int64 - if err := json.Unmarshal([]byte(`[1,0,3]`), &res); err != nil { + var res []string + if err := json.Unmarshal([]byte(`["active","offline","staged"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -261,8 +261,20 @@ func init() { } } +const ( + + // WritableVirtualMachineWithConfigContextStatusActive captures enum value "active" + WritableVirtualMachineWithConfigContextStatusActive string = "active" + + // WritableVirtualMachineWithConfigContextStatusOffline captures enum value "offline" + WritableVirtualMachineWithConfigContextStatusOffline string = "offline" + + // WritableVirtualMachineWithConfigContextStatusStaged captures enum value "staged" + WritableVirtualMachineWithConfigContextStatusStaged string = "staged" +) + // prop value enum -func (m *WritableVirtualMachineWithConfigContext) validateStatusEnum(path, location string, value int64) error { +func (m *WritableVirtualMachineWithConfigContext) validateStatusEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, writableVirtualMachineWithConfigContextTypeStatusPropEnum); err != nil { return err } diff --git a/swagger.json b/swagger.json index a38cecf25537ef98797134e9c897445896cddcc7..9d3f8b88242a24412a87297a91f66599615c7451 100644 --- a/swagger.json +++ b/swagger.json @@ -3,18 +3,15 @@ "info": { "title": "NetBox API", "description": "API to access NetBox", - "termsOfService": "https://github.com/digitalocean/netbox", - "contact": { - "email": "netbox@digitalocean.com" - }, + "termsOfService": "https://github.com/netbox-community/netbox", "license": { "name": "Apache v2 License" }, - "version": "2.3" + "version": "2.7" }, - "host": "localhost:8000", + "host": "netbox.fbi.h-da.de", "schemes": [ - "http" + "https" ], "basePath": "/api", "consumes": [ @@ -24,13 +21,15 @@ "application/json" ], "securityDefinitions": { - "basic": { - "type": "basic" + "Bearer": { + "in": "header", + "name": "Authorization", + "type": "apiKey" } }, "security": [ { - "basic": [] + "Bearer": [] } ], "paths": { @@ -76,7 +75,7 @@ "/circuits/circuit-terminations/": { "get": { "operationId": "circuits_circuit-terminations_list", - "description": "", + "description": "Call to super to allow for caching", "parameters": [ { "name": "term_side", @@ -90,14 +89,14 @@ "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { "name": "upstream_speed", "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { "name": "xconnect_id", @@ -203,7 +202,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableCircuitTermination" + "$ref": "#/definitions/CircuitTermination" } } }, @@ -216,7 +215,7 @@ "/circuits/circuit-terminations/{id}/": { "get": { "operationId": "circuits_circuit-terminations_read", - "description": "", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { @@ -247,7 +246,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableCircuitTermination" + "$ref": "#/definitions/CircuitTermination" } } }, @@ -272,7 +271,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableCircuitTermination" + "$ref": "#/definitions/CircuitTermination" } } }, @@ -306,8 +305,15 @@ "/circuits/circuit-types/": { "get": { "operationId": "circuits_circuit-types_list", - "description": "", + "description": "Call to super to allow for caching", "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "name", "in": "query", @@ -322,6 +328,13 @@ "required": false, "type": "string" }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -404,7 +417,7 @@ "/circuits/circuit-types/{id}/": { "get": { "operationId": "circuits_circuit-types_read", - "description": "", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { @@ -494,7 +507,7 @@ "/circuits/circuits/": { "get": { "operationId": "circuits_circuits_list", - "description": "", + "description": "Call to super to allow for caching", "parameters": [ { "name": "cid", @@ -515,7 +528,77 @@ "in": "query", "description": "", "required": false, - "type": "number" + "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": "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": "id__in", @@ -567,28 +650,35 @@ "type": "string" }, { - "name": "tenant_id", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "region", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag", "in": "query", "description": "", "required": false, @@ -663,7 +753,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableCircuit" + "$ref": "#/definitions/Circuit" } } }, @@ -676,7 +766,7 @@ "/circuits/circuits/{id}/": { "get": { "operationId": "circuits_circuits_read", - "description": "", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { @@ -707,7 +797,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableCircuit" + "$ref": "#/definitions/Circuit" } } }, @@ -732,7 +822,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableCircuit" + "$ref": "#/definitions/Circuit" } } }, @@ -766,7 +856,7 @@ "/circuits/providers/": { "get": { "operationId": "circuits_providers_list", - "description": "", + "description": "Call to super to allow for caching", "parameters": [ { "name": "name", @@ -787,7 +877,7 @@ "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { "name": "account", @@ -796,6 +886,48 @@ "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": "id__in", "in": "query", @@ -810,6 +942,20 @@ "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_id", "in": "query", @@ -824,6 +970,13 @@ "required": false, "type": "string" }, + { + "name": "tag", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -885,7 +1038,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableProvider" + "$ref": "#/definitions/Provider" } } ], @@ -893,7 +1046,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableProvider" + "$ref": "#/definitions/Provider" } } }, @@ -906,7 +1059,7 @@ "/circuits/providers/{id}/": { "get": { "operationId": "circuits_providers_read", - "description": "", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { @@ -929,7 +1082,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableProvider" + "$ref": "#/definitions/Provider" } } ], @@ -937,7 +1090,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableProvider" + "$ref": "#/definitions/Provider" } } }, @@ -954,7 +1107,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableProvider" + "$ref": "#/definitions/Provider" } } ], @@ -962,7 +1115,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableProvider" + "$ref": "#/definitions/Provider" } } }, @@ -1059,141 +1212,118 @@ } ] }, - "/dcim/connected-device/": { + "/dcim/cables/": { "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", + "operationId": "dcim_cables_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "peer-device", + "name": "id", "in": "query", - "description": "The name of the peer device", - "required": true, + "description": "", + "required": false, "type": "string" }, { - "name": "peer-interface", + "name": "label", "in": "query", - "description": "The name of the peer interface", - "required": true, + "description": "", + "required": false, "type": "string" - } - ], - "responses": { - "200": { + }, + { + "name": "length", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/Device" - } - } - }, - "tags": [ - "dcim" - ] - }, - "parameters": [] - }, - "/dcim/console-connections/": { - "get": { - "operationId": "dcim_console-connections_list", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "name", + "name": "length_unit", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "connection_status", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device", + "name": "status", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "limit", + "name": "color", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "device_id", "in": "query", - "description": "The initial index from which to return the results.", + "description": "", "required": false, - "type": "integer" - } - ], - "responses": { - "200": { + "type": "string" + }, + { + "name": "device", + "in": "query", "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": [ + "required": false, + "type": "string" + }, { - "name": "name", + "name": "rack_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "devicetype_id", + "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, @@ -1240,7 +1370,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/ConsolePortTemplate" + "$ref": "#/definitions/Cable" } } } @@ -1252,7 +1382,7 @@ ] }, "post": { - "operationId": "dcim_console-port-templates_create", + "operationId": "dcim_cables_create", "description": "", "parameters": [ { @@ -1260,7 +1390,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConsolePortTemplate" + "$ref": "#/definitions/WritableCable" } } ], @@ -1268,7 +1398,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableConsolePortTemplate" + "$ref": "#/definitions/Cable" } } }, @@ -1278,16 +1408,16 @@ }, "parameters": [] }, - "/dcim/console-port-templates/{id}/": { + "/dcim/cables/{id}/": { "get": { - "operationId": "dcim_console-port-templates_read", - "description": "", + "operationId": "dcim_cables_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/ConsolePortTemplate" + "$ref": "#/definitions/Cable" } } }, @@ -1296,7 +1426,7 @@ ] }, "put": { - "operationId": "dcim_console-port-templates_update", + "operationId": "dcim_cables_update", "description": "", "parameters": [ { @@ -1304,7 +1434,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConsolePortTemplate" + "$ref": "#/definitions/WritableCable" } } ], @@ -1312,7 +1442,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableConsolePortTemplate" + "$ref": "#/definitions/Cable" } } }, @@ -1321,7 +1451,7 @@ ] }, "patch": { - "operationId": "dcim_console-port-templates_partial_update", + "operationId": "dcim_cables_partial_update", "description": "", "parameters": [ { @@ -1329,7 +1459,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConsolePortTemplate" + "$ref": "#/definitions/WritableCable" } } ], @@ -1337,7 +1467,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableConsolePortTemplate" + "$ref": "#/definitions/Cable" } } }, @@ -1346,7 +1476,7 @@ ] }, "delete": { - "operationId": "dcim_console-port-templates_delete", + "operationId": "dcim_cables_delete", "description": "", "parameters": [], "responses": { @@ -1362,15 +1492,49 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this console port template.", + "description": "A unique integer value identifying this cable.", "required": true, "type": "integer" } ] }, - "/dcim/console-ports/": { + "/dcim/connected-device/": { "get": { - "operationId": "dcim_console-ports_list", + "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": [ { @@ -1380,6 +1544,20 @@ "required": false, "type": "string" }, + { + "name": "connection_status", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "device_id", "in": "query", @@ -1446,8 +1624,102 @@ "dcim" ] }, + "parameters": [] + }, + "/dcim/console-port-templates/": { + "get": { + "operationId": "dcim_console-port-templates_list", + "description": "Call to super to allow for caching", + "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": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "devicetype_id", + "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-ports_create", + "operationId": "dcim_console-port-templates_create", "description": "", "parameters": [ { @@ -1455,7 +1727,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConsolePort" + "$ref": "#/definitions/WritableConsolePortTemplate" } } ], @@ -1463,7 +1735,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableConsolePort" + "$ref": "#/definitions/ConsolePortTemplate" } } }, @@ -1473,16 +1745,16 @@ }, "parameters": [] }, - "/dcim/console-ports/{id}/": { + "/dcim/console-port-templates/{id}/": { "get": { - "operationId": "dcim_console-ports_read", - "description": "", + "operationId": "dcim_console-port-templates_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/ConsolePort" + "$ref": "#/definitions/ConsolePortTemplate" } } }, @@ -1491,7 +1763,7 @@ ] }, "put": { - "operationId": "dcim_console-ports_update", + "operationId": "dcim_console-port-templates_update", "description": "", "parameters": [ { @@ -1499,7 +1771,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConsolePort" + "$ref": "#/definitions/WritableConsolePortTemplate" } } ], @@ -1507,7 +1779,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableConsolePort" + "$ref": "#/definitions/ConsolePortTemplate" } } }, @@ -1516,7 +1788,7 @@ ] }, "patch": { - "operationId": "dcim_console-ports_partial_update", + "operationId": "dcim_console-port-templates_partial_update", "description": "", "parameters": [ { @@ -1524,7 +1796,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConsolePort" + "$ref": "#/definitions/WritableConsolePortTemplate" } } ], @@ -1532,7 +1804,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableConsolePort" + "$ref": "#/definitions/ConsolePortTemplate" } } }, @@ -1541,7 +1813,7 @@ ] }, "delete": { - "operationId": "dcim_console-ports_delete", + "operationId": "dcim_console-port-templates_delete", "description": "", "parameters": [], "responses": { @@ -1557,26 +1829,110 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this console port.", + "description": "A unique integer value identifying this console port template.", "required": true, "type": "integer" } ] }, - "/dcim/console-server-port-templates/": { + "/dcim/console-ports/": { "get": { - "operationId": "dcim_console-server-port-templates_list", - "description": "", + "operationId": "dcim_console-ports_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "name", + "name": "id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "devicetype_id", + "name": "name", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "connection_status", + "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_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": "type", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "cabled", "in": "query", "description": "", "required": false, @@ -1623,7 +1979,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/ConsoleServerPortTemplate" + "$ref": "#/definitions/ConsolePort" } } } @@ -1635,7 +1991,7 @@ ] }, "post": { - "operationId": "dcim_console-server-port-templates_create", + "operationId": "dcim_console-ports_create", "description": "", "parameters": [ { @@ -1643,7 +1999,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConsoleServerPortTemplate" + "$ref": "#/definitions/WritableConsolePort" } } ], @@ -1651,7 +2007,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableConsoleServerPortTemplate" + "$ref": "#/definitions/ConsolePort" } } }, @@ -1661,16 +2017,16 @@ }, "parameters": [] }, - "/dcim/console-server-port-templates/{id}/": { + "/dcim/console-ports/{id}/": { "get": { - "operationId": "dcim_console-server-port-templates_read", - "description": "", + "operationId": "dcim_console-ports_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/ConsoleServerPortTemplate" + "$ref": "#/definitions/ConsolePort" } } }, @@ -1679,7 +2035,7 @@ ] }, "put": { - "operationId": "dcim_console-server-port-templates_update", + "operationId": "dcim_console-ports_update", "description": "", "parameters": [ { @@ -1687,7 +2043,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConsoleServerPortTemplate" + "$ref": "#/definitions/WritableConsolePort" } } ], @@ -1695,7 +2051,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableConsoleServerPortTemplate" + "$ref": "#/definitions/ConsolePort" } } }, @@ -1704,7 +2060,7 @@ ] }, "patch": { - "operationId": "dcim_console-server-port-templates_partial_update", + "operationId": "dcim_console-ports_partial_update", "description": "", "parameters": [ { @@ -1712,7 +2068,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConsoleServerPortTemplate" + "$ref": "#/definitions/WritableConsolePort" } } ], @@ -1720,7 +2076,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableConsoleServerPortTemplate" + "$ref": "#/definitions/ConsolePort" } } }, @@ -1729,7 +2085,7 @@ ] }, "delete": { - "operationId": "dcim_console-server-port-templates_delete", + "operationId": "dcim_console-ports_delete", "description": "", "parameters": [], "responses": { @@ -1745,17 +2101,51 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this console server port template.", + "description": "A unique integer value identifying this console port.", "required": true, "type": "integer" } ] }, - "/dcim/console-server-ports/": { + "/dcim/console-ports/{id}/trace/": { "get": { - "operationId": "dcim_console-server-ports_list", - "description": "", + "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": "Call to super to allow for caching", "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "name", "in": "query", @@ -1764,14 +2154,21 @@ "type": "string" }, { - "name": "device_id", + "name": "type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device", + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "devicetype_id", "in": "query", "description": "", "required": false, @@ -1818,7 +2215,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/ConsoleServerPort" + "$ref": "#/definitions/ConsoleServerPortTemplate" } } } @@ -1830,7 +2227,7 @@ ] }, "post": { - "operationId": "dcim_console-server-ports_create", + "operationId": "dcim_console-server-port-templates_create", "description": "", "parameters": [ { @@ -1838,7 +2235,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConsoleServerPort" + "$ref": "#/definitions/WritableConsoleServerPortTemplate" } } ], @@ -1846,7 +2243,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableConsoleServerPort" + "$ref": "#/definitions/ConsoleServerPortTemplate" } } }, @@ -1856,16 +2253,16 @@ }, "parameters": [] }, - "/dcim/console-server-ports/{id}/": { + "/dcim/console-server-port-templates/{id}/": { "get": { - "operationId": "dcim_console-server-ports_read", - "description": "", + "operationId": "dcim_console-server-port-templates_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/ConsoleServerPort" + "$ref": "#/definitions/ConsoleServerPortTemplate" } } }, @@ -1874,7 +2271,7 @@ ] }, "put": { - "operationId": "dcim_console-server-ports_update", + "operationId": "dcim_console-server-port-templates_update", "description": "", "parameters": [ { @@ -1882,7 +2279,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConsoleServerPort" + "$ref": "#/definitions/WritableConsoleServerPortTemplate" } } ], @@ -1890,7 +2287,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableConsoleServerPort" + "$ref": "#/definitions/ConsoleServerPortTemplate" } } }, @@ -1899,7 +2296,7 @@ ] }, "patch": { - "operationId": "dcim_console-server-ports_partial_update", + "operationId": "dcim_console-server-port-templates_partial_update", "description": "", "parameters": [ { @@ -1907,7 +2304,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConsoleServerPort" + "$ref": "#/definitions/WritableConsoleServerPortTemplate" } } ], @@ -1915,7 +2312,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableConsoleServerPort" + "$ref": "#/definitions/ConsoleServerPortTemplate" } } }, @@ -1924,7 +2321,7 @@ ] }, "delete": { - "operationId": "dcim_console-server-ports_delete", + "operationId": "dcim_console-server-port-templates_delete", "description": "", "parameters": [], "responses": { @@ -1940,17 +2337,24 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this console server port.", + "description": "A unique integer value identifying this console server port template.", "required": true, "type": "integer" } ] }, - "/dcim/device-bay-templates/": { + "/dcim/console-server-ports/": { "get": { - "operationId": "dcim_device-bay-templates_list", - "description": "", + "operationId": "dcim_console-server-ports_list", + "description": "Call to super to allow for caching", "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "name", "in": "query", @@ -1959,202 +2363,84 @@ "type": "string" }, { - "name": "devicetype_id", + "name": "description", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "limit", + "name": "connection_status", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "q", "in": "query", - "description": "The initial index from which to return the results.", + "description": "", "required": false, - "type": "integer" - } - ], - "responses": { - "200": { + "type": "string" + }, + { + "name": "region_id", + "in": "query", "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": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableDeviceBayTemplate" - } - } - ], - "responses": { - "201": { + "name": "region", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/WritableDeviceBayTemplate" - } - } - }, - "tags": [ - "dcim" - ] - }, - "parameters": [] - }, - "/dcim/device-bay-templates/{id}/": { - "get": { - "operationId": "dcim_device-bay-templates_read", - "description": "", - "parameters": [], - "responses": { - "200": { + "required": false, + "type": "string" + }, + { + "name": "site_id", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/DeviceBayTemplate" - } - } - }, - "tags": [ - "dcim" - ] - }, - "put": { - "operationId": "dcim_device-bay-templates_update", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableDeviceBayTemplate" - } - } - ], - "responses": { - "200": { + "name": "site", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/WritableDeviceBayTemplate" - } - } - }, - "tags": [ - "dcim" - ] - }, - "patch": { - "operationId": "dcim_device-bay-templates_partial_update", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableDeviceBayTemplate" - } - } - ], - "responses": { - "200": { + "name": "device_id", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/WritableDeviceBayTemplate" - } - } - }, - "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": [ + "required": false, + "type": "string" + }, { - "name": "name", + "name": "device", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device_id", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device", + "name": "type", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "cabled", "in": "query", "description": "", "required": false, @@ -2201,7 +2487,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/DeviceBay" + "$ref": "#/definitions/ConsoleServerPort" } } } @@ -2213,7 +2499,7 @@ ] }, "post": { - "operationId": "dcim_device-bays_create", + "operationId": "dcim_console-server-ports_create", "description": "", "parameters": [ { @@ -2221,7 +2507,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableDeviceBay" + "$ref": "#/definitions/WritableConsoleServerPort" } } ], @@ -2229,7 +2515,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableDeviceBay" + "$ref": "#/definitions/ConsoleServerPort" } } }, @@ -2239,16 +2525,16 @@ }, "parameters": [] }, - "/dcim/device-bays/{id}/": { + "/dcim/console-server-ports/{id}/": { "get": { - "operationId": "dcim_device-bays_read", - "description": "", + "operationId": "dcim_console-server-ports_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/DeviceBay" + "$ref": "#/definitions/ConsoleServerPort" } } }, @@ -2257,7 +2543,7 @@ ] }, "put": { - "operationId": "dcim_device-bays_update", + "operationId": "dcim_console-server-ports_update", "description": "", "parameters": [ { @@ -2265,7 +2551,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableDeviceBay" + "$ref": "#/definitions/WritableConsoleServerPort" } } ], @@ -2273,7 +2559,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableDeviceBay" + "$ref": "#/definitions/ConsoleServerPort" } } }, @@ -2282,7 +2568,7 @@ ] }, "patch": { - "operationId": "dcim_device-bays_partial_update", + "operationId": "dcim_console-server-ports_partial_update", "description": "", "parameters": [ { @@ -2290,7 +2576,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableDeviceBay" + "$ref": "#/definitions/WritableConsoleServerPort" } } ], @@ -2298,7 +2584,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableDeviceBay" + "$ref": "#/definitions/ConsoleServerPort" } } }, @@ -2307,7 +2593,7 @@ ] }, "delete": { - "operationId": "dcim_device-bays_delete", + "operationId": "dcim_console-server-ports_delete", "description": "", "parameters": [], "responses": { @@ -2323,40 +2609,67 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this device bay.", + "description": "A unique integer value identifying this console server port.", "required": true, "type": "integer" } ] }, - "/dcim/device-roles/": { + "/dcim/console-server-ports/{id}/trace/": { "get": { - "operationId": "dcim_device-roles_list", - "description": "", + "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": "Call to super to allow for caching", "parameters": [ { - "name": "name", + "name": "id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug", + "name": "name", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "vm_role", + "name": "devicetype_id", "in": "query", "description": "", "required": false, @@ -2403,7 +2716,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/DeviceRole" + "$ref": "#/definitions/DeviceBayTemplate" } } } @@ -2415,7 +2728,7 @@ ] }, "post": { - "operationId": "dcim_device-roles_create", + "operationId": "dcim_device-bay-templates_create", "description": "", "parameters": [ { @@ -2423,7 +2736,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/DeviceRole" + "$ref": "#/definitions/WritableDeviceBayTemplate" } } ], @@ -2431,7 +2744,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/DeviceRole" + "$ref": "#/definitions/DeviceBayTemplate" } } }, @@ -2441,16 +2754,16 @@ }, "parameters": [] }, - "/dcim/device-roles/{id}/": { + "/dcim/device-bay-templates/{id}/": { "get": { - "operationId": "dcim_device-roles_read", - "description": "", + "operationId": "dcim_device-bay-templates_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/DeviceRole" + "$ref": "#/definitions/DeviceBayTemplate" } } }, @@ -2459,7 +2772,7 @@ ] }, "put": { - "operationId": "dcim_device-roles_update", + "operationId": "dcim_device-bay-templates_update", "description": "", "parameters": [ { @@ -2467,7 +2780,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/DeviceRole" + "$ref": "#/definitions/WritableDeviceBayTemplate" } } ], @@ -2475,7 +2788,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/DeviceRole" + "$ref": "#/definitions/DeviceBayTemplate" } } }, @@ -2484,7 +2797,7 @@ ] }, "patch": { - "operationId": "dcim_device-roles_partial_update", + "operationId": "dcim_device-bay-templates_partial_update", "description": "", "parameters": [ { @@ -2492,7 +2805,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/DeviceRole" + "$ref": "#/definitions/WritableDeviceBayTemplate" } } ], @@ -2500,7 +2813,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/DeviceRole" + "$ref": "#/definitions/DeviceBayTemplate" } } }, @@ -2509,7 +2822,7 @@ ] }, "delete": { - "operationId": "dcim_device-roles_delete", + "operationId": "dcim_device-bay-templates_delete", "description": "", "parameters": [], "responses": { @@ -2525,103 +2838,89 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this device role.", + "description": "A unique integer value identifying this device bay template.", "required": true, "type": "integer" } ] }, - "/dcim/device-types/": { + "/dcim/device-bays/": { "get": { - "operationId": "dcim_device-types_list", - "description": "", + "operationId": "dcim_device-bays_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "model", + "name": "id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug", + "name": "name", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "part_number", + "name": "description", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "u_height", - "in": "query", - "description": "", - "required": false, - "type": "number" - }, - { - "name": "is_full_depth", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "is_console_server", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "is_pdu", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "is_network_device", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "subdevice_role", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__in", - "in": "query", - "description": "Multiple values may be separated by commas.", - "required": false, - "type": "string" - }, - { - "name": "q", + "name": "device_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "manufacturer_id", + "name": "device", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "manufacturer", + "name": "tag", "in": "query", "description": "", "required": false, @@ -2668,7 +2967,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/DeviceType" + "$ref": "#/definitions/DeviceBay" } } } @@ -2680,7 +2979,7 @@ ] }, "post": { - "operationId": "dcim_device-types_create", + "operationId": "dcim_device-bays_create", "description": "", "parameters": [ { @@ -2688,7 +2987,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableDeviceType" + "$ref": "#/definitions/WritableDeviceBay" } } ], @@ -2696,7 +2995,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableDeviceType" + "$ref": "#/definitions/DeviceBay" } } }, @@ -2706,16 +3005,16 @@ }, "parameters": [] }, - "/dcim/device-types/{id}/": { + "/dcim/device-bays/{id}/": { "get": { - "operationId": "dcim_device-types_read", - "description": "", + "operationId": "dcim_device-bays_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/DeviceType" + "$ref": "#/definitions/DeviceBay" } } }, @@ -2724,7 +3023,7 @@ ] }, "put": { - "operationId": "dcim_device-types_update", + "operationId": "dcim_device-bays_update", "description": "", "parameters": [ { @@ -2732,7 +3031,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableDeviceType" + "$ref": "#/definitions/WritableDeviceBay" } } ], @@ -2740,7 +3039,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableDeviceType" + "$ref": "#/definitions/DeviceBay" } } }, @@ -2749,7 +3048,7 @@ ] }, "patch": { - "operationId": "dcim_device-types_partial_update", + "operationId": "dcim_device-bays_partial_update", "description": "", "parameters": [ { @@ -2757,7 +3056,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableDeviceType" + "$ref": "#/definitions/WritableDeviceBay" } } ], @@ -2765,7 +3064,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableDeviceType" + "$ref": "#/definitions/DeviceBay" } } }, @@ -2774,7 +3073,7 @@ ] }, "delete": { - "operationId": "dcim_device-types_delete", + "operationId": "dcim_device-bays_delete", "description": "", "parameters": [], "responses": { @@ -2790,103 +3089,19 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this device type.", + "description": "A unique integer value identifying this device bay.", "required": true, "type": "integer" } ] }, - "/dcim/devices/": { + "/dcim/device-roles/": { "get": { - "operationId": "dcim_devices_list", - "description": "", + "operationId": "dcim_device-roles_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "serial", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "position", - "in": "query", - "description": "", - "required": false, - "type": "number" - }, - { - "name": "id__in", - "in": "query", - "description": "Multiple values may be separated by commas.", - "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": "tenant_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "tenant", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "platform_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "platform", + "name": "id", "in": "query", "description": "", "required": false, @@ -2900,105 +3115,28 @@ "type": "string" }, { - "name": "asset_tag", - "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": "rack_group_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": "is_console_server", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "is_pdu", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "is_network_device", + "name": "slug", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "mac_address", + "name": "color", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "has_primary_ip", + "name": "vm_role", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "virtual_chassis_id", + "name": "q", "in": "query", "description": "", "required": false, @@ -3045,7 +3183,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Device" + "$ref": "#/definitions/DeviceRole" } } } @@ -3057,7 +3195,7 @@ ] }, "post": { - "operationId": "dcim_devices_create", + "operationId": "dcim_device-roles_create", "description": "", "parameters": [ { @@ -3065,7 +3203,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableDevice" + "$ref": "#/definitions/DeviceRole" } } ], @@ -3073,7 +3211,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableDevice" + "$ref": "#/definitions/DeviceRole" } } }, @@ -3083,16 +3221,16 @@ }, "parameters": [] }, - "/dcim/devices/{id}/": { + "/dcim/device-roles/{id}/": { "get": { - "operationId": "dcim_devices_read", - "description": "", + "operationId": "dcim_device-roles_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Device" + "$ref": "#/definitions/DeviceRole" } } }, @@ -3101,7 +3239,7 @@ ] }, "put": { - "operationId": "dcim_devices_update", + "operationId": "dcim_device-roles_update", "description": "", "parameters": [ { @@ -3109,7 +3247,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableDevice" + "$ref": "#/definitions/DeviceRole" } } ], @@ -3117,7 +3255,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableDevice" + "$ref": "#/definitions/DeviceRole" } } }, @@ -3126,7 +3264,7 @@ ] }, "patch": { - "operationId": "dcim_devices_partial_update", + "operationId": "dcim_device-roles_partial_update", "description": "", "parameters": [ { @@ -3134,7 +3272,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableDevice" + "$ref": "#/definitions/DeviceRole" } } ], @@ -3142,7 +3280,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableDevice" + "$ref": "#/definitions/DeviceRole" } } }, @@ -3151,7 +3289,7 @@ ] }, "delete": { - "operationId": "dcim_devices_delete", + "operationId": "dcim_device-roles_delete", "description": "", "parameters": [], "responses": { @@ -3167,60 +3305,180 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this device.", + "description": "A unique integer value identifying this device role.", "required": true, "type": "integer" } ] }, - "/dcim/devices/{id}/napalm/": { - "get": { - "operationId": "dcim_devices_napalm", - "description": "Execute a NAPALM method on a Device", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Device" - } - } - }, - "tags": [ - "dcim" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this device.", - "required": true, - "type": "integer" - } - ] - }, - "/dcim/interface-connections/": { + "/dcim/device-types/": { "get": { - "operationId": "dcim_interface-connections_list", - "description": "", + "operationId": "dcim_device-types_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "connection_status", + "name": "model", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "slug", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device", + "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": "id__in", + "in": "query", + "description": "Multiple values may be separated by commas.", + "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, @@ -3267,7 +3525,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/InterfaceConnection" + "$ref": "#/definitions/DeviceType" } } } @@ -3279,7 +3537,7 @@ ] }, "post": { - "operationId": "dcim_interface-connections_create", + "operationId": "dcim_device-types_create", "description": "", "parameters": [ { @@ -3287,7 +3545,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableInterfaceConnection" + "$ref": "#/definitions/WritableDeviceType" } } ], @@ -3295,7 +3553,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableInterfaceConnection" + "$ref": "#/definitions/DeviceType" } } }, @@ -3305,16 +3563,16 @@ }, "parameters": [] }, - "/dcim/interface-connections/{id}/": { + "/dcim/device-types/{id}/": { "get": { - "operationId": "dcim_interface-connections_read", - "description": "", + "operationId": "dcim_device-types_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/InterfaceConnection" + "$ref": "#/definitions/DeviceType" } } }, @@ -3323,7 +3581,7 @@ ] }, "put": { - "operationId": "dcim_interface-connections_update", + "operationId": "dcim_device-types_update", "description": "", "parameters": [ { @@ -3331,7 +3589,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableInterfaceConnection" + "$ref": "#/definitions/WritableDeviceType" } } ], @@ -3339,7 +3597,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableInterfaceConnection" + "$ref": "#/definitions/DeviceType" } } }, @@ -3348,7 +3606,7 @@ ] }, "patch": { - "operationId": "dcim_interface-connections_partial_update", + "operationId": "dcim_device-types_partial_update", "description": "", "parameters": [ { @@ -3356,7 +3614,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableInterfaceConnection" + "$ref": "#/definitions/WritableDeviceType" } } ], @@ -3364,7 +3622,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableInterfaceConnection" + "$ref": "#/definitions/DeviceType" } } }, @@ -3373,7 +3631,7 @@ ] }, "delete": { - "operationId": "dcim_interface-connections_delete", + "operationId": "dcim_device-types_delete", "description": "", "parameters": [], "responses": { @@ -3389,17 +3647,24 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this interface connection.", + "description": "A unique integer value identifying this device type.", "required": true, "type": "integer" } ] }, - "/dcim/interface-templates/": { + "/dcim/devices/": { "get": { - "operationId": "dcim_interface-templates_list", - "description": "", + "operationId": "dcim_devices_list", + "description": "Call to super to allow for caching", "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "name", "in": "query", @@ -3408,480 +3673,252 @@ "type": "string" }, { - "name": "form_factor", + "name": "asset_tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "mgmt_only", + "name": "face", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "devicetype_id", + "name": "position", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "limit", + "name": "vc_position", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "vc_priority", "in": "query", - "description": "The initial index from which to return the results.", + "description": "", "required": false, - "type": "integer" - } - ], - "responses": { - "200": { + "type": "string" + }, + { + "name": "local_context_data", + "in": "query", "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": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableInterfaceTemplate" - } - } - ], - "responses": { - "201": { + "name": "tenant_group_id", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/WritableInterfaceTemplate" - } - } - }, - "tags": [ - "dcim" - ] - }, - "parameters": [] - }, - "/dcim/interface-templates/{id}/": { - "get": { - "operationId": "dcim_interface-templates_read", - "description": "", - "parameters": [], - "responses": { - "200": { + "required": false, + "type": "string" + }, + { + "name": "tenant_group", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/InterfaceTemplate" - } - } - }, - "tags": [ - "dcim" - ] - }, - "put": { - "operationId": "dcim_interface-templates_update", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableInterfaceTemplate" - } - } - ], - "responses": { - "200": { + "name": "tenant_id", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/WritableInterfaceTemplate" - } - } - }, - "tags": [ - "dcim" - ] - }, - "patch": { - "operationId": "dcim_interface-templates_partial_update", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableInterfaceTemplate" - } - } - ], - "responses": { - "200": { + "name": "tenant", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/WritableInterfaceTemplate" - } - } - }, - "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": [ + "required": false, + "type": "string" + }, { - "name": "name", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "form_factor", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "enabled", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "mtu", + "name": "last_updated", "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { - "name": "mgmt_only", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device_id", + "name": "id__in", + "in": "query", + "description": "Multiple values may be separated by commas.", + "required": false, + "type": "string" + }, + { + "name": "q", "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { - "name": "type", + "name": "manufacturer_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "lag_id", + "name": "manufacturer", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "mac_address", + "name": "device_type_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "limit", + "name": "role_id", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "role", "in": "query", - "description": "The initial index from which to return the results.", + "description": "", "required": false, - "type": "integer" - } - ], - "responses": { - "200": { + "type": "string" + }, + { + "name": "platform_id", + "in": "query", "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": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableInterface" - } - } - ], - "responses": { - "201": { + "name": "platform", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/WritableInterface" - } - } - }, - "tags": [ - "dcim" - ] - }, - "parameters": [] - }, - "/dcim/interfaces/{id}/": { - "get": { - "operationId": "dcim_interfaces_read", - "description": "", - "parameters": [], - "responses": { - "200": { + "required": false, + "type": "string" + }, + { + "name": "region_id", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/Interface" - } - } - }, - "tags": [ - "dcim" - ] - }, - "put": { - "operationId": "dcim_interfaces_update", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableInterface" - } - } - ], - "responses": { - "200": { + "name": "region", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/WritableInterface" - } - } - }, - "tags": [ - "dcim" - ] - }, - "patch": { - "operationId": "dcim_interfaces_partial_update", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableInterface" - } - } - ], - "responses": { - "200": { + "name": "site_id", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/WritableInterface" - } - } - }, - "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}/graphs/": { - "get": { - "operationId": "dcim_interfaces_graphs", - "description": "A convenience method for rendering graphs for a particular interface.", - "parameters": [], - "responses": { - "200": { + "required": false, + "type": "string" + }, + { + "name": "site", + "in": "query", "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": [ + "required": false, + "type": "string" + }, { - "name": "name", + "name": "rack_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "part_id", + "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, @@ -3895,56 +3932,77 @@ "type": "string" }, { - "name": "asset_tag", + "name": "has_primary_ip", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "discovered", + "name": "virtual_chassis_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device_id", + "name": "virtual_chassis_member", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device", + "name": "console_ports", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "console_server_ports", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "parent_id", + "name": "power_ports", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "manufacturer_id", + "name": "power_outlets", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "manufacturer", + "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, @@ -3991,7 +4049,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/InventoryItem" + "$ref": "#/definitions/DeviceWithConfigContext" } } } @@ -4003,7 +4061,7 @@ ] }, "post": { - "operationId": "dcim_inventory-items_create", + "operationId": "dcim_devices_create", "description": "", "parameters": [ { @@ -4011,7 +4069,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableInventoryItem" + "$ref": "#/definitions/WritableDeviceWithConfigContext" } } ], @@ -4019,7 +4077,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableInventoryItem" + "$ref": "#/definitions/DeviceWithConfigContext" } } }, @@ -4029,16 +4087,16 @@ }, "parameters": [] }, - "/dcim/inventory-items/{id}/": { + "/dcim/devices/{id}/": { "get": { - "operationId": "dcim_inventory-items_read", - "description": "", + "operationId": "dcim_devices_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/InventoryItem" + "$ref": "#/definitions/DeviceWithConfigContext" } } }, @@ -4047,7 +4105,7 @@ ] }, "put": { - "operationId": "dcim_inventory-items_update", + "operationId": "dcim_devices_update", "description": "", "parameters": [ { @@ -4055,7 +4113,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableInventoryItem" + "$ref": "#/definitions/WritableDeviceWithConfigContext" } } ], @@ -4063,7 +4121,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableInventoryItem" + "$ref": "#/definitions/DeviceWithConfigContext" } } }, @@ -4072,7 +4130,7 @@ ] }, "patch": { - "operationId": "dcim_inventory-items_partial_update", + "operationId": "dcim_devices_partial_update", "description": "", "parameters": [ { @@ -4080,7 +4138,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableInventoryItem" + "$ref": "#/definitions/WritableDeviceWithConfigContext" } } ], @@ -4088,7 +4146,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableInventoryItem" + "$ref": "#/definitions/DeviceWithConfigContext" } } }, @@ -4097,7 +4155,7 @@ ] }, "delete": { - "operationId": "dcim_inventory-items_delete", + "operationId": "dcim_devices_delete", "description": "", "parameters": [], "responses": { @@ -4113,33 +4171,115 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this inventory item.", + "description": "A unique integer value identifying this device.", "required": true, "type": "integer" } ] }, - "/dcim/manufacturers/": { + "/dcim/devices/{id}/graphs/": { "get": { - "operationId": "dcim_manufacturers_list", - "description": "", + "operationId": "dcim_devices_graphs", + "description": "A convenience method for rendering graphs for a particular Device.", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/DeviceWithConfigContext" + } + } + }, + "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": "name", + "name": "method", "in": "query", - "description": "", - "required": false, + "required": true, "type": "string" - }, - { - "name": "slug", - "in": "query", + } + ], + "responses": { + "200": { "description": "", - "required": false, - "type": "string" - }, - { - "name": "limit", + "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": "Call to super to allow for caching", + "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": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "devicetype_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, @@ -4179,7 +4319,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/FrontPortTemplate" } } } @@ -4191,7 +4331,7 @@ ] }, "post": { - "operationId": "dcim_manufacturers_create", + "operationId": "dcim_front-port-templates_create", "description": "", "parameters": [ { @@ -4199,7 +4339,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/WritableFrontPortTemplate" } } ], @@ -4207,7 +4347,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/FrontPortTemplate" } } }, @@ -4217,16 +4357,16 @@ }, "parameters": [] }, - "/dcim/manufacturers/{id}/": { + "/dcim/front-port-templates/{id}/": { "get": { - "operationId": "dcim_manufacturers_read", - "description": "", + "operationId": "dcim_front-port-templates_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/FrontPortTemplate" } } }, @@ -4235,7 +4375,7 @@ ] }, "put": { - "operationId": "dcim_manufacturers_update", + "operationId": "dcim_front-port-templates_update", "description": "", "parameters": [ { @@ -4243,7 +4383,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/WritableFrontPortTemplate" } } ], @@ -4251,7 +4391,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/FrontPortTemplate" } } }, @@ -4260,7 +4400,7 @@ ] }, "patch": { - "operationId": "dcim_manufacturers_partial_update", + "operationId": "dcim_front-port-templates_partial_update", "description": "", "parameters": [ { @@ -4268,7 +4408,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/WritableFrontPortTemplate" } } ], @@ -4276,7 +4416,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/FrontPortTemplate" } } }, @@ -4285,7 +4425,7 @@ ] }, "delete": { - "operationId": "dcim_manufacturers_delete", + "operationId": "dcim_front-port-templates_delete", "description": "", "parameters": [], "responses": { @@ -4301,17 +4441,24 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this manufacturer.", + "description": "A unique integer value identifying this front port template.", "required": true, "type": "integer" } ] }, - "/dcim/platforms/": { + "/dcim/front-ports/": { "get": { - "operationId": "dcim_platforms_list", - "description": "", + "operationId": "dcim_front-ports_list", + "description": "Call to super to allow for caching", "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "name", "in": "query", @@ -4320,21 +4467,77 @@ "type": "string" }, { - "name": "slug", + "name": "type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "manufacturer_id", + "name": "description", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "manufacturer", + "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_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, @@ -4381,7 +4584,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Platform" + "$ref": "#/definitions/FrontPort" } } } @@ -4393,7 +4596,7 @@ ] }, "post": { - "operationId": "dcim_platforms_create", + "operationId": "dcim_front-ports_create", "description": "", "parameters": [ { @@ -4401,7 +4604,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePlatform" + "$ref": "#/definitions/WritableFrontPort" } } ], @@ -4409,7 +4612,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritablePlatform" + "$ref": "#/definitions/FrontPort" } } }, @@ -4419,16 +4622,16 @@ }, "parameters": [] }, - "/dcim/platforms/{id}/": { + "/dcim/front-ports/{id}/": { "get": { - "operationId": "dcim_platforms_read", - "description": "", + "operationId": "dcim_front-ports_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Platform" + "$ref": "#/definitions/FrontPort" } } }, @@ -4437,7 +4640,7 @@ ] }, "put": { - "operationId": "dcim_platforms_update", + "operationId": "dcim_front-ports_update", "description": "", "parameters": [ { @@ -4445,7 +4648,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePlatform" + "$ref": "#/definitions/WritableFrontPort" } } ], @@ -4453,7 +4656,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritablePlatform" + "$ref": "#/definitions/FrontPort" } } }, @@ -4462,7 +4665,7 @@ ] }, "patch": { - "operationId": "dcim_platforms_partial_update", + "operationId": "dcim_front-ports_partial_update", "description": "", "parameters": [ { @@ -4470,7 +4673,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePlatform" + "$ref": "#/definitions/WritableFrontPort" } } ], @@ -4478,7 +4681,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritablePlatform" + "$ref": "#/definitions/FrontPort" } } }, @@ -4487,7 +4690,7 @@ ] }, "delete": { - "operationId": "dcim_platforms_delete", + "operationId": "dcim_front-ports_delete", "description": "", "parameters": [], "responses": { @@ -4503,33 +4706,33 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this platform.", + "description": "A unique integer value identifying this front port.", "required": true, "type": "integer" } ] }, - "/dcim/power-connections/": { + "/dcim/interface-connections/": { "get": { - "operationId": "dcim_power-connections_list", + "operationId": "dcim_interface-connections_list", "description": "", "parameters": [ { - "name": "name", + "name": "connection_status", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "connection_status", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "device_id", "in": "query", "description": "", "required": false, @@ -4583,7 +4786,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/PowerPort" + "$ref": "#/definitions/InterfaceConnection" } } } @@ -4596,11 +4799,18 @@ }, "parameters": [] }, - "/dcim/power-outlet-templates/": { + "/dcim/interface-templates/": { "get": { - "operationId": "dcim_power-outlet-templates_list", - "description": "", + "operationId": "dcim_interface-templates_list", + "description": "Call to super to allow for caching", "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "name", "in": "query", @@ -4608,6 +4818,27 @@ "required": false, "type": "string" }, + { + "name": "type", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "mgmt_only", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "devicetype_id", "in": "query", @@ -4656,7 +4887,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/PowerOutletTemplate" + "$ref": "#/definitions/InterfaceTemplate" } } } @@ -4668,7 +4899,7 @@ ] }, "post": { - "operationId": "dcim_power-outlet-templates_create", + "operationId": "dcim_interface-templates_create", "description": "", "parameters": [ { @@ -4676,7 +4907,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutletTemplate" + "$ref": "#/definitions/WritableInterfaceTemplate" } } ], @@ -4684,7 +4915,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritablePowerOutletTemplate" + "$ref": "#/definitions/InterfaceTemplate" } } }, @@ -4694,16 +4925,16 @@ }, "parameters": [] }, - "/dcim/power-outlet-templates/{id}/": { + "/dcim/interface-templates/{id}/": { "get": { - "operationId": "dcim_power-outlet-templates_read", - "description": "", + "operationId": "dcim_interface-templates_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerOutletTemplate" + "$ref": "#/definitions/InterfaceTemplate" } } }, @@ -4712,7 +4943,7 @@ ] }, "put": { - "operationId": "dcim_power-outlet-templates_update", + "operationId": "dcim_interface-templates_update", "description": "", "parameters": [ { @@ -4720,7 +4951,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutletTemplate" + "$ref": "#/definitions/WritableInterfaceTemplate" } } ], @@ -4728,7 +4959,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritablePowerOutletTemplate" + "$ref": "#/definitions/InterfaceTemplate" } } }, @@ -4737,7 +4968,7 @@ ] }, "patch": { - "operationId": "dcim_power-outlet-templates_partial_update", + "operationId": "dcim_interface-templates_partial_update", "description": "", "parameters": [ { @@ -4745,7 +4976,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutletTemplate" + "$ref": "#/definitions/WritableInterfaceTemplate" } } ], @@ -4753,7 +4984,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritablePowerOutletTemplate" + "$ref": "#/definitions/InterfaceTemplate" } } }, @@ -4762,7 +4993,7 @@ ] }, "delete": { - "operationId": "dcim_power-outlet-templates_delete", + "operationId": "dcim_interface-templates_delete", "description": "", "parameters": [], "responses": { @@ -4778,17 +5009,24 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this power outlet template.", + "description": "A unique integer value identifying this interface template.", "required": true, "type": "integer" } ] }, - "/dcim/power-outlets/": { + "/dcim/interfaces/": { "get": { - "operationId": "dcim_power-outlets_list", - "description": "", + "operationId": "dcim_interfaces_list", + "description": "Call to super to allow for caching", "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "name", "in": "query", @@ -4797,30 +5035,163 @@ "type": "string" }, { - "name": "device_id", + "name": "connection_status", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device", + "name": "type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "limit", + "name": "enabled", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "mtu", "in": "query", - "description": "The initial index from which to return the results.", + "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": "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_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": "kind", + "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": "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" } @@ -4851,7 +5222,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/PowerOutlet" + "$ref": "#/definitions/DeviceInterface" } } } @@ -4863,7 +5234,7 @@ ] }, "post": { - "operationId": "dcim_power-outlets_create", + "operationId": "dcim_interfaces_create", "description": "", "parameters": [ { @@ -4871,7 +5242,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutlet" + "$ref": "#/definitions/WritableDeviceInterface" } } ], @@ -4879,7 +5250,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritablePowerOutlet" + "$ref": "#/definitions/DeviceInterface" } } }, @@ -4889,16 +5260,16 @@ }, "parameters": [] }, - "/dcim/power-outlets/{id}/": { + "/dcim/interfaces/{id}/": { "get": { - "operationId": "dcim_power-outlets_read", - "description": "", + "operationId": "dcim_interfaces_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerOutlet" + "$ref": "#/definitions/DeviceInterface" } } }, @@ -4907,7 +5278,7 @@ ] }, "put": { - "operationId": "dcim_power-outlets_update", + "operationId": "dcim_interfaces_update", "description": "", "parameters": [ { @@ -4915,7 +5286,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutlet" + "$ref": "#/definitions/WritableDeviceInterface" } } ], @@ -4923,7 +5294,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritablePowerOutlet" + "$ref": "#/definitions/DeviceInterface" } } }, @@ -4932,7 +5303,7 @@ ] }, "patch": { - "operationId": "dcim_power-outlets_partial_update", + "operationId": "dcim_interfaces_partial_update", "description": "", "parameters": [ { @@ -4940,7 +5311,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutlet" + "$ref": "#/definitions/WritableDeviceInterface" } } ], @@ -4948,7 +5319,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritablePowerOutlet" + "$ref": "#/definitions/DeviceInterface" } } }, @@ -4957,7 +5328,7 @@ ] }, "delete": { - "operationId": "dcim_power-outlets_delete", + "operationId": "dcim_interfaces_delete", "description": "", "parameters": [], "responses": { @@ -4973,101 +5344,22 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this power outlet.", + "description": "A unique integer value identifying this interface.", "required": true, "type": "integer" } ] }, - "/dcim/power-port-templates/": { + "/dcim/interfaces/{id}/graphs/": { "get": { - "operationId": "dcim_power-port-templates_list", - "description": "", - "parameters": [ - { - "name": "name", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "devicetype_id", - "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" - } - ], + "operationId": "dcim_interfaces_graphs", + "description": "A convenience method for rendering graphs for a particular interface.", + "parameters": [], "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/WritablePowerPortTemplate" + "$ref": "#/definitions/DeviceInterface" } } }, @@ -5075,18 +5367,26 @@ "dcim" ] }, - "parameters": [] + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this interface.", + "required": true, + "type": "integer" + } + ] }, - "/dcim/power-port-templates/{id}/": { + "/dcim/interfaces/{id}/trace/": { "get": { - "operationId": "dcim_power-port-templates_read", - "description": "", + "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/PowerPortTemplate" + "$ref": "#/definitions/DeviceInterface" } } }, @@ -5094,84 +5394,28 @@ "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/WritablePowerPortTemplate" - } - } - }, - "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/WritablePowerPortTemplate" - } - } - }, - "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.", + "description": "A unique integer value identifying this interface.", "required": true, "type": "integer" } ] }, - "/dcim/power-ports/": { + "/dcim/inventory-items/": { "get": { - "operationId": "dcim_power-ports_list", - "description": "", + "operationId": "dcim_inventory-items_list", + "description": "Call to super to allow for caching", "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "name", "in": "query", @@ -5179,6 +5423,62 @@ "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": "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_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "device_id", "in": "query", @@ -5193,6 +5493,41 @@ "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": "limit", "in": "query", @@ -5234,7 +5569,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/PowerPort" + "$ref": "#/definitions/InventoryItem" } } } @@ -5246,7 +5581,7 @@ ] }, "post": { - "operationId": "dcim_power-ports_create", + "operationId": "dcim_inventory-items_create", "description": "", "parameters": [ { @@ -5254,7 +5589,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPort" + "$ref": "#/definitions/WritableInventoryItem" } } ], @@ -5262,7 +5597,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritablePowerPort" + "$ref": "#/definitions/InventoryItem" } } }, @@ -5272,16 +5607,16 @@ }, "parameters": [] }, - "/dcim/power-ports/{id}/": { + "/dcim/inventory-items/{id}/": { "get": { - "operationId": "dcim_power-ports_read", - "description": "", + "operationId": "dcim_inventory-items_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPort" + "$ref": "#/definitions/InventoryItem" } } }, @@ -5290,7 +5625,7 @@ ] }, "put": { - "operationId": "dcim_power-ports_update", + "operationId": "dcim_inventory-items_update", "description": "", "parameters": [ { @@ -5298,7 +5633,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPort" + "$ref": "#/definitions/WritableInventoryItem" } } ], @@ -5306,7 +5641,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritablePowerPort" + "$ref": "#/definitions/InventoryItem" } } }, @@ -5315,7 +5650,7 @@ ] }, "patch": { - "operationId": "dcim_power-ports_partial_update", + "operationId": "dcim_inventory-items_partial_update", "description": "", "parameters": [ { @@ -5323,7 +5658,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPort" + "$ref": "#/definitions/WritableInventoryItem" } } ], @@ -5331,7 +5666,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritablePowerPort" + "$ref": "#/definitions/InventoryItem" } } }, @@ -5340,7 +5675,7 @@ ] }, "delete": { - "operationId": "dcim_power-ports_delete", + "operationId": "dcim_inventory-items_delete", "description": "", "parameters": [], "responses": { @@ -5356,19 +5691,19 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this power port.", + "description": "A unique integer value identifying this inventory item.", "required": true, "type": "integer" } ] }, - "/dcim/rack-groups/": { + "/dcim/manufacturers/": { "get": { - "operationId": "dcim_rack-groups_list", - "description": "", + "operationId": "dcim_manufacturers_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "site_id", + "name": "id", "in": "query", "description": "", "required": false, @@ -5389,7 +5724,7 @@ "type": "string" }, { - "name": "site", + "name": "q", "in": "query", "description": "", "required": false, @@ -5436,7 +5771,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/RackGroup" + "$ref": "#/definitions/Manufacturer" } } } @@ -5448,7 +5783,7 @@ ] }, "post": { - "operationId": "dcim_rack-groups_create", + "operationId": "dcim_manufacturers_create", "description": "", "parameters": [ { @@ -5456,7 +5791,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRackGroup" + "$ref": "#/definitions/Manufacturer" } } ], @@ -5464,7 +5799,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableRackGroup" + "$ref": "#/definitions/Manufacturer" } } }, @@ -5474,16 +5809,16 @@ }, "parameters": [] }, - "/dcim/rack-groups/{id}/": { + "/dcim/manufacturers/{id}/": { "get": { - "operationId": "dcim_rack-groups_read", - "description": "", + "operationId": "dcim_manufacturers_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/RackGroup" + "$ref": "#/definitions/Manufacturer" } } }, @@ -5492,7 +5827,7 @@ ] }, "put": { - "operationId": "dcim_rack-groups_update", + "operationId": "dcim_manufacturers_update", "description": "", "parameters": [ { @@ -5500,7 +5835,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRackGroup" + "$ref": "#/definitions/Manufacturer" } } ], @@ -5508,7 +5843,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableRackGroup" + "$ref": "#/definitions/Manufacturer" } } }, @@ -5517,7 +5852,7 @@ ] }, "patch": { - "operationId": "dcim_rack-groups_partial_update", + "operationId": "dcim_manufacturers_partial_update", "description": "", "parameters": [ { @@ -5525,7 +5860,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRackGroup" + "$ref": "#/definitions/Manufacturer" } } ], @@ -5533,7 +5868,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableRackGroup" + "$ref": "#/definitions/Manufacturer" } } }, @@ -5542,7 +5877,7 @@ ] }, "delete": { - "operationId": "dcim_rack-groups_delete", + "operationId": "dcim_manufacturers_delete", "description": "", "parameters": [], "responses": { @@ -5558,105 +5893,70 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this rack group.", + "description": "A unique integer value identifying this manufacturer.", "required": true, "type": "integer" } ] }, - "/dcim/rack-reservations/": { + "/dcim/platforms/": { "get": { - "operationId": "dcim_rack-reservations_list", - "description": "", + "operationId": "dcim_platforms_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "created", + "name": "id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__in", + "name": "name", "in": "query", - "description": "Multiple values may be separated by commas.", + "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "slug", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "rack_id", + "name": "napalm_driver", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "manufacturer_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_id", + "name": "manufacturer", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group", + "name": "limit", "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": "user_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "user", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "limit", - "in": "query", - "description": "Number of results to return per page.", + "description": "Number of results to return per page.", "required": false, "type": "integer" }, @@ -5694,7 +5994,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/RackReservation" + "$ref": "#/definitions/Platform" } } } @@ -5706,7 +6006,7 @@ ] }, "post": { - "operationId": "dcim_rack-reservations_create", + "operationId": "dcim_platforms_create", "description": "", "parameters": [ { @@ -5714,7 +6014,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRackReservation" + "$ref": "#/definitions/WritablePlatform" } } ], @@ -5722,7 +6022,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableRackReservation" + "$ref": "#/definitions/Platform" } } }, @@ -5732,16 +6032,16 @@ }, "parameters": [] }, - "/dcim/rack-reservations/{id}/": { + "/dcim/platforms/{id}/": { "get": { - "operationId": "dcim_rack-reservations_read", - "description": "", + "operationId": "dcim_platforms_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/RackReservation" + "$ref": "#/definitions/Platform" } } }, @@ -5750,7 +6050,7 @@ ] }, "put": { - "operationId": "dcim_rack-reservations_update", + "operationId": "dcim_platforms_update", "description": "", "parameters": [ { @@ -5758,7 +6058,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRackReservation" + "$ref": "#/definitions/WritablePlatform" } } ], @@ -5766,7 +6066,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableRackReservation" + "$ref": "#/definitions/Platform" } } }, @@ -5775,7 +6075,7 @@ ] }, "patch": { - "operationId": "dcim_rack-reservations_partial_update", + "operationId": "dcim_platforms_partial_update", "description": "", "parameters": [ { @@ -5783,7 +6083,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRackReservation" + "$ref": "#/definitions/WritablePlatform" } } ], @@ -5791,7 +6091,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableRackReservation" + "$ref": "#/definitions/Platform" } } }, @@ -5800,7 +6100,7 @@ ] }, "delete": { - "operationId": "dcim_rack-reservations_delete", + "operationId": "dcim_platforms_delete", "description": "", "parameters": [], "responses": { @@ -5816,15 +6116,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this rack reservation.", + "description": "A unique integer value identifying this platform.", "required": true, "type": "integer" } ] }, - "/dcim/rack-roles/": { + "/dcim/power-connections/": { "get": { - "operationId": "dcim_rack-roles_list", + "operationId": "dcim_power-connections_list", "description": "", "parameters": [ { @@ -5835,14 +6135,28 @@ "type": "string" }, { - "name": "slug", + "name": "connection_status", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color", + "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, @@ -5889,7 +6203,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/RackRole" + "$ref": "#/definitions/PowerPort" } } } @@ -5900,263 +6214,190 @@ "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" - ] - }, "parameters": [] }, - "/dcim/rack-roles/{id}/": { + "/dcim/power-feeds/": { "get": { - "operationId": "dcim_rack-roles_read", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/RackRole" - } - } - }, - "tags": [ - "dcim" - ] - }, - "put": { - "operationId": "dcim_rack-roles_update", - "description": "", + "operationId": "dcim_power-feeds_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RackRole" - } - } - ], - "responses": { - "200": { + "name": "name", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/RackRole" - } - } - }, - "tags": [ - "dcim" - ] - }, - "patch": { - "operationId": "dcim_rack-roles_partial_update", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RackRole" - } - } - ], - "responses": { - "200": { + "name": "status", + "in": "query", "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": [ + "required": false, + "type": "string" + }, { - "name": "name", + "name": "type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "serial", + "name": "supply", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "type", + "name": "phase", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "width", + "name": "voltage", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "u_height", + "name": "amperage", "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { - "name": "desc_units", + "name": "max_utilization", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__in", + "name": "created", "in": "query", - "description": "Multiple values may be separated by commas.", + "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "facility_id", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_id", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group", + "name": "id__in", "in": "query", - "description": "", + "description": "Multiple values may be separated by commas.", "required": false, "type": "string" }, { - "name": "tenant_id", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "role_id", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "role", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "limit", + "name": "site", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "power_panel_id", "in": "query", - "description": "The initial index from which to return the results.", + "description": "", "required": false, - "type": "integer" - } - ], - "responses": { + "type": "string" + }, + { + "name": "rack_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag", + "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": { @@ -6182,7 +6423,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Rack" + "$ref": "#/definitions/PowerFeed" } } } @@ -6194,7 +6435,7 @@ ] }, "post": { - "operationId": "dcim_racks_create", + "operationId": "dcim_power-feeds_create", "description": "", "parameters": [ { @@ -6202,7 +6443,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRack" + "$ref": "#/definitions/WritablePowerFeed" } } ], @@ -6210,7 +6451,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableRack" + "$ref": "#/definitions/PowerFeed" } } }, @@ -6220,16 +6461,16 @@ }, "parameters": [] }, - "/dcim/racks/{id}/": { + "/dcim/power-feeds/{id}/": { "get": { - "operationId": "dcim_racks_read", - "description": "", + "operationId": "dcim_power-feeds_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Rack" + "$ref": "#/definitions/PowerFeed" } } }, @@ -6238,7 +6479,7 @@ ] }, "put": { - "operationId": "dcim_racks_update", + "operationId": "dcim_power-feeds_update", "description": "", "parameters": [ { @@ -6246,7 +6487,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRack" + "$ref": "#/definitions/WritablePowerFeed" } } ], @@ -6254,7 +6495,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableRack" + "$ref": "#/definitions/PowerFeed" } } }, @@ -6263,7 +6504,7 @@ ] }, "patch": { - "operationId": "dcim_racks_partial_update", + "operationId": "dcim_power-feeds_partial_update", "description": "", "parameters": [ { @@ -6271,7 +6512,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRack" + "$ref": "#/definitions/WritablePowerFeed" } } ], @@ -6279,7 +6520,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableRack" + "$ref": "#/definitions/PowerFeed" } } }, @@ -6288,7 +6529,7 @@ ] }, "delete": { - "operationId": "dcim_racks_delete", + "operationId": "dcim_power-feeds_delete", "description": "", "parameters": [], "responses": { @@ -6304,44 +6545,24 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this rack.", - "required": true, - "type": "integer" - } - ] - }, - "/dcim/racks/{id}/units/": { - "get": { - "operationId": "dcim_racks_units", - "description": "List rack units (by rack)", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Rack" - } - } - }, - "tags": [ - "dcim" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this rack.", + "description": "A unique integer value identifying this power feed.", "required": true, "type": "integer" } ] }, - "/dcim/regions/": { + "/dcim/power-outlet-templates/": { "get": { - "operationId": "dcim_regions_list", - "description": "", + "operationId": "dcim_power-outlet-templates_list", + "description": "Call to super to allow for caching", "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "name", "in": "query", @@ -6350,28 +6571,28 @@ "type": "string" }, { - "name": "slug", + "name": "type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "feed_leg", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "parent_id", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "parent", + "name": "devicetype_id", "in": "query", "description": "", "required": false, @@ -6418,7 +6639,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Region" + "$ref": "#/definitions/PowerOutletTemplate" } } } @@ -6430,7 +6651,7 @@ ] }, "post": { - "operationId": "dcim_regions_create", + "operationId": "dcim_power-outlet-templates_create", "description": "", "parameters": [ { @@ -6438,7 +6659,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRegion" + "$ref": "#/definitions/WritablePowerOutletTemplate" } } ], @@ -6446,7 +6667,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableRegion" + "$ref": "#/definitions/PowerOutletTemplate" } } }, @@ -6456,16 +6677,16 @@ }, "parameters": [] }, - "/dcim/regions/{id}/": { + "/dcim/power-outlet-templates/{id}/": { "get": { - "operationId": "dcim_regions_read", - "description": "", + "operationId": "dcim_power-outlet-templates_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Region" + "$ref": "#/definitions/PowerOutletTemplate" } } }, @@ -6474,7 +6695,7 @@ ] }, "put": { - "operationId": "dcim_regions_update", + "operationId": "dcim_power-outlet-templates_update", "description": "", "parameters": [ { @@ -6482,7 +6703,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRegion" + "$ref": "#/definitions/WritablePowerOutletTemplate" } } ], @@ -6490,7 +6711,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableRegion" + "$ref": "#/definitions/PowerOutletTemplate" } } }, @@ -6499,7 +6720,7 @@ ] }, "patch": { - "operationId": "dcim_regions_partial_update", + "operationId": "dcim_power-outlet-templates_partial_update", "description": "", "parameters": [ { @@ -6507,7 +6728,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRegion" + "$ref": "#/definitions/WritablePowerOutletTemplate" } } ], @@ -6515,7 +6736,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableRegion" + "$ref": "#/definitions/PowerOutletTemplate" } } }, @@ -6524,7 +6745,7 @@ ] }, "delete": { - "operationId": "dcim_regions_delete", + "operationId": "dcim_power-outlet-templates_delete", "description": "", "parameters": [], "responses": { @@ -6540,19 +6761,19 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this region.", + "description": "A unique integer value identifying this power outlet template.", "required": true, "type": "integer" } ] }, - "/dcim/sites/": { + "/dcim/power-outlets/": { "get": { - "operationId": "dcim_sites_list", - "description": "", + "operationId": "dcim_power-outlets_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "q", + "name": "id", "in": "query", "description": "", "required": false, @@ -6566,84 +6787,91 @@ "type": "string" }, { - "name": "slug", + "name": "feed_leg", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "facility", + "name": "description", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asn", + "name": "connection_status", "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { - "name": "contact_name", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_phone", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_email", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__in", + "name": "site_id", "in": "query", - "description": "Multiple values may be separated by commas.", + "description": "", "required": false, "type": "string" }, { - "name": "status", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id", + "name": "device_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region", + "name": "device", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_id", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant", + "name": "type", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "cabled", "in": "query", "description": "", "required": false, @@ -6690,7 +6918,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Site" + "$ref": "#/definitions/PowerOutlet" } } } @@ -6702,7 +6930,7 @@ ] }, "post": { - "operationId": "dcim_sites_create", + "operationId": "dcim_power-outlets_create", "description": "", "parameters": [ { @@ -6710,7 +6938,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableSite" + "$ref": "#/definitions/WritablePowerOutlet" } } ], @@ -6718,7 +6946,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableSite" + "$ref": "#/definitions/PowerOutlet" } } }, @@ -6728,16 +6956,16 @@ }, "parameters": [] }, - "/dcim/sites/{id}/": { + "/dcim/power-outlets/{id}/": { "get": { - "operationId": "dcim_sites_read", - "description": "", + "operationId": "dcim_power-outlets_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Site" + "$ref": "#/definitions/PowerOutlet" } } }, @@ -6746,7 +6974,7 @@ ] }, "put": { - "operationId": "dcim_sites_update", + "operationId": "dcim_power-outlets_update", "description": "", "parameters": [ { @@ -6754,7 +6982,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableSite" + "$ref": "#/definitions/WritablePowerOutlet" } } ], @@ -6762,7 +6990,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableSite" + "$ref": "#/definitions/PowerOutlet" } } }, @@ -6771,7 +6999,7 @@ ] }, "patch": { - "operationId": "dcim_sites_partial_update", + "operationId": "dcim_power-outlets_partial_update", "description": "", "parameters": [ { @@ -6779,7 +7007,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableSite" + "$ref": "#/definitions/WritablePowerOutlet" } } ], @@ -6787,7 +7015,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableSite" + "$ref": "#/definitions/PowerOutlet" } } }, @@ -6796,7 +7024,7 @@ ] }, "delete": { - "operationId": "dcim_sites_delete", + "operationId": "dcim_power-outlets_delete", "description": "", "parameters": [], "responses": { @@ -6812,22 +7040,22 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this site.", + "description": "A unique integer value identifying this power outlet.", "required": true, "type": "integer" } ] }, - "/dcim/sites/{id}/graphs/": { + "/dcim/power-outlets/{id}/trace/": { "get": { - "operationId": "dcim_sites_graphs", - "description": "A convenience method for rendering graphs for a particular site.", + "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/Site" + "$ref": "#/definitions/PowerOutlet" } } }, @@ -6839,71 +7067,127 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this site.", + "description": "A unique integer value identifying this power outlet.", "required": true, "type": "integer" } ] }, - "/dcim/virtual-chassis/": { + "/dcim/power-panels/": { "get": { - "operationId": "dcim_virtual-chassis_list", - "description": "", + "operationId": "dcim_power-panels_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "limit", + "name": "name", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "id__in", "in": "query", - "description": "The initial index from which to return the results.", + "description": "Multiple values may be separated by commas.", "required": false, - "type": "integer" - } - ], - "responses": { - "200": { + "type": "string" + }, + { + "name": "q", + "in": "query", "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", + "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_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rack_group_id", + "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": [ { @@ -6911,7 +7195,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVirtualChassis" + "$ref": "#/definitions/WritablePowerPanel" } } ], @@ -6919,7 +7203,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableVirtualChassis" + "$ref": "#/definitions/PowerPanel" } } }, @@ -6929,16 +7213,16 @@ }, "parameters": [] }, - "/dcim/virtual-chassis/{id}/": { + "/dcim/power-panels/{id}/": { "get": { - "operationId": "dcim_virtual-chassis_read", - "description": "", + "operationId": "dcim_power-panels_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/VirtualChassis" + "$ref": "#/definitions/PowerPanel" } } }, @@ -6947,7 +7231,7 @@ ] }, "put": { - "operationId": "dcim_virtual-chassis_update", + "operationId": "dcim_power-panels_update", "description": "", "parameters": [ { @@ -6955,7 +7239,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVirtualChassis" + "$ref": "#/definitions/WritablePowerPanel" } } ], @@ -6963,7 +7247,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableVirtualChassis" + "$ref": "#/definitions/PowerPanel" } } }, @@ -6972,7 +7256,7 @@ ] }, "patch": { - "operationId": "dcim_virtual-chassis_partial_update", + "operationId": "dcim_power-panels_partial_update", "description": "", "parameters": [ { @@ -6980,7 +7264,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVirtualChassis" + "$ref": "#/definitions/WritablePowerPanel" } } ], @@ -6988,7 +7272,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableVirtualChassis" + "$ref": "#/definitions/PowerPanel" } } }, @@ -6997,7 +7281,7 @@ ] }, "delete": { - "operationId": "dcim_virtual-chassis_delete", + "operationId": "dcim_power-panels_delete", "description": "", "parameters": [], "responses": { @@ -7013,58 +7297,19 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this virtual chassis.", + "description": "A unique integer value identifying this power panel.", "required": true, "type": "integer" } ] }, - "/extras/_choices/": { - "get": { - "operationId": "extras__choices_list", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "extras" - ] - }, - "parameters": [] - }, - "/extras/_choices/{id}/": { - "get": { - "operationId": "extras__choices_read", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "extras" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ] - }, - "/extras/export-templates/": { + "/dcim/power-port-templates/": { "get": { - "operationId": "extras_export-templates_list", - "description": "", + "operationId": "dcim_power-port-templates_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "content_type", + "name": "id", "in": "query", "description": "", "required": false, @@ -7077,6 +7322,41 @@ "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": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "devicetype_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -7118,7 +7398,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/PowerPortTemplate" } } } @@ -7126,11 +7406,11 @@ } }, "tags": [ - "extras" + "dcim" ] }, "post": { - "operationId": "extras_export-templates_create", + "operationId": "dcim_power-port-templates_create", "description": "", "parameters": [ { @@ -7138,7 +7418,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/WritablePowerPortTemplate" } } ], @@ -7146,35 +7426,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/PowerPortTemplate" } } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [] }, - "/extras/export-templates/{id}/": { + "/dcim/power-port-templates/{id}/": { "get": { - "operationId": "extras_export-templates_read", - "description": "", + "operationId": "dcim_power-port-templates_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/PowerPortTemplate" } } }, "tags": [ - "extras" + "dcim" ] }, "put": { - "operationId": "extras_export-templates_update", + "operationId": "dcim_power-port-templates_update", "description": "", "parameters": [ { @@ -7182,7 +7462,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/WritablePowerPortTemplate" } } ], @@ -7190,16 +7470,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/PowerPortTemplate" } } }, "tags": [ - "extras" + "dcim" ] }, "patch": { - "operationId": "extras_export-templates_partial_update", + "operationId": "dcim_power-port-templates_partial_update", "description": "", "parameters": [ { @@ -7207,7 +7487,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/WritablePowerPortTemplate" } } ], @@ -7215,16 +7495,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/PowerPortTemplate" } } }, "tags": [ - "extras" + "dcim" ] }, "delete": { - "operationId": "extras_export-templates_delete", + "operationId": "dcim_power-port-templates_delete", "description": "", "parameters": [], "responses": { @@ -7233,26 +7513,26 @@ } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this export template.", + "description": "A unique integer value identifying this power port template.", "required": true, "type": "integer" } ] }, - "/extras/graphs/": { + "/dcim/power-ports/": { "get": { - "operationId": "extras_graphs_list", - "description": "", + "operationId": "dcim_power-ports_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "type", + "name": "id", "in": "query", "description": "", "required": false, @@ -7266,30 +7546,128 @@ "type": "string" }, { - "name": "limit", + "name": "maximum_draw", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "allocated_draw", "in": "query", - "description": "The initial index from which to return the results.", + "description": "", "required": false, - "type": "integer" - } - ], - "responses": { - "200": { + "type": "string" + }, + { + "name": "description", + "in": "query", "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { + "required": false, + "type": "string" + }, + { + "name": "connection_status", + "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_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": "type", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "cabled", + "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" }, @@ -7306,7 +7684,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Graph" + "$ref": "#/definitions/PowerPort" } } } @@ -7314,11 +7692,11 @@ } }, "tags": [ - "extras" + "dcim" ] }, "post": { - "operationId": "extras_graphs_create", + "operationId": "dcim_power-ports_create", "description": "", "parameters": [ { @@ -7326,7 +7704,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableGraph" + "$ref": "#/definitions/WritablePowerPort" } } ], @@ -7334,35 +7712,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableGraph" + "$ref": "#/definitions/PowerPort" } } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [] }, - "/extras/graphs/{id}/": { + "/dcim/power-ports/{id}/": { "get": { - "operationId": "extras_graphs_read", - "description": "", + "operationId": "dcim_power-ports_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Graph" + "$ref": "#/definitions/PowerPort" } } }, "tags": [ - "extras" + "dcim" ] }, "put": { - "operationId": "extras_graphs_update", + "operationId": "dcim_power-ports_update", "description": "", "parameters": [ { @@ -7370,7 +7748,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableGraph" + "$ref": "#/definitions/WritablePowerPort" } } ], @@ -7378,16 +7756,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableGraph" + "$ref": "#/definitions/PowerPort" } } }, "tags": [ - "extras" + "dcim" ] }, "patch": { - "operationId": "extras_graphs_partial_update", + "operationId": "dcim_power-ports_partial_update", "description": "", "parameters": [ { @@ -7395,7 +7773,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableGraph" + "$ref": "#/definitions/WritablePowerPort" } } ], @@ -7403,16 +7781,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableGraph" + "$ref": "#/definitions/PowerPort" } } }, "tags": [ - "extras" + "dcim" ] }, "delete": { - "operationId": "extras_graphs_delete", + "operationId": "dcim_power-ports_delete", "description": "", "parameters": [], "responses": { @@ -7421,24 +7799,107 @@ } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this graph.", + "description": "A unique integer value identifying this power port.", "required": true, "type": "integer" } ] }, - "/extras/image-attachments/": { + "/dcim/power-ports/{id}/trace/": { "get": { - "operationId": "extras_image-attachments_list", - "description": "", + "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-groups/": { + "get": { + "operationId": "dcim_rack-groups_list", + "description": "Call to super to allow for caching", "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": "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_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -7480,7 +7941,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/ImageAttachment" + "$ref": "#/definitions/RackGroup" } } } @@ -7488,11 +7949,11 @@ } }, "tags": [ - "extras" + "dcim" ] }, "post": { - "operationId": "extras_image-attachments_create", + "operationId": "dcim_rack-groups_create", "description": "", "parameters": [ { @@ -7500,7 +7961,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableImageAttachment" + "$ref": "#/definitions/WritableRackGroup" } } ], @@ -7508,35 +7969,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableImageAttachment" + "$ref": "#/definitions/RackGroup" } } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [] }, - "/extras/image-attachments/{id}/": { + "/dcim/rack-groups/{id}/": { "get": { - "operationId": "extras_image-attachments_read", - "description": "", + "operationId": "dcim_rack-groups_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/ImageAttachment" + "$ref": "#/definitions/RackGroup" } } }, "tags": [ - "extras" + "dcim" ] }, "put": { - "operationId": "extras_image-attachments_update", + "operationId": "dcim_rack-groups_update", "description": "", "parameters": [ { @@ -7544,7 +8005,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableImageAttachment" + "$ref": "#/definitions/WritableRackGroup" } } ], @@ -7552,16 +8013,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableImageAttachment" + "$ref": "#/definitions/RackGroup" } } }, "tags": [ - "extras" + "dcim" ] }, "patch": { - "operationId": "extras_image-attachments_partial_update", + "operationId": "dcim_rack-groups_partial_update", "description": "", "parameters": [ { @@ -7569,7 +8030,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableImageAttachment" + "$ref": "#/definitions/WritableRackGroup" } } ], @@ -7577,16 +8038,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableImageAttachment" + "$ref": "#/definitions/RackGroup" } } }, "tags": [ - "extras" + "dcim" ] }, "delete": { - "operationId": "extras_image-attachments_delete", + "operationId": "dcim_rack-groups_delete", "description": "", "parameters": [], "responses": { @@ -7595,133 +8056,75 @@ } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this image attachment.", + "description": "A unique integer value identifying this rack group.", "required": true, "type": "integer" } ] }, - "/extras/recent-activity/": { + "/dcim/rack-reservations/": { "get": { - "operationId": "extras_recent-activity_list", - "description": "List all UserActions to provide a log of recent activity.", + "operationId": "dcim_rack-reservations_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "user", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "username", + "name": "tenant_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "limit", + "name": "tenant_group", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "tenant_id", "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/UserAction" - } - } - } - } - } - }, - "tags": [ - "extras" - ] - }, - "parameters": [] - }, - "/extras/recent-activity/{id}/": { - "get": { - "operationId": "extras_recent-activity_read", - "description": "List all UserActions to provide a log of recent activity.", - "parameters": [], - "responses": { - "200": { + "required": false, + "type": "string" + }, + { + "name": "tenant", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/UserAction" - } - } - }, - "tags": [ - "extras" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this user action.", - "required": true, - "type": "integer" - } - ] - }, - "/extras/topology-maps/": { - "get": { - "operationId": "extras_topology-maps_list", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "name", + "name": "id__in", + "in": "query", + "description": "Multiple values may be separated by commas.", + "required": false, + "type": "string" + }, + { + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug", + "name": "rack_id", "in": "query", "description": "", "required": false, @@ -7741,6 +8144,34 @@ "required": false, "type": "string" }, + { + "name": "group_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "group", + "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": "limit", "in": "query", @@ -7782,7 +8213,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/TopologyMap" + "$ref": "#/definitions/RackReservation" } } } @@ -7790,11 +8221,11 @@ } }, "tags": [ - "extras" + "dcim" ] }, "post": { - "operationId": "extras_topology-maps_create", + "operationId": "dcim_rack-reservations_create", "description": "", "parameters": [ { @@ -7802,7 +8233,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableTopologyMap" + "$ref": "#/definitions/WritableRackReservation" } } ], @@ -7810,35 +8241,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableTopologyMap" + "$ref": "#/definitions/RackReservation" } } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [] }, - "/extras/topology-maps/{id}/": { + "/dcim/rack-reservations/{id}/": { "get": { - "operationId": "extras_topology-maps_read", - "description": "", + "operationId": "dcim_rack-reservations_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/TopologyMap" + "$ref": "#/definitions/RackReservation" } } }, "tags": [ - "extras" + "dcim" ] }, "put": { - "operationId": "extras_topology-maps_update", + "operationId": "dcim_rack-reservations_update", "description": "", "parameters": [ { @@ -7846,7 +8277,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableTopologyMap" + "$ref": "#/definitions/WritableRackReservation" } } ], @@ -7854,16 +8285,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableTopologyMap" + "$ref": "#/definitions/RackReservation" } } }, "tags": [ - "extras" + "dcim" ] }, "patch": { - "operationId": "extras_topology-maps_partial_update", + "operationId": "dcim_rack-reservations_partial_update", "description": "", "parameters": [ { @@ -7871,7 +8302,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableTopologyMap" + "$ref": "#/definitions/WritableRackReservation" } } ], @@ -7879,16 +8310,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableTopologyMap" + "$ref": "#/definitions/RackReservation" } } }, "tags": [ - "extras" + "dcim" ] }, "delete": { - "operationId": "extras_topology-maps_delete", + "operationId": "dcim_rack-reservations_delete", "description": "", "parameters": [], "responses": { @@ -7897,127 +8328,54 @@ } }, "tags": [ - "extras" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this topology map.", - "required": true, - "type": "integer" - } - ] - }, - "/extras/topology-maps/{id}/render/": { - "get": { - "operationId": "extras_topology-maps_render", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/TopologyMap" - } - } - }, - "tags": [ - "extras" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this topology map.", + "description": "A unique integer value identifying this rack reservation.", "required": true, "type": "integer" } ] }, - "/ipam/_choices/": { - "get": { - "operationId": "ipam__choices_list", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "ipam" - ] - }, - "parameters": [] - }, - "/ipam/_choices/{id}/": { - "get": { - "operationId": "ipam__choices_read", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "ipam" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ] - }, - "/ipam/aggregates/": { + "/dcim/rack-roles/": { "get": { - "operationId": "ipam_aggregates_list", - "description": "", + "operationId": "dcim_rack-roles_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "family", + "name": "id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "date_added", + "name": "name", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__in", - "in": "query", - "description": "Multiple values may be separated by commas.", - "required": false, - "type": "string" - }, - { - "name": "q", + "name": "slug", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "rir_id", + "name": "color", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "rir", + "name": "q", "in": "query", "description": "", "required": false, @@ -8064,7 +8422,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Aggregate" + "$ref": "#/definitions/RackRole" } } } @@ -8072,11 +8430,11 @@ } }, "tags": [ - "ipam" + "dcim" ] }, "post": { - "operationId": "ipam_aggregates_create", + "operationId": "dcim_rack-roles_create", "description": "", "parameters": [ { @@ -8084,7 +8442,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableAggregate" + "$ref": "#/definitions/RackRole" } } ], @@ -8092,35 +8450,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableAggregate" + "$ref": "#/definitions/RackRole" } } }, "tags": [ - "ipam" + "dcim" ] }, "parameters": [] }, - "/ipam/aggregates/{id}/": { + "/dcim/rack-roles/{id}/": { "get": { - "operationId": "ipam_aggregates_read", - "description": "", + "operationId": "dcim_rack-roles_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Aggregate" + "$ref": "#/definitions/RackRole" } } }, "tags": [ - "ipam" + "dcim" ] }, "put": { - "operationId": "ipam_aggregates_update", + "operationId": "dcim_rack-roles_update", "description": "", "parameters": [ { @@ -8128,7 +8486,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableAggregate" + "$ref": "#/definitions/RackRole" } } ], @@ -8136,16 +8494,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableAggregate" + "$ref": "#/definitions/RackRole" } } }, "tags": [ - "ipam" + "dcim" ] }, "patch": { - "operationId": "ipam_aggregates_partial_update", + "operationId": "dcim_rack-roles_partial_update", "description": "", "parameters": [ { @@ -8153,7 +8511,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableAggregate" + "$ref": "#/definitions/RackRole" } } ], @@ -8161,16 +8519,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableAggregate" + "$ref": "#/definitions/RackRole" } } }, "tags": [ - "ipam" + "dcim" ] }, "delete": { - "operationId": "ipam_aggregates_delete", + "operationId": "dcim_rack-roles_delete", "description": "", "parameters": [], "responses": { @@ -8179,68 +8537,110 @@ } }, "tags": [ - "ipam" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this aggregate.", + "description": "A unique integer value identifying this rack role.", "required": true, "type": "integer" } ] }, - "/ipam/ip-addresses/": { + "/dcim/racks/": { "get": { - "operationId": "ipam_ip-addresses_list", - "description": "", + "operationId": "dcim_racks_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "family", + "name": "id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__in", + "name": "name", "in": "query", - "description": "Multiple values may be separated by commas.", + "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "facility_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "parent", + "name": "asset_tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "mask_length", + "name": "type", "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { - "name": "vrf_id", + "name": "width", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "vrf", + "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": "tenant_group_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant_group", "in": "query", "description": "", "required": false, @@ -8261,35 +8661,98 @@ "type": "string" }, { - "name": "device", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device_id", + "name": "created__gte", "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { - "name": "virtual_machine_id", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "virtual_machine", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "interface_id", + "name": "last_updated__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__in", + "in": "query", + "description": "Multiple values may be separated by commas.", + "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_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "group_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "group", "in": "query", "description": "", "required": false, @@ -8302,6 +8765,13 @@ "required": false, "type": "string" }, + { + "name": "role_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "role", "in": "query", @@ -8309,6 +8779,20 @@ "required": false, "type": "string" }, + { + "name": "serial", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -8350,7 +8834,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/IPAddress" + "$ref": "#/definitions/Rack" } } } @@ -8358,11 +8842,11 @@ } }, "tags": [ - "ipam" + "dcim" ] }, "post": { - "operationId": "ipam_ip-addresses_create", + "operationId": "dcim_racks_create", "description": "", "parameters": [ { @@ -8370,7 +8854,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableIPAddress" + "$ref": "#/definitions/WritableRack" } } ], @@ -8378,35 +8862,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableIPAddress" + "$ref": "#/definitions/Rack" } } }, "tags": [ - "ipam" + "dcim" ] }, "parameters": [] }, - "/ipam/ip-addresses/{id}/": { + "/dcim/racks/{id}/": { "get": { - "operationId": "ipam_ip-addresses_read", - "description": "", + "operationId": "dcim_racks_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/IPAddress" + "$ref": "#/definitions/Rack" } } }, "tags": [ - "ipam" + "dcim" ] }, "put": { - "operationId": "ipam_ip-addresses_update", + "operationId": "dcim_racks_update", "description": "", "parameters": [ { @@ -8414,7 +8898,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableIPAddress" + "$ref": "#/definitions/WritableRack" } } ], @@ -8422,16 +8906,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableIPAddress" + "$ref": "#/definitions/Rack" } } }, "tags": [ - "ipam" + "dcim" ] }, "patch": { - "operationId": "ipam_ip-addresses_partial_update", + "operationId": "dcim_racks_partial_update", "description": "", "parameters": [ { @@ -8439,7 +8923,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableIPAddress" + "$ref": "#/definitions/WritableRack" } } ], @@ -8447,16 +8931,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableIPAddress" + "$ref": "#/definitions/Rack" } } }, "tags": [ - "ipam" + "dcim" ] }, "delete": { - "operationId": "ipam_ip-addresses_delete", + "operationId": "dcim_racks_delete", "description": "", "parameters": [], "responses": { @@ -8465,152 +8949,169 @@ } }, "tags": [ - "ipam" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this IP address.", + "description": "A unique integer value identifying this rack.", "required": true, "type": "integer" } ] }, - "/ipam/prefixes/": { + "/dcim/racks/{id}/elevation/": { "get": { - "operationId": "ipam_prefixes_list", - "description": "", + "operationId": "dcim_racks_elevation", + "description": "Rack elevation representing the list of rack units. Also supports rendering the elevation as an SVG.", "parameters": [ { - "name": "family", + "name": "face", "in": "query", - "description": "", "required": false, - "type": "string" + "type": "string", + "enum": [ + "front", + "rear" + ], + "default": "front" }, { - "name": "is_pool", + "name": "render", "in": "query", - "description": "", "required": false, - "type": "string" + "type": "string", + "enum": [ + "json", + "svg" + ], + "default": "json" }, { - "name": "id__in", + "name": "unit_width", "in": "query", - "description": "Multiple values may be separated by commas.", "required": false, - "type": "string" + "type": "integer", + "default": 230 }, { - "name": "q", + "name": "unit_height", "in": "query", - "description": "", "required": false, - "type": "string" + "type": "integer", + "default": 20 }, { - "name": "within", + "name": "exclude", "in": "query", - "description": "", "required": false, - "type": "string" + "type": "integer" }, { - "name": "within_include", + "name": "expand_devices", "in": "query", - "description": "", "required": false, - "type": "string" - }, - { - "name": "contains", - "in": "query", + "type": "boolean", + "default": true + } + ], + "responses": { + "200": { "description": "", - "required": false, - "type": "string" - }, - { - "name": "mask_length", - "in": "query", - "description": "", - "required": false, - "type": "number" - }, - { - "name": "vrf_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "vrf", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "tenant_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "tenant", - "in": "query", + "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/racks/{id}/units/": { + "get": { + "operationId": "dcim_racks_units", + "description": "List rack units (by rack)", + "parameters": [], + "responses": { + "200": { "description": "", - "required": false, - "type": "string" - }, + "schema": { + "$ref": "#/definitions/Rack" + } + } + }, + "tags": [ + "dcim" + ], + "deprecated": true + }, + "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": "Call to super to allow for caching", + "parameters": [ { - "name": "site_id", + "name": "id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "name", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "vlan_id", + "name": "type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "vlan_vid", - "in": "query", - "description": "", - "required": false, - "type": "number" - }, - { - "name": "role_id", + "name": "positions", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "role", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "status", + "name": "devicetype_id", "in": "query", "description": "", "required": false, @@ -8657,7 +9158,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Prefix" + "$ref": "#/definitions/RearPortTemplate" } } } @@ -8665,11 +9166,11 @@ } }, "tags": [ - "ipam" + "dcim" ] }, "post": { - "operationId": "ipam_prefixes_create", + "operationId": "dcim_rear-port-templates_create", "description": "", "parameters": [ { @@ -8677,7 +9178,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePrefix" + "$ref": "#/definitions/WritableRearPortTemplate" } } ], @@ -8685,35 +9186,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritablePrefix" + "$ref": "#/definitions/RearPortTemplate" } } }, "tags": [ - "ipam" + "dcim" ] }, "parameters": [] }, - "/ipam/prefixes/{id}/": { + "/dcim/rear-port-templates/{id}/": { "get": { - "operationId": "ipam_prefixes_read", - "description": "", + "operationId": "dcim_rear-port-templates_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Prefix" + "$ref": "#/definitions/RearPortTemplate" } } }, "tags": [ - "ipam" + "dcim" ] }, "put": { - "operationId": "ipam_prefixes_update", + "operationId": "dcim_rear-port-templates_update", "description": "", "parameters": [ { @@ -8721,7 +9222,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePrefix" + "$ref": "#/definitions/WritableRearPortTemplate" } } ], @@ -8729,16 +9230,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritablePrefix" + "$ref": "#/definitions/RearPortTemplate" } } }, "tags": [ - "ipam" + "dcim" ] }, "patch": { - "operationId": "ipam_prefixes_partial_update", + "operationId": "dcim_rear-port-templates_partial_update", "description": "", "parameters": [ { @@ -8746,7 +9247,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePrefix" + "$ref": "#/definitions/WritableRearPortTemplate" } } ], @@ -8754,16 +9255,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritablePrefix" + "$ref": "#/definitions/RearPortTemplate" } } }, "tags": [ - "ipam" + "dcim" ] }, "delete": { - "operationId": "ipam_prefixes_delete", + "operationId": "dcim_rear-port-templates_delete", "description": "", "parameters": [], "responses": { @@ -8772,169 +9273,135 @@ } }, "tags": [ - "ipam" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this prefix.", + "description": "A unique integer value identifying this rear port template.", "required": true, "type": "integer" } ] }, - "/ipam/prefixes/{id}/available-ips/": { + "/dcim/rear-ports/": { "get": { - "operationId": "ipam_prefixes_available-ips_read", - "description": "A convenience method for returning available IP addresses within a prefix. By default, the number of IPs\nreturned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be passed,\nhowever results will not be paginated.", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Prefix" - } - } - }, - "tags": [ - "ipam" - ] - }, - "post": { - "operationId": "ipam_prefixes_available-ips_create", - "description": "A convenience method for returning available IP addresses within a prefix. By default, the number of IPs\nreturned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be passed,\nhowever results will not be paginated.", + "operationId": "dcim_rear-ports_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Prefix" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/Prefix" - } - } - }, - "tags": [ - "ipam" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this prefix.", - "required": true, - "type": "integer" - } - ] - }, - "/ipam/prefixes/{id}/available-prefixes/": { - "get": { - "operationId": "ipam_prefixes_available-prefixes_read", - "description": "A convenience method for returning available child prefixes within a parent.", - "parameters": [], - "responses": { - "200": { + "name": "id", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/Prefix" - } - } - }, - "tags": [ - "ipam" - ] - }, - "post": { - "operationId": "ipam_prefixes_available-prefixes_create", - "description": "A convenience method for returning available child prefixes within a parent.", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Prefix" - } - } - ], - "responses": { - "201": { + "name": "name", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/Prefix" - } - } - }, - "tags": [ - "ipam" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this prefix.", - "required": true, - "type": "integer" - } - ] - }, - "/ipam/rirs/": { - "get": { - "operationId": "ipam_rirs_list", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "name", + "name": "type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug", + "name": "positions", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "is_private", + "name": "description", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__in", + "name": "q", "in": "query", - "description": "Multiple values may be separated by commas.", + "description": "", "required": false, "type": "string" }, { - "name": "limit", + "name": "region_id", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "region", "in": "query", - "description": "The initial index from which to return the results.", + "description": "", "required": false, - "type": "integer" + "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": "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": { @@ -8963,7 +9430,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/RIR" + "$ref": "#/definitions/RearPort" } } } @@ -8971,11 +9438,11 @@ } }, "tags": [ - "ipam" + "dcim" ] }, "post": { - "operationId": "ipam_rirs_create", + "operationId": "dcim_rear-ports_create", "description": "", "parameters": [ { @@ -8983,7 +9450,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/RIR" + "$ref": "#/definitions/WritableRearPort" } } ], @@ -8991,35 +9458,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/RIR" + "$ref": "#/definitions/RearPort" } } }, "tags": [ - "ipam" + "dcim" ] }, "parameters": [] }, - "/ipam/rirs/{id}/": { + "/dcim/rear-ports/{id}/": { "get": { - "operationId": "ipam_rirs_read", - "description": "", + "operationId": "dcim_rear-ports_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/RIR" + "$ref": "#/definitions/RearPort" } } }, "tags": [ - "ipam" + "dcim" ] }, "put": { - "operationId": "ipam_rirs_update", + "operationId": "dcim_rear-ports_update", "description": "", "parameters": [ { @@ -9027,7 +9494,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/RIR" + "$ref": "#/definitions/WritableRearPort" } } ], @@ -9035,16 +9502,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RIR" + "$ref": "#/definitions/RearPort" } } }, "tags": [ - "ipam" + "dcim" ] }, "patch": { - "operationId": "ipam_rirs_partial_update", + "operationId": "dcim_rear-ports_partial_update", "description": "", "parameters": [ { @@ -9052,7 +9519,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/RIR" + "$ref": "#/definitions/WritableRearPort" } } ], @@ -9060,16 +9527,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RIR" + "$ref": "#/definitions/RearPort" } } }, "tags": [ - "ipam" + "dcim" ] }, "delete": { - "operationId": "ipam_rirs_delete", + "operationId": "dcim_rear-ports_delete", "description": "", "parameters": [], "responses": { @@ -9078,24 +9545,31 @@ } }, "tags": [ - "ipam" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this RIR.", + "description": "A unique integer value identifying this rear port.", "required": true, "type": "integer" } ] }, - "/ipam/roles/": { + "/dcim/regions/": { "get": { - "operationId": "ipam_roles_list", - "description": "", + "operationId": "dcim_regions_list", + "description": "Call to super to allow for caching", "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "name", "in": "query", @@ -9110,6 +9584,27 @@ "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": "limit", "in": "query", @@ -9151,7 +9646,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Role" + "$ref": "#/definitions/Region" } } } @@ -9159,11 +9654,11 @@ } }, "tags": [ - "ipam" + "dcim" ] }, "post": { - "operationId": "ipam_roles_create", + "operationId": "dcim_regions_create", "description": "", "parameters": [ { @@ -9171,7 +9666,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Role" + "$ref": "#/definitions/WritableRegion" } } ], @@ -9179,35 +9674,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/Role" + "$ref": "#/definitions/Region" } } }, "tags": [ - "ipam" + "dcim" ] }, "parameters": [] }, - "/ipam/roles/{id}/": { + "/dcim/regions/{id}/": { "get": { - "operationId": "ipam_roles_read", - "description": "", + "operationId": "dcim_regions_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Role" + "$ref": "#/definitions/Region" } } }, "tags": [ - "ipam" + "dcim" ] }, "put": { - "operationId": "ipam_roles_update", + "operationId": "dcim_regions_update", "description": "", "parameters": [ { @@ -9215,7 +9710,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Role" + "$ref": "#/definitions/WritableRegion" } } ], @@ -9223,16 +9718,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Role" + "$ref": "#/definitions/Region" } } }, "tags": [ - "ipam" + "dcim" ] }, "patch": { - "operationId": "ipam_roles_partial_update", + "operationId": "dcim_regions_partial_update", "description": "", "parameters": [ { @@ -9240,7 +9735,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Role" + "$ref": "#/definitions/WritableRegion" } } ], @@ -9248,16 +9743,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Role" + "$ref": "#/definitions/Region" } } }, "tags": [ - "ipam" + "dcim" ] }, "delete": { - "operationId": "ipam_roles_delete", + "operationId": "dcim_regions_delete", "description": "", "parameters": [], "responses": { @@ -9266,24 +9761,31 @@ } }, "tags": [ - "ipam" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this role.", + "description": "A unique integer value identifying this region.", "required": true, "type": "integer" } ] }, - "/ipam/services/": { + "/dcim/sites/": { "get": { - "operationId": "ipam_services_list", - "description": "", + "operationId": "dcim_sites_list", + "description": "Call to super to allow for caching", "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "name", "in": "query", @@ -9292,244 +9794,168 @@ "type": "string" }, { - "name": "protocol", + "name": "slug", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "port", + "name": "facility", "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { - "name": "device_id", + "name": "asn", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device", + "name": "latitude", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "virtual_machine_id", + "name": "longitude", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "virtual_machine", + "name": "contact_name", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "limit", + "name": "contact_phone", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "contact_email", "in": "query", - "description": "The initial index from which to return the results.", + "description": "", "required": false, - "type": "integer" - } - ], - "responses": { - "200": { + "type": "string" + }, + { + "name": "tenant_group_id", + "in": "query", "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/Service" - } - } - } - } - } - }, - "tags": [ - "ipam" - ] - }, - "post": { - "operationId": "ipam_services_create", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableService" - } - } - ], - "responses": { - "201": { + "name": "tenant_group", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/WritableService" - } - } - }, - "tags": [ - "ipam" - ] - }, - "parameters": [] - }, - "/ipam/services/{id}/": { - "get": { - "operationId": "ipam_services_read", - "description": "", - "parameters": [], - "responses": { - "200": { + "required": false, + "type": "string" + }, + { + "name": "tenant_id", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/Service" - } - } - }, - "tags": [ - "ipam" - ] - }, - "put": { - "operationId": "ipam_services_update", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableService" - } - } - ], - "responses": { - "200": { + "name": "tenant", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/WritableService" - } - } - }, - "tags": [ - "ipam" - ] - }, - "patch": { - "operationId": "ipam_services_partial_update", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableService" - } - } - ], - "responses": { - "200": { + "name": "created", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/WritableService" - } - } - }, - "tags": [ - "ipam" - ] - }, - "delete": { - "operationId": "ipam_services_delete", - "description": "", - "parameters": [], - "responses": { - "204": { - "description": "" - } - }, - "tags": [ - "ipam" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this service.", - "required": true, - "type": "integer" - } - ] - }, - "/ipam/vlan-groups/": { - "get": { - "operationId": "ipam_vlan-groups_list", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "name", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "last_updated__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__in", + "in": "query", + "description": "Multiple values may be separated by commas.", + "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": "tag", "in": "query", "description": "", "required": false, @@ -9576,7 +10002,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/VLANGroup" + "$ref": "#/definitions/Site" } } } @@ -9584,11 +10010,11 @@ } }, "tags": [ - "ipam" + "dcim" ] }, "post": { - "operationId": "ipam_vlan-groups_create", + "operationId": "dcim_sites_create", "description": "", "parameters": [ { @@ -9596,7 +10022,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVLANGroup" + "$ref": "#/definitions/WritableSite" } } ], @@ -9604,35 +10030,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableVLANGroup" + "$ref": "#/definitions/Site" } } }, "tags": [ - "ipam" + "dcim" ] }, "parameters": [] }, - "/ipam/vlan-groups/{id}/": { + "/dcim/sites/{id}/": { "get": { - "operationId": "ipam_vlan-groups_read", - "description": "", + "operationId": "dcim_sites_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/VLANGroup" + "$ref": "#/definitions/Site" } } }, "tags": [ - "ipam" + "dcim" ] }, "put": { - "operationId": "ipam_vlan-groups_update", + "operationId": "dcim_sites_update", "description": "", "parameters": [ { @@ -9640,7 +10066,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVLANGroup" + "$ref": "#/definitions/WritableSite" } } ], @@ -9648,16 +10074,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableVLANGroup" + "$ref": "#/definitions/Site" } } }, "tags": [ - "ipam" + "dcim" ] }, "patch": { - "operationId": "ipam_vlan-groups_partial_update", + "operationId": "dcim_sites_partial_update", "description": "", "parameters": [ { @@ -9665,7 +10091,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVLANGroup" + "$ref": "#/definitions/WritableSite" } } ], @@ -9673,16 +10099,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableVLANGroup" + "$ref": "#/definitions/Site" } } }, "tags": [ - "ipam" + "dcim" ] }, "delete": { - "operationId": "ipam_vlan-groups_delete", + "operationId": "dcim_sites_delete", "description": "", "parameters": [], "responses": { @@ -9691,75 +10117,95 @@ } }, "tags": [ - "ipam" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this VLAN group.", + "description": "A unique integer value identifying this site.", "required": true, "type": "integer" } ] }, - "/ipam/vlans/": { + "/dcim/sites/{id}/graphs/": { "get": { - "operationId": "ipam_vlans_list", - "description": "", + "operationId": "dcim_sites_graphs", + "description": "A convenience method for rendering graphs for a particular site.", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Site" + } + } + }, + "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": "Call to super to allow for caching", "parameters": [ { - "name": "vid", + "name": "id", "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { - "name": "name", + "name": "domain", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__in", + "name": "q", "in": "query", - "description": "Multiple values may be separated by commas.", + "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "group", + "name": "site", "in": "query", "description": "", "required": false, @@ -9780,21 +10226,7 @@ "type": "string" }, { - "name": "role_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "role", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "status", + "name": "tag", "in": "query", "description": "", "required": false, @@ -9841,7 +10273,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/VLAN" + "$ref": "#/definitions/VirtualChassis" } } } @@ -9849,11 +10281,11 @@ } }, "tags": [ - "ipam" + "dcim" ] }, "post": { - "operationId": "ipam_vlans_create", + "operationId": "dcim_virtual-chassis_create", "description": "", "parameters": [ { @@ -9861,7 +10293,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVLAN" + "$ref": "#/definitions/WritableVirtualChassis" } } ], @@ -9869,35 +10301,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableVLAN" + "$ref": "#/definitions/VirtualChassis" } } }, "tags": [ - "ipam" + "dcim" ] }, "parameters": [] }, - "/ipam/vlans/{id}/": { + "/dcim/virtual-chassis/{id}/": { "get": { - "operationId": "ipam_vlans_read", - "description": "", + "operationId": "dcim_virtual-chassis_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/VLAN" + "$ref": "#/definitions/VirtualChassis" } } }, "tags": [ - "ipam" + "dcim" ] }, "put": { - "operationId": "ipam_vlans_update", + "operationId": "dcim_virtual-chassis_update", "description": "", "parameters": [ { @@ -9905,7 +10337,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVLAN" + "$ref": "#/definitions/WritableVirtualChassis" } } ], @@ -9913,16 +10345,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableVLAN" + "$ref": "#/definitions/VirtualChassis" } } }, "tags": [ - "ipam" + "dcim" ] }, "patch": { - "operationId": "ipam_vlans_partial_update", + "operationId": "dcim_virtual-chassis_partial_update", "description": "", "parameters": [ { @@ -9930,7 +10362,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVLAN" + "$ref": "#/definitions/WritableVirtualChassis" } } ], @@ -9938,16 +10370,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableVLAN" + "$ref": "#/definitions/VirtualChassis" } } }, "tags": [ - "ipam" + "dcim" ] }, "delete": { - "operationId": "ipam_vlans_delete", + "operationId": "dcim_virtual-chassis_delete", "description": "", "parameters": [], "responses": { @@ -9956,23 +10388,101 @@ } }, "tags": [ - "ipam" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this VLAN.", + "description": "A unique integer value identifying this virtual chassis.", "required": true, "type": "integer" } ] }, - "/ipam/vrfs/": { + "/extras/_choices/": { "get": { - "operationId": "ipam_vrfs_list", + "operationId": "extras__choices_list", + "description": "", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "extras" + ] + }, + "parameters": [] + }, + "/extras/_choices/{id}/": { + "get": { + "operationId": "extras__choices_read", + "description": "", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "extras" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ] + }, + "/extras/_custom_field_choices/": { + "get": { + "operationId": "extras__custom_field_choices_list", + "description": "", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "extras" + ] + }, + "parameters": [] + }, + "/extras/_custom_field_choices/{id}/": { + "get": { + "operationId": "extras__custom_field_choices_read", "description": "", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "extras" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ] + }, + "/extras/config-contexts/": { + "get": { + "operationId": "extras_config-contexts_list", + "description": "Call to super to allow for caching", "parameters": [ { "name": "name", @@ -9982,28 +10492,84 @@ "type": "string" }, { - "name": "rd", + "name": "is_active", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "enforce_unique", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__in", + "name": "region_id", "in": "query", - "description": "Multiple values may be separated by commas.", + "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "region", + "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": "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": "tenant_group_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant_group", "in": "query", "description": "", "required": false, @@ -10023,6 +10589,13 @@ "required": false, "type": "string" }, + { + "name": "tag", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -10064,7 +10637,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/VRF" + "$ref": "#/definitions/ConfigContext" } } } @@ -10072,11 +10645,11 @@ } }, "tags": [ - "ipam" + "extras" ] }, "post": { - "operationId": "ipam_vrfs_create", + "operationId": "extras_config-contexts_create", "description": "", "parameters": [ { @@ -10084,7 +10657,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVRF" + "$ref": "#/definitions/WritableConfigContext" } } ], @@ -10092,35 +10665,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableVRF" + "$ref": "#/definitions/ConfigContext" } } }, "tags": [ - "ipam" + "extras" ] }, "parameters": [] }, - "/ipam/vrfs/{id}/": { + "/extras/config-contexts/{id}/": { "get": { - "operationId": "ipam_vrfs_read", - "description": "", + "operationId": "extras_config-contexts_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/VRF" + "$ref": "#/definitions/ConfigContext" } } }, "tags": [ - "ipam" + "extras" ] }, "put": { - "operationId": "ipam_vrfs_update", + "operationId": "extras_config-contexts_update", "description": "", "parameters": [ { @@ -10128,7 +10701,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVRF" + "$ref": "#/definitions/WritableConfigContext" } } ], @@ -10136,16 +10709,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableVRF" + "$ref": "#/definitions/ConfigContext" } } }, "tags": [ - "ipam" + "extras" ] }, "patch": { - "operationId": "ipam_vrfs_partial_update", + "operationId": "extras_config-contexts_partial_update", "description": "", "parameters": [ { @@ -10153,7 +10726,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVRF" + "$ref": "#/definitions/WritableConfigContext" } } ], @@ -10161,16 +10734,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableVRF" + "$ref": "#/definitions/ConfigContext" } } }, "tags": [ - "ipam" + "extras" ] }, "delete": { - "operationId": "ipam_vrfs_delete", + "operationId": "extras_config-contexts_delete", "description": "", "parameters": [], "responses": { @@ -10179,95 +10752,31 @@ } }, "tags": [ - "ipam" + "extras" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this VRF.", + "description": "A unique integer value identifying this config context.", "required": true, "type": "integer" } ] }, - "/secrets/_choices/": { + "/extras/export-templates/": { "get": { - "operationId": "secrets__choices_list", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "secrets" - ] - }, - "parameters": [] - }, - "/secrets/_choices/{id}/": { - "get": { - "operationId": "secrets__choices_read", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "secrets" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ] - }, - "/secrets/generate-rsa-key-pair/": { - "get": { - "operationId": "secrets_generate-rsa-key-pair_list", - "description": "This endpoint can be used to generate a new RSA key pair. The keys are returned in PEM format.\n\n {\n \"public_key\": \"<public key>\",\n \"private_key\": \"<private key>\"\n }", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "secrets" - ] - }, - "parameters": [] - }, - "/secrets/get-session-key/": { - "post": { - "operationId": "secrets_get-session-key_create", - "description": "Retrieve a temporary session key to use for encrypting and decrypting secrets via the API. The user's private RSA\nkey is POSTed with the name `private_key`. An example:\n\n curl -v -X POST -H \"Authorization: Token <token>\" -H \"Accept: application/json; indent=4\" \\\n --data-urlencode \"private_key@<filename>\" https://netbox/api/secrets/get-session-key/\n\nThis request will yield a base64-encoded session key to be included in an `X-Session-Key` header in future requests:\n\n {\n \"session_key\": \"+8t4SI6XikgVmB5+/urhozx9O5qCQANyOk1MNe6taRf=\"\n }\n\nThis endpoint accepts one optional parameter: `preserve_key`. If True and a session key exists, the existing session\nkey will be returned instead of a new one.", - "parameters": [], - "responses": { - "201": { - "description": "" - } - }, - "tags": [ - "secrets" - ] - }, - "parameters": [] - }, - "/secrets/secret-roles/": { - "get": { - "operationId": "secrets_secret-roles_list", - "description": "", + "operationId": "extras_export-templates_list", + "description": "Call to super to allow for caching", "parameters": [ + { + "name": "content_type", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "name", "in": "query", @@ -10276,7 +10785,7 @@ "type": "string" }, { - "name": "slug", + "name": "template_language", "in": "query", "description": "", "required": false, @@ -10323,7 +10832,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/SecretRole" + "$ref": "#/definitions/ExportTemplate" } } } @@ -10331,11 +10840,11 @@ } }, "tags": [ - "secrets" + "extras" ] }, "post": { - "operationId": "secrets_secret-roles_create", + "operationId": "extras_export-templates_create", "description": "", "parameters": [ { @@ -10343,7 +10852,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/SecretRole" + "$ref": "#/definitions/WritableExportTemplate" } } ], @@ -10351,35 +10860,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/SecretRole" + "$ref": "#/definitions/ExportTemplate" } } }, "tags": [ - "secrets" + "extras" ] }, "parameters": [] }, - "/secrets/secret-roles/{id}/": { + "/extras/export-templates/{id}/": { "get": { - "operationId": "secrets_secret-roles_read", - "description": "", + "operationId": "extras_export-templates_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/SecretRole" + "$ref": "#/definitions/ExportTemplate" } } }, "tags": [ - "secrets" + "extras" ] }, "put": { - "operationId": "secrets_secret-roles_update", + "operationId": "extras_export-templates_update", "description": "", "parameters": [ { @@ -10387,7 +10896,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/SecretRole" + "$ref": "#/definitions/WritableExportTemplate" } } ], @@ -10395,16 +10904,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/SecretRole" + "$ref": "#/definitions/ExportTemplate" } } }, "tags": [ - "secrets" + "extras" ] }, "patch": { - "operationId": "secrets_secret-roles_partial_update", + "operationId": "extras_export-templates_partial_update", "description": "", "parameters": [ { @@ -10412,7 +10921,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/SecretRole" + "$ref": "#/definitions/WritableExportTemplate" } } ], @@ -10420,16 +10929,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/SecretRole" + "$ref": "#/definitions/ExportTemplate" } } }, "tags": [ - "secrets" + "extras" ] }, "delete": { - "operationId": "secrets_secret-roles_delete", + "operationId": "extras_export-templates_delete", "description": "", "parameters": [], "responses": { @@ -10438,68 +10947,40 @@ } }, "tags": [ - "secrets" + "extras" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this secret role.", + "description": "A unique integer value identifying this export template.", "required": true, "type": "integer" } ] }, - "/secrets/secrets/": { + "/extras/graphs/": { "get": { - "operationId": "secrets_secrets_list", - "description": "", + "operationId": "extras_graphs_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "name", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "id__in", - "in": "query", - "description": "Multiple values may be separated by commas.", - "required": false, - "type": "string" - }, - { - "name": "q", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "role_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "role", + "name": "type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device_id", + "name": "name", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device", + "name": "template_language", "in": "query", "description": "", "required": false, @@ -10546,7 +11027,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Secret" + "$ref": "#/definitions/Graph" } } } @@ -10554,11 +11035,11 @@ } }, "tags": [ - "secrets" + "extras" ] }, "post": { - "operationId": "secrets_secrets_create", + "operationId": "extras_graphs_create", "description": "", "parameters": [ { @@ -10566,7 +11047,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableSecret" + "$ref": "#/definitions/Graph" } } ], @@ -10574,35 +11055,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableSecret" + "$ref": "#/definitions/Graph" } } }, "tags": [ - "secrets" + "extras" ] }, "parameters": [] }, - "/secrets/secrets/{id}/": { + "/extras/graphs/{id}/": { "get": { - "operationId": "secrets_secrets_read", - "description": "", + "operationId": "extras_graphs_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Secret" + "$ref": "#/definitions/Graph" } } }, "tags": [ - "secrets" + "extras" ] }, "put": { - "operationId": "secrets_secrets_update", + "operationId": "extras_graphs_update", "description": "", "parameters": [ { @@ -10610,7 +11091,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableSecret" + "$ref": "#/definitions/Graph" } } ], @@ -10618,16 +11099,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableSecret" + "$ref": "#/definitions/Graph" } } }, "tags": [ - "secrets" + "extras" ] }, "patch": { - "operationId": "secrets_secrets_partial_update", + "operationId": "extras_graphs_partial_update", "description": "", "parameters": [ { @@ -10635,7 +11116,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableSecret" + "$ref": "#/definitions/Graph" } } ], @@ -10643,16 +11124,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableSecret" + "$ref": "#/definitions/Graph" } } }, "tags": [ - "secrets" + "extras" ] }, "delete": { - "operationId": "secrets_secrets_delete", + "operationId": "extras_graphs_delete", "description": "", "parameters": [], "responses": { @@ -10661,77 +11142,24 @@ } }, "tags": [ - "secrets" + "extras" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this secret.", + "description": "A unique integer value identifying this graph.", "required": true, "type": "integer" } ] }, - "/tenancy/_choices/": { - "get": { - "operationId": "tenancy__choices_list", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "tenancy" - ] - }, - "parameters": [] - }, - "/tenancy/_choices/{id}/": { - "get": { - "operationId": "tenancy__choices_read", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "tenancy" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ] - }, - "/tenancy/tenant-groups/": { + "/extras/image-attachments/": { "get": { - "operationId": "tenancy_tenant-groups_list", - "description": "", + "operationId": "extras_image-attachments_list", + "description": "Call to super to allow for caching", "parameters": [ - { - "name": "name", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "slug", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "limit", "in": "query", @@ -10773,7 +11201,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/TenantGroup" + "$ref": "#/definitions/ImageAttachment" } } } @@ -10781,11 +11209,11 @@ } }, "tags": [ - "tenancy" + "extras" ] }, "post": { - "operationId": "tenancy_tenant-groups_create", + "operationId": "extras_image-attachments_create", "description": "", "parameters": [ { @@ -10793,7 +11221,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/TenantGroup" + "$ref": "#/definitions/ImageAttachment" } } ], @@ -10801,35 +11229,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/TenantGroup" + "$ref": "#/definitions/ImageAttachment" } } }, "tags": [ - "tenancy" + "extras" ] }, "parameters": [] }, - "/tenancy/tenant-groups/{id}/": { + "/extras/image-attachments/{id}/": { "get": { - "operationId": "tenancy_tenant-groups_read", - "description": "", + "operationId": "extras_image-attachments_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/TenantGroup" + "$ref": "#/definitions/ImageAttachment" } } }, "tags": [ - "tenancy" + "extras" ] }, "put": { - "operationId": "tenancy_tenant-groups_update", + "operationId": "extras_image-attachments_update", "description": "", "parameters": [ { @@ -10837,7 +11265,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/TenantGroup" + "$ref": "#/definitions/ImageAttachment" } } ], @@ -10845,16 +11273,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/TenantGroup" + "$ref": "#/definitions/ImageAttachment" } } }, "tags": [ - "tenancy" + "extras" ] }, "patch": { - "operationId": "tenancy_tenant-groups_partial_update", + "operationId": "extras_image-attachments_partial_update", "description": "", "parameters": [ { @@ -10862,7 +11290,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/TenantGroup" + "$ref": "#/definitions/ImageAttachment" } } ], @@ -10870,16 +11298,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/TenantGroup" + "$ref": "#/definitions/ImageAttachment" } } }, "tags": [ - "tenancy" + "extras" ] }, "delete": { - "operationId": "tenancy_tenant-groups_delete", + "operationId": "extras_image-attachments_delete", "description": "", "parameters": [], "responses": { @@ -10888,54 +11316,82 @@ } }, "tags": [ - "tenancy" + "extras" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this tenant group.", + "description": "A unique integer value identifying this image attachment.", "required": true, "type": "integer" } ] }, - "/tenancy/tenants/": { + "/extras/object-changes/": { "get": { - "operationId": "tenancy_tenants_list", - "description": "", + "operationId": "extras_object-changes_list", + "description": "Retrieve a list of recent changes.", "parameters": [ { - "name": "name", + "name": "user", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__in", + "name": "user_name", "in": "query", - "description": "Multiple values may be separated by commas.", + "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "request_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_id", + "name": "action", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group", + "name": "changed_object_type", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "changed_object_id", + "in": "query", + "description": "", + "required": false, + "type": "number" + }, + { + "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, @@ -10982,7 +11438,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Tenant" + "$ref": "#/definitions/ObjectChange" } } } @@ -10990,129 +11446,103 @@ } }, "tags": [ - "tenancy" - ] - }, - "post": { - "operationId": "tenancy_tenants_create", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableTenant" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/WritableTenant" - } - } - }, - "tags": [ - "tenancy" + "extras" ] }, "parameters": [] }, - "/tenancy/tenants/{id}/": { + "/extras/object-changes/{id}/": { "get": { - "operationId": "tenancy_tenants_read", - "description": "", + "operationId": "extras_object-changes_read", + "description": "Retrieve a list of recent changes.", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Tenant" + "$ref": "#/definitions/ObjectChange" } } }, "tags": [ - "tenancy" + "extras" ] }, - "put": { - "operationId": "tenancy_tenants_update", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableTenant" - } - } - ], + "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": "", - "schema": { - "$ref": "#/definitions/WritableTenant" - } + "description": "" } }, "tags": [ - "tenancy" + "extras" ] }, - "patch": { - "operationId": "tenancy_tenants_partial_update", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableTenant" - } - } - ], + "parameters": [] + }, + "/extras/reports/{id}/": { + "get": { + "operationId": "extras_reports_read", + "description": "Retrieve a single Report identified as \"<module>.<report>\".", + "parameters": [], "responses": { "200": { - "description": "", - "schema": { - "$ref": "#/definitions/WritableTenant" - } + "description": "" } }, "tags": [ - "tenancy" + "extras" ] }, - "delete": { - "operationId": "tenancy_tenants_delete", - "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ] + }, + "/extras/reports/{id}/run/": { + "post": { + "operationId": "extras_reports_run", + "description": "Run a Report and create a new ReportResult, overwriting any previous result for the Report.", "parameters": [], "responses": { - "204": { + "201": { "description": "" } }, "tags": [ - "tenancy" + "extras" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this tenant.", "required": true, - "type": "integer" + "type": "string" } ] }, - "/virtualization/_choices/": { + "/extras/scripts/": { "get": { - "operationId": "virtualization__choices_list", + "operationId": "extras_scripts_list", "description": "", "parameters": [], "responses": { @@ -11121,14 +11551,14 @@ } }, "tags": [ - "virtualization" + "extras" ] }, "parameters": [] }, - "/virtualization/_choices/{id}/": { + "/extras/scripts/{id}/": { "get": { - "operationId": "virtualization__choices_read", + "operationId": "extras_scripts_read", "description": "", "parameters": [], "responses": { @@ -11137,7 +11567,7 @@ } }, "tags": [ - "virtualization" + "extras" ] }, "parameters": [ @@ -11149,10 +11579,10 @@ } ] }, - "/virtualization/cluster-groups/": { + "/extras/tags/": { "get": { - "operationId": "virtualization_cluster-groups_list", - "description": "", + "operationId": "extras_tags_list", + "description": "Call to super to allow for caching", "parameters": [ { "name": "name", @@ -11168,6 +11598,13 @@ "required": false, "type": "string" }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -11209,7 +11646,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/ClusterGroup" + "$ref": "#/definitions/Tag" } } } @@ -11217,11 +11654,11 @@ } }, "tags": [ - "virtualization" + "extras" ] }, "post": { - "operationId": "virtualization_cluster-groups_create", + "operationId": "extras_tags_create", "description": "", "parameters": [ { @@ -11229,7 +11666,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ClusterGroup" + "$ref": "#/definitions/Tag" } } ], @@ -11237,35 +11674,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/ClusterGroup" + "$ref": "#/definitions/Tag" } } }, "tags": [ - "virtualization" + "extras" ] }, "parameters": [] }, - "/virtualization/cluster-groups/{id}/": { + "/extras/tags/{id}/": { "get": { - "operationId": "virtualization_cluster-groups_read", - "description": "", + "operationId": "extras_tags_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/ClusterGroup" + "$ref": "#/definitions/Tag" } } }, "tags": [ - "virtualization" + "extras" ] }, "put": { - "operationId": "virtualization_cluster-groups_update", + "operationId": "extras_tags_update", "description": "", "parameters": [ { @@ -11273,7 +11710,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ClusterGroup" + "$ref": "#/definitions/Tag" } } ], @@ -11281,16 +11718,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ClusterGroup" + "$ref": "#/definitions/Tag" } } }, "tags": [ - "virtualization" + "extras" ] }, "patch": { - "operationId": "virtualization_cluster-groups_partial_update", + "operationId": "extras_tags_partial_update", "description": "", "parameters": [ { @@ -11298,7 +11735,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ClusterGroup" + "$ref": "#/definitions/Tag" } } ], @@ -11306,16 +11743,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ClusterGroup" + "$ref": "#/definitions/Tag" } } }, "tags": [ - "virtualization" + "extras" ] }, "delete": { - "operationId": "virtualization_cluster-groups_delete", + "operationId": "extras_tags_delete", "description": "", "parameters": [], "responses": { @@ -11324,270 +11761,156 @@ } }, "tags": [ - "virtualization" + "extras" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this cluster group.", + "description": "A unique integer value identifying this tag.", "required": true, "type": "integer" } ] }, - "/virtualization/cluster-types/": { + "/ipam/_choices/": { "get": { - "operationId": "virtualization_cluster-types_list", + "operationId": "ipam__choices_list", "description": "", - "parameters": [ - { - "name": "name", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "slug", - "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" - } - ], + "parameters": [], "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/ClusterType" - } - } - } - } - } - }, - "tags": [ - "virtualization" - ] - }, - "post": { - "operationId": "virtualization_cluster-types_create", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ClusterType" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/ClusterType" - } + "description": "" } }, "tags": [ - "virtualization" + "ipam" ] }, "parameters": [] }, - "/virtualization/cluster-types/{id}/": { + "/ipam/_choices/{id}/": { "get": { - "operationId": "virtualization_cluster-types_read", + "operationId": "ipam__choices_read", "description": "", "parameters": [], "responses": { "200": { - "description": "", - "schema": { - "$ref": "#/definitions/ClusterType" - } - } - }, - "tags": [ - "virtualization" - ] - }, - "put": { - "operationId": "virtualization_cluster-types_update", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ClusterType" - } - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/ClusterType" - } - } - }, - "tags": [ - "virtualization" - ] - }, - "patch": { - "operationId": "virtualization_cluster-types_partial_update", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ClusterType" - } - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/ClusterType" - } - } - }, - "tags": [ - "virtualization" - ] - }, - "delete": { - "operationId": "virtualization_cluster-types_delete", - "description": "", - "parameters": [], - "responses": { - "204": { "description": "" } }, "tags": [ - "virtualization" + "ipam" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this cluster type.", "required": true, - "type": "integer" + "type": "string" } ] }, - "/virtualization/clusters/": { + "/ipam/aggregates/": { "get": { - "operationId": "virtualization_clusters_list", - "description": "", + "operationId": "ipam_aggregates_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "name", + "name": "family", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__in", + "name": "date_added", "in": "query", - "description": "Multiple values may be separated by commas.", + "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_id", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "type_id", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "type", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "id__in", + "in": "query", + "description": "Multiple values may be separated by commas.", + "required": false, + "type": "string" + }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "prefix", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rir_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rir", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag", "in": "query", "description": "", "required": false, @@ -11634,7 +11957,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Cluster" + "$ref": "#/definitions/Aggregate" } } } @@ -11642,11 +11965,11 @@ } }, "tags": [ - "virtualization" + "ipam" ] }, "post": { - "operationId": "virtualization_clusters_create", + "operationId": "ipam_aggregates_create", "description": "", "parameters": [ { @@ -11654,7 +11977,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableCluster" + "$ref": "#/definitions/WritableAggregate" } } ], @@ -11662,35 +11985,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableCluster" + "$ref": "#/definitions/Aggregate" } } }, "tags": [ - "virtualization" + "ipam" ] }, "parameters": [] }, - "/virtualization/clusters/{id}/": { + "/ipam/aggregates/{id}/": { "get": { - "operationId": "virtualization_clusters_read", - "description": "", + "operationId": "ipam_aggregates_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Cluster" + "$ref": "#/definitions/Aggregate" } } }, "tags": [ - "virtualization" + "ipam" ] }, "put": { - "operationId": "virtualization_clusters_update", + "operationId": "ipam_aggregates_update", "description": "", "parameters": [ { @@ -11698,7 +12021,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableCluster" + "$ref": "#/definitions/WritableAggregate" } } ], @@ -11706,16 +12029,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableCluster" + "$ref": "#/definitions/Aggregate" } } }, "tags": [ - "virtualization" + "ipam" ] }, "patch": { - "operationId": "virtualization_clusters_partial_update", + "operationId": "ipam_aggregates_partial_update", "description": "", "parameters": [ { @@ -11723,7 +12046,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableCluster" + "$ref": "#/definitions/WritableAggregate" } } ], @@ -11731,16 +12054,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableCluster" + "$ref": "#/definitions/Aggregate" } } }, "tags": [ - "virtualization" + "ipam" ] }, "delete": { - "operationId": "virtualization_clusters_delete", + "operationId": "ipam_aggregates_delete", "description": "", "parameters": [], "responses": { @@ -11749,249 +12072,103 @@ } }, "tags": [ - "virtualization" + "ipam" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this cluster.", + "description": "A unique integer value identifying this aggregate.", "required": true, "type": "integer" } ] }, - "/virtualization/interfaces/": { + "/ipam/ip-addresses/": { "get": { - "operationId": "virtualization_interfaces_list", - "description": "", + "operationId": "ipam_ip-addresses_list", + "description": "Call to super to allow for caching", "parameters": [ { - "name": "name", + "name": "family", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "enabled", + "name": "dns_name", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "mtu", + "name": "tenant_group_id", "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { - "name": "virtual_machine_id", + "name": "tenant_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "virtual_machine", + "name": "tenant_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "mac_address", + "name": "tenant", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "limit", + "name": "created", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "created__gte", "in": "query", - "description": "The initial index from which to return the results.", + "description": "", "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": [ - "virtualization" - ] - }, - "post": { - "operationId": "virtualization_interfaces_create", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableInterface" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/WritableInterface" - } - } - }, - "tags": [ - "virtualization" - ] - }, - "parameters": [] - }, - "/virtualization/interfaces/{id}/": { - "get": { - "operationId": "virtualization_interfaces_read", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Interface" - } - } - }, - "tags": [ - "virtualization" - ] - }, - "put": { - "operationId": "virtualization_interfaces_update", - "description": "", - "parameters": [ + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableInterface" - } - } - ], - "responses": { - "200": { + "name": "created__lte", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/WritableInterface" - } - } - }, - "tags": [ - "virtualization" - ] - }, - "patch": { - "operationId": "virtualization_interfaces_partial_update", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableInterface" - } - } - ], - "responses": { - "200": { + "name": "last_updated", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/WritableInterface" - } - } - }, - "tags": [ - "virtualization" - ] - }, - "delete": { - "operationId": "virtualization_interfaces_delete", - "description": "", - "parameters": [], - "responses": { - "204": { - "description": "" - } - }, - "tags": [ - "virtualization" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this interface.", - "required": true, - "type": "integer" - } - ] - }, - "/virtualization/virtual-machines/": { - "get": { - "operationId": "virtualization_virtual-machines_list", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "name", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "cluster", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, @@ -12012,98 +12189,105 @@ "type": "string" }, { - "name": "status", + "name": "parent", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "cluster_group_id", + "name": "address", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "cluster_group", + "name": "mask_length", "in": "query", "description": "", "required": false, - "type": "string" + "type": "number" }, { - "name": "cluster_type_id", + "name": "vrf_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "cluster_type", + "name": "vrf", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "cluster_id", + "name": "device", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "device_id", + "in": "query", + "description": "", + "required": false, + "type": "number" + }, + { + "name": "virtual_machine_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "virtual_machine", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "role_id", + "name": "interface", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "role", + "name": "interface_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_id", + "name": "assigned_to_interface", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant", + "name": "status", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "platform_id", + "name": "role", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "platform", + "name": "tag", "in": "query", "description": "", "required": false, @@ -12150,7 +12334,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/VirtualMachine" + "$ref": "#/definitions/IPAddress" } } } @@ -12158,11 +12342,11 @@ } }, "tags": [ - "virtualization" + "ipam" ] }, "post": { - "operationId": "virtualization_virtual-machines_create", + "operationId": "ipam_ip-addresses_create", "description": "", "parameters": [ { @@ -12170,7 +12354,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVirtualMachine" + "$ref": "#/definitions/WritableIPAddress" } } ], @@ -12178,35 +12362,35 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/WritableVirtualMachine" + "$ref": "#/definitions/IPAddress" } } }, "tags": [ - "virtualization" + "ipam" ] }, "parameters": [] }, - "/virtualization/virtual-machines/{id}/": { + "/ipam/ip-addresses/{id}/": { "get": { - "operationId": "virtualization_virtual-machines_read", - "description": "", + "operationId": "ipam_ip-addresses_read", + "description": "Call to super to allow for caching", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/VirtualMachine" + "$ref": "#/definitions/IPAddress" } } }, "tags": [ - "virtualization" + "ipam" ] }, "put": { - "operationId": "virtualization_virtual-machines_update", + "operationId": "ipam_ip-addresses_update", "description": "", "parameters": [ { @@ -12214,7 +12398,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVirtualMachine" + "$ref": "#/definitions/WritableIPAddress" } } ], @@ -12222,16 +12406,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableVirtualMachine" + "$ref": "#/definitions/IPAddress" } } }, "tags": [ - "virtualization" + "ipam" ] }, "patch": { - "operationId": "virtualization_virtual-machines_partial_update", + "operationId": "ipam_ip-addresses_partial_update", "description": "", "parameters": [ { @@ -12239,7 +12423,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVirtualMachine" + "$ref": "#/definitions/WritableIPAddress" } } ], @@ -12247,16 +12431,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/WritableVirtualMachine" + "$ref": "#/definitions/IPAddress" } } }, "tags": [ - "virtualization" + "ipam" ] }, "delete": { - "operationId": "virtualization_virtual-machines_delete", + "operationId": "ipam_ip-addresses_delete", "description": "", "parameters": [], "responses": { @@ -12265,45 +12449,4547 @@ } }, "tags": [ - "virtualization" + "ipam" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this virtual machine.", + "description": "A unique integer value identifying this IP address.", "required": true, "type": "integer" } ] - } - }, - "definitions": { - "NestedCircuit": { - "title": "Circuit", - "required": [ - "cid" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true - }, - "cid": { - "title": "Circuit ID", - "type": "string", - "maxLength": 50 - } - } + }, + "/ipam/prefixes/": { + "get": { + "operationId": "ipam_prefixes_list", + "description": "Call to super to allow for caching", + "parameters": [ + { + "name": "family", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "is_pool", + "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": "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": "id__in", + "in": "query", + "description": "Multiple values may be separated by commas.", + "required": false, + "type": "string" + }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "prefix", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "within", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "within_include", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contains", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "mask_length", + "in": "query", + "description": "", + "required": false, + "type": "number" + }, + { + "name": "vrf_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "vrf", + "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_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "vlan_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "vlan_vid", + "in": "query", + "description": "", + "required": false, + "type": "number" + }, + { + "name": "role_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "role", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "status", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag", + "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/Prefix" + } + } + } + } + } + }, + "tags": [ + "ipam" + ] + }, + "post": { + "operationId": "ipam_prefixes_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritablePrefix" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/Prefix" + } + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [] + }, + "/ipam/prefixes/{id}/": { + "get": { + "operationId": "ipam_prefixes_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Prefix" + } + } + }, + "tags": [ + "ipam" + ] + }, + "put": { + "operationId": "ipam_prefixes_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritablePrefix" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Prefix" + } + } + }, + "tags": [ + "ipam" + ] + }, + "patch": { + "operationId": "ipam_prefixes_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritablePrefix" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Prefix" + } + } + }, + "tags": [ + "ipam" + ] + }, + "delete": { + "operationId": "ipam_prefixes_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this prefix.", + "required": true, + "type": "integer" + } + ] + }, + "/ipam/prefixes/{id}/available-ips/": { + "get": { + "operationId": "ipam_prefixes_available-ips_read", + "description": "A convenience method for returning available IP addresses within a prefix. By default, the number of IPs\nreturned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be passed,\nhowever results will not be paginated.", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Prefix" + } + } + }, + "tags": [ + "ipam" + ] + }, + "post": { + "operationId": "ipam_prefixes_available-ips_create", + "description": "A convenience method for returning available IP addresses within a prefix. By default, the number of IPs\nreturned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be passed,\nhowever results will not be paginated.", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritablePrefix" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/Prefix" + } + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this prefix.", + "required": true, + "type": "integer" + } + ] + }, + "/ipam/prefixes/{id}/available-prefixes/": { + "get": { + "operationId": "ipam_prefixes_available-prefixes_read", + "description": "A convenience method for returning available child prefixes within a parent.", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Prefix" + } + } + }, + "tags": [ + "ipam" + ] + }, + "post": { + "operationId": "ipam_prefixes_available-prefixes_create", + "description": "A convenience method for returning available child prefixes within a parent.", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritablePrefix" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/Prefix" + } + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this prefix.", + "required": true, + "type": "integer" + } + ] + }, + "/ipam/rirs/": { + "get": { + "operationId": "ipam_rirs_list", + "description": "Call to super to allow for caching", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "is_private", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__in", + "in": "query", + "description": "Multiple values may be separated by commas.", + "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/RIR" + } + } + } + } + } + }, + "tags": [ + "ipam" + ] + }, + "post": { + "operationId": "ipam_rirs_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RIR" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/RIR" + } + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [] + }, + "/ipam/rirs/{id}/": { + "get": { + "operationId": "ipam_rirs_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RIR" + } + } + }, + "tags": [ + "ipam" + ] + }, + "put": { + "operationId": "ipam_rirs_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RIR" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RIR" + } + } + }, + "tags": [ + "ipam" + ] + }, + "patch": { + "operationId": "ipam_rirs_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RIR" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RIR" + } + } + }, + "tags": [ + "ipam" + ] + }, + "delete": { + "operationId": "ipam_rirs_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this RIR.", + "required": true, + "type": "integer" + } + ] + }, + "/ipam/roles/": { + "get": { + "operationId": "ipam_roles_list", + "description": "Call to super to allow for caching", + "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": "q", + "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/Role" + } + } + } + } + } + }, + "tags": [ + "ipam" + ] + }, + "post": { + "operationId": "ipam_roles_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Role" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/Role" + } + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [] + }, + "/ipam/roles/{id}/": { + "get": { + "operationId": "ipam_roles_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Role" + } + } + }, + "tags": [ + "ipam" + ] + }, + "put": { + "operationId": "ipam_roles_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Role" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Role" + } + } + }, + "tags": [ + "ipam" + ] + }, + "patch": { + "operationId": "ipam_roles_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Role" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Role" + } + } + }, + "tags": [ + "ipam" + ] + }, + "delete": { + "operationId": "ipam_roles_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this role.", + "required": true, + "type": "integer" + } + ] + }, + "/ipam/services/": { + "get": { + "operationId": "ipam_services_list", + "description": "Call to super to allow for caching", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "name", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "protocol", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "port", + "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": "device_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "device", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_machine_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_machine", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag", + "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/Service" + } + } + } + } + } + }, + "tags": [ + "ipam" + ] + }, + "post": { + "operationId": "ipam_services_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableService" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/Service" + } + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [] + }, + "/ipam/services/{id}/": { + "get": { + "operationId": "ipam_services_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Service" + } + } + }, + "tags": [ + "ipam" + ] + }, + "put": { + "operationId": "ipam_services_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableService" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Service" + } + } + }, + "tags": [ + "ipam" + ] + }, + "patch": { + "operationId": "ipam_services_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableService" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Service" + } + } + }, + "tags": [ + "ipam" + ] + }, + "delete": { + "operationId": "ipam_services_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this service.", + "required": true, + "type": "integer" + } + ] + }, + "/ipam/vlan-groups/": { + "get": { + "operationId": "ipam_vlan-groups_list", + "description": "Call to super to allow for caching", + "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": "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_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site", + "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/VLANGroup" + } + } + } + } + } + }, + "tags": [ + "ipam" + ] + }, + "post": { + "operationId": "ipam_vlan-groups_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVLANGroup" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/VLANGroup" + } + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [] + }, + "/ipam/vlan-groups/{id}/": { + "get": { + "operationId": "ipam_vlan-groups_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VLANGroup" + } + } + }, + "tags": [ + "ipam" + ] + }, + "put": { + "operationId": "ipam_vlan-groups_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVLANGroup" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VLANGroup" + } + } + }, + "tags": [ + "ipam" + ] + }, + "patch": { + "operationId": "ipam_vlan-groups_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVLANGroup" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VLANGroup" + } + } + }, + "tags": [ + "ipam" + ] + }, + "delete": { + "operationId": "ipam_vlan-groups_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this VLAN group.", + "required": true, + "type": "integer" + } + ] + }, + "/ipam/vlans/": { + "get": { + "operationId": "ipam_vlans_list", + "description": "Call to super to allow for caching", + "parameters": [ + { + "name": "vid", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "name", + "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": "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": "id__in", + "in": "query", + "description": "Multiple values may be separated by commas.", + "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_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site", + "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": "role_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "role", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "status", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag", + "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/VLAN" + } + } + } + } + } + }, + "tags": [ + "ipam" + ] + }, + "post": { + "operationId": "ipam_vlans_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVLAN" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/VLAN" + } + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [] + }, + "/ipam/vlans/{id}/": { + "get": { + "operationId": "ipam_vlans_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VLAN" + } + } + }, + "tags": [ + "ipam" + ] + }, + "put": { + "operationId": "ipam_vlans_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVLAN" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VLAN" + } + } + }, + "tags": [ + "ipam" + ] + }, + "patch": { + "operationId": "ipam_vlans_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVLAN" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VLAN" + } + } + }, + "tags": [ + "ipam" + ] + }, + "delete": { + "operationId": "ipam_vlans_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this VLAN.", + "required": true, + "type": "integer" + } + ] + }, + "/ipam/vrfs/": { + "get": { + "operationId": "ipam_vrfs_list", + "description": "Call to super to allow for caching", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rd", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "enforce_unique", + "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": "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": "id__in", + "in": "query", + "description": "Multiple values may be separated by commas.", + "required": false, + "type": "string" + }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag", + "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/VRF" + } + } + } + } + } + }, + "tags": [ + "ipam" + ] + }, + "post": { + "operationId": "ipam_vrfs_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVRF" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/VRF" + } + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [] + }, + "/ipam/vrfs/{id}/": { + "get": { + "operationId": "ipam_vrfs_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VRF" + } + } + }, + "tags": [ + "ipam" + ] + }, + "put": { + "operationId": "ipam_vrfs_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVRF" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VRF" + } + } + }, + "tags": [ + "ipam" + ] + }, + "patch": { + "operationId": "ipam_vrfs_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVRF" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VRF" + } + } + }, + "tags": [ + "ipam" + ] + }, + "delete": { + "operationId": "ipam_vrfs_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "ipam" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this VRF.", + "required": true, + "type": "integer" + } + ] + }, + "/secrets/_choices/": { + "get": { + "operationId": "secrets__choices_list", + "description": "", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "secrets" + ] + }, + "parameters": [] + }, + "/secrets/_choices/{id}/": { + "get": { + "operationId": "secrets__choices_read", + "description": "", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "secrets" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ] + }, + "/secrets/generate-rsa-key-pair/": { + "get": { + "operationId": "secrets_generate-rsa-key-pair_list", + "summary": "This endpoint can be used to generate a new RSA key pair. The keys are returned in PEM format.", + "description": "{\n \"public_key\": \"<public key>\",\n \"private_key\": \"<private key>\"\n }", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "secrets" + ] + }, + "parameters": [] + }, + "/secrets/get-session-key/": { + "post": { + "operationId": "secrets_get-session-key_create", + "description": "Retrieve a temporary session key to use for encrypting and decrypting secrets via the API. The user's private RSA\nkey is POSTed with the name `private_key`. An example:\n\n curl -v -X POST -H \"Authorization: Token <token>\" -H \"Accept: application/json; indent=4\" \\\n --data-urlencode \"private_key@<filename>\" https://netbox/api/secrets/get-session-key/\n\nThis request will yield a base64-encoded session key to be included in an `X-Session-Key` header in future requests:\n\n {\n \"session_key\": \"+8t4SI6XikgVmB5+/urhozx9O5qCQANyOk1MNe6taRf=\"\n }\n\nThis endpoint accepts one optional parameter: `preserve_key`. If True and a session key exists, the existing session\nkey will be returned instead of a new one.", + "parameters": [], + "responses": { + "201": { + "description": "" + } + }, + "tags": [ + "secrets" + ] + }, + "parameters": [] + }, + "/secrets/secret-roles/": { + "get": { + "operationId": "secrets_secret-roles_list", + "description": "Call to super to allow for caching", + "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": "q", + "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/SecretRole" + } + } + } + } + } + }, + "tags": [ + "secrets" + ] + }, + "post": { + "operationId": "secrets_secret-roles_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SecretRole" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/SecretRole" + } + } + }, + "tags": [ + "secrets" + ] + }, + "parameters": [] + }, + "/secrets/secret-roles/{id}/": { + "get": { + "operationId": "secrets_secret-roles_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/SecretRole" + } + } + }, + "tags": [ + "secrets" + ] + }, + "put": { + "operationId": "secrets_secret-roles_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SecretRole" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/SecretRole" + } + } + }, + "tags": [ + "secrets" + ] + }, + "patch": { + "operationId": "secrets_secret-roles_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SecretRole" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/SecretRole" + } + } + }, + "tags": [ + "secrets" + ] + }, + "delete": { + "operationId": "secrets_secret-roles_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "secrets" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this secret role.", + "required": true, + "type": "integer" + } + ] + }, + "/secrets/secrets/": { + "get": { + "operationId": "secrets_secrets_list", + "description": "", + "parameters": [ + { + "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": "id__in", + "in": "query", + "description": "Multiple values may be separated by commas.", + "required": false, + "type": "string" + }, + { + "name": "q", + "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": "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": "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/Secret" + } + } + } + } + } + }, + "tags": [ + "secrets" + ] + }, + "post": { + "operationId": "secrets_secrets_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableSecret" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/Secret" + } + } + }, + "tags": [ + "secrets" + ] + }, + "parameters": [] + }, + "/secrets/secrets/{id}/": { + "get": { + "operationId": "secrets_secrets_read", + "description": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Secret" + } + } + }, + "tags": [ + "secrets" + ] + }, + "put": { + "operationId": "secrets_secrets_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableSecret" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Secret" + } + } + }, + "tags": [ + "secrets" + ] + }, + "patch": { + "operationId": "secrets_secrets_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableSecret" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Secret" + } + } + }, + "tags": [ + "secrets" + ] + }, + "delete": { + "operationId": "secrets_secrets_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "secrets" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this secret.", + "required": true, + "type": "integer" + } + ] + }, + "/tenancy/_choices/": { + "get": { + "operationId": "tenancy__choices_list", + "description": "", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "tenancy" + ] + }, + "parameters": [] + }, + "/tenancy/_choices/{id}/": { + "get": { + "operationId": "tenancy__choices_read", + "description": "", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "tenancy" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ] + }, + "/tenancy/tenant-groups/": { + "get": { + "operationId": "tenancy_tenant-groups_list", + "description": "Call to super to allow for caching", + "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": "q", + "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/TenantGroup" + } + } + } + } + } + }, + "tags": [ + "tenancy" + ] + }, + "post": { + "operationId": "tenancy_tenant-groups_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TenantGroup" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/TenantGroup" + } + } + }, + "tags": [ + "tenancy" + ] + }, + "parameters": [] + }, + "/tenancy/tenant-groups/{id}/": { + "get": { + "operationId": "tenancy_tenant-groups_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/TenantGroup" + } + } + }, + "tags": [ + "tenancy" + ] + }, + "put": { + "operationId": "tenancy_tenant-groups_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TenantGroup" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/TenantGroup" + } + } + }, + "tags": [ + "tenancy" + ] + }, + "patch": { + "operationId": "tenancy_tenant-groups_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TenantGroup" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/TenantGroup" + } + } + }, + "tags": [ + "tenancy" + ] + }, + "delete": { + "operationId": "tenancy_tenant-groups_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "tenancy" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this tenant group.", + "required": true, + "type": "integer" + } + ] + }, + "/tenancy/tenants/": { + "get": { + "operationId": "tenancy_tenants_list", + "description": "Call to super to allow for caching", + "parameters": [ + { + "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": "id__in", + "in": "query", + "description": "Multiple values may be separated by commas.", + "required": false, + "type": "string" + }, + { + "name": "q", + "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": "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/Tenant" + } + } + } + } + } + }, + "tags": [ + "tenancy" + ] + }, + "post": { + "operationId": "tenancy_tenants_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableTenant" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/Tenant" + } + } + }, + "tags": [ + "tenancy" + ] + }, + "parameters": [] + }, + "/tenancy/tenants/{id}/": { + "get": { + "operationId": "tenancy_tenants_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Tenant" + } + } + }, + "tags": [ + "tenancy" + ] + }, + "put": { + "operationId": "tenancy_tenants_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableTenant" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Tenant" + } + } + }, + "tags": [ + "tenancy" + ] + }, + "patch": { + "operationId": "tenancy_tenants_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableTenant" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Tenant" + } + } + }, + "tags": [ + "tenancy" + ] + }, + "delete": { + "operationId": "tenancy_tenants_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "tenancy" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this tenant.", + "required": true, + "type": "integer" + } + ] + }, + "/virtualization/_choices/": { + "get": { + "operationId": "virtualization__choices_list", + "description": "", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "virtualization" + ] + }, + "parameters": [] + }, + "/virtualization/_choices/{id}/": { + "get": { + "operationId": "virtualization__choices_read", + "description": "", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "virtualization" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ] + }, + "/virtualization/cluster-groups/": { + "get": { + "operationId": "virtualization_cluster-groups_list", + "description": "Call to super to allow for caching", + "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": "q", + "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/ClusterGroup" + } + } + } + } + } + }, + "tags": [ + "virtualization" + ] + }, + "post": { + "operationId": "virtualization_cluster-groups_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ClusterGroup" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/ClusterGroup" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "parameters": [] + }, + "/virtualization/cluster-groups/{id}/": { + "get": { + "operationId": "virtualization_cluster-groups_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/ClusterGroup" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "put": { + "operationId": "virtualization_cluster-groups_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ClusterGroup" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/ClusterGroup" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "patch": { + "operationId": "virtualization_cluster-groups_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ClusterGroup" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/ClusterGroup" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "delete": { + "operationId": "virtualization_cluster-groups_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "virtualization" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this cluster group.", + "required": true, + "type": "integer" + } + ] + }, + "/virtualization/cluster-types/": { + "get": { + "operationId": "virtualization_cluster-types_list", + "description": "Call to super to allow for caching", + "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": "q", + "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/ClusterType" + } + } + } + } + } + }, + "tags": [ + "virtualization" + ] + }, + "post": { + "operationId": "virtualization_cluster-types_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ClusterType" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/ClusterType" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "parameters": [] + }, + "/virtualization/cluster-types/{id}/": { + "get": { + "operationId": "virtualization_cluster-types_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/ClusterType" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "put": { + "operationId": "virtualization_cluster-types_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ClusterType" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/ClusterType" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "patch": { + "operationId": "virtualization_cluster-types_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ClusterType" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/ClusterType" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "delete": { + "operationId": "virtualization_cluster-types_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "virtualization" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this cluster type.", + "required": true, + "type": "integer" + } + ] + }, + "/virtualization/clusters/": { + "get": { + "operationId": "virtualization_clusters_list", + "description": "Call to super to allow for caching", + "parameters": [ + { + "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": "id__in", + "in": "query", + "description": "Multiple values may be separated by commas.", + "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_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site", + "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": "type_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "type", + "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": "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/Cluster" + } + } + } + } + } + }, + "tags": [ + "virtualization" + ] + }, + "post": { + "operationId": "virtualization_clusters_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableCluster" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/Cluster" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "parameters": [] + }, + "/virtualization/clusters/{id}/": { + "get": { + "operationId": "virtualization_clusters_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Cluster" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "put": { + "operationId": "virtualization_clusters_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableCluster" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Cluster" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "patch": { + "operationId": "virtualization_clusters_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableCluster" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Cluster" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "delete": { + "operationId": "virtualization_clusters_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "virtualization" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this cluster.", + "required": true, + "type": "integer" + } + ] + }, + "/virtualization/interfaces/": { + "get": { + "operationId": "virtualization_interfaces_list", + "description": "Call to super to allow for caching", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "name", + "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": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_machine_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_machine", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "mac_address", + "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/VirtualMachineInterface" + } + } + } + } + } + }, + "tags": [ + "virtualization" + ] + }, + "post": { + "operationId": "virtualization_interfaces_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVirtualMachineInterface" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/VirtualMachineInterface" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "parameters": [] + }, + "/virtualization/interfaces/{id}/": { + "get": { + "operationId": "virtualization_interfaces_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VirtualMachineInterface" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "put": { + "operationId": "virtualization_interfaces_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVirtualMachineInterface" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VirtualMachineInterface" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "patch": { + "operationId": "virtualization_interfaces_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVirtualMachineInterface" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VirtualMachineInterface" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "delete": { + "operationId": "virtualization_interfaces_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "virtualization" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this interface.", + "required": true, + "type": "integer" + } + ] + }, + "/virtualization/virtual-machines/": { + "get": { + "operationId": "virtualization_virtual-machines_list", + "description": "Call to super to allow for caching", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "name", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "cluster", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "vcpus", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "memory", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "disk", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "local_context_data", + "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": "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": "id__in", + "in": "query", + "description": "Multiple values may be separated by commas.", + "required": false, + "type": "string" + }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "status", + "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_type_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "cluster_type", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "cluster_id", + "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_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site", + "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": "mac_address", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag", + "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/VirtualMachineWithConfigContext" + } + } + } + } + } + }, + "tags": [ + "virtualization" + ] + }, + "post": { + "operationId": "virtualization_virtual-machines_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVirtualMachineWithConfigContext" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/VirtualMachineWithConfigContext" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "parameters": [] + }, + "/virtualization/virtual-machines/{id}/": { + "get": { + "operationId": "virtualization_virtual-machines_read", + "description": "Call to super to allow for caching", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VirtualMachineWithConfigContext" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "put": { + "operationId": "virtualization_virtual-machines_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVirtualMachineWithConfigContext" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VirtualMachineWithConfigContext" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "patch": { + "operationId": "virtualization_virtual-machines_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVirtualMachineWithConfigContext" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VirtualMachineWithConfigContext" + } + } + }, + "tags": [ + "virtualization" + ] + }, + "delete": { + "operationId": "virtualization_virtual-machines_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "virtualization" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this virtual machine.", + "required": true, + "type": "integer" + } + ] + } + }, + "definitions": { + "NestedCircuit": { + "title": "Circuit", + "required": [ + "cid" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "cid": { + "title": "Circuit ID", + "type": "string", + "maxLength": 50, + "minLength": 1 + } + } }, "NestedSite": { "title": "Site", @@ -12316,30 +17002,1504 @@ "id": { "title": "ID", "type": "integer", - "readOnly": true + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + } + } + }, + "NestedCable": { + "title": "Cable", + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "label": { + "title": "Label", + "type": "string", + "maxLength": 100 + } + } + }, + "CircuitTermination": { + "required": [ + "circuit", + "term_side", + "site", + "port_speed" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "circuit": { + "$ref": "#/definitions/NestedCircuit" + }, + "term_side": { + "title": "Termination", + "type": "string", + "enum": [ + "A", + "Z" + ] + }, + "site": { + "$ref": "#/definitions/NestedSite" + }, + "port_speed": { + "title": "Port speed (Kbps)", + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + "upstream_speed": { + "title": "Upstream speed (Kbps)", + "description": "Upstream speed, if different from port speed", + "type": "integer", + "maximum": 2147483647, + "minimum": 0, + "x-nullable": true + }, + "xconnect_id": { + "title": "Cross-connect ID", + "type": "string", + "maxLength": 50 + }, + "pp_info": { + "title": "Patch panel/port(s)", + "type": "string", + "maxLength": 100 + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "connected_endpoint_type": { + "title": "Connected endpoint type", + "type": "string", + "readOnly": true + }, + "connected_endpoint": { + "title": "Connected endpoint", + "description": "\n Return the appropriate serializer for the type of connected object.\n ", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, + "connection_status": { + "title": "Connection status", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "boolean", + "x-nullable": true + } + }, + "readOnly": true + }, + "cable": { + "$ref": "#/definitions/NestedCable" + } + } + }, + "WritableCircuitTermination": { + "required": [ + "circuit", + "term_side", + "site", + "port_speed" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "circuit": { + "title": "Circuit", + "type": "integer" + }, + "term_side": { + "title": "Termination", + "type": "string", + "enum": [ + "A", + "Z" + ] + }, + "site": { + "title": "Site", + "type": "integer" + }, + "port_speed": { + "title": "Port speed (Kbps)", + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + "upstream_speed": { + "title": "Upstream speed (Kbps)", + "description": "Upstream speed, if different from port speed", + "type": "integer", + "maximum": 2147483647, + "minimum": 0, + "x-nullable": true + }, + "xconnect_id": { + "title": "Cross-connect ID", + "type": "string", + "maxLength": 50 + }, + "pp_info": { + "title": "Patch panel/port(s)", + "type": "string", + "maxLength": 100 + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "connected_endpoint_type": { + "title": "Connected endpoint type", + "type": "string", + "readOnly": true + }, + "connected_endpoint": { + "title": "Connected endpoint", + "description": "\n Return the appropriate serializer for the type of connected object.\n ", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, + "connection_status": { + "title": "Connection status", + "type": "boolean", + "enum": [ + false, + true + ] + }, + "cable": { + "$ref": "#/definitions/NestedCable" + } + } + }, + "CircuitType": { + "required": [ + "name", + "slug" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "circuit_count": { + "title": "Circuit count", + "type": "integer", + "readOnly": true + } + } + }, + "NestedProvider": { + "title": "Provider", + "required": [ + "name", + "slug" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "circuit_count": { + "title": "Circuit count", + "type": "integer", + "readOnly": true + } + } + }, + "NestedCircuitType": { + "title": "Type", + "required": [ + "name", + "slug" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "circuit_count": { + "title": "Circuit count", + "type": "integer", + "readOnly": true + } + } + }, + "NestedTenant": { + "title": "Tenant", + "required": [ + "name", + "slug" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 30, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + } + } + }, + "NestedDevice": { + "title": "Device", + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 64, + "x-nullable": true + }, + "display_name": { + "title": "Display name", + "type": "string", + "readOnly": true + } + } + }, + "NestedInterface": { + "title": "Connected endpoint", + "required": [ + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "device": { + "$ref": "#/definitions/NestedDevice" + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 64, + "minLength": 1 + }, + "cable": { + "title": "Cable", + "type": "integer", + "x-nullable": true + }, + "connection_status": { + "title": "Connection status", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "boolean", + "x-nullable": true + } + }, + "readOnly": true + } + } + }, + "CircuitCircuitTermination": { + "title": "Termination a", + "required": [ + "site", + "connected_endpoint", + "port_speed" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "site": { + "$ref": "#/definitions/NestedSite" + }, + "connected_endpoint": { + "$ref": "#/definitions/NestedInterface" + }, + "port_speed": { + "title": "Port speed (Kbps)", + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + "upstream_speed": { + "title": "Upstream speed (Kbps)", + "description": "Upstream speed, if different from port speed", + "type": "integer", + "maximum": 2147483647, + "minimum": 0, + "x-nullable": true + }, + "xconnect_id": { + "title": "Cross-connect ID", + "type": "string", + "maxLength": 50 + } + } + }, + "Circuit": { + "required": [ + "cid", + "provider", + "type" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "cid": { + "title": "Circuit ID", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "provider": { + "$ref": "#/definitions/NestedProvider" + }, + "type": { + "$ref": "#/definitions/NestedCircuitType" + }, + "status": { + "title": "Status", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "tenant": { + "$ref": "#/definitions/NestedTenant" + }, + "install_date": { + "title": "Date installed", + "type": "string", + "format": "date", + "x-nullable": true + }, + "commit_rate": { + "title": "Commit rate (Kbps)", + "type": "integer", + "maximum": 2147483647, + "minimum": 0, + "x-nullable": true + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "termination_a": { + "$ref": "#/definitions/CircuitCircuitTermination" + }, + "termination_z": { + "$ref": "#/definitions/CircuitCircuitTermination" + }, + "comments": { + "title": "Comments", + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "custom_fields": { + "title": "Custom fields", + "type": "object" + }, + "created": { + "title": "Created", + "type": "string", + "format": "date", + "readOnly": true + }, + "last_updated": { + "title": "Last updated", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "WritableCircuit": { + "required": [ + "cid", + "provider", + "type" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "cid": { + "title": "Circuit ID", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "provider": { + "title": "Provider", + "type": "integer" + }, + "type": { + "title": "Type", + "type": "integer" + }, + "status": { + "title": "Status", + "type": "string", + "enum": [ + "planned", + "provisioning", + "active", + "offline", + "deprovisioning", + "decommissioned" + ] + }, + "tenant": { + "title": "Tenant", + "type": "integer", + "x-nullable": true + }, + "install_date": { + "title": "Date installed", + "type": "string", + "format": "date", + "x-nullable": true + }, + "commit_rate": { + "title": "Commit rate (Kbps)", + "type": "integer", + "maximum": 2147483647, + "minimum": 0, + "x-nullable": true + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "termination_a": { + "title": "Termination a", + "type": "string", + "readOnly": true + }, + "termination_z": { + "title": "Termination z", + "type": "string", + "readOnly": true + }, + "comments": { + "title": "Comments", + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "custom_fields": { + "title": "Custom fields", + "type": "object" + }, + "created": { + "title": "Created", + "type": "string", + "format": "date", + "readOnly": true + }, + "last_updated": { + "title": "Last updated", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "Provider": { + "required": [ + "name", + "slug" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "asn": { + "title": "ASN", + "type": "integer", + "maximum": 4294967295, + "minimum": 1, + "x-nullable": true + }, + "account": { + "title": "Account number", + "type": "string", + "maxLength": 30 + }, + "portal_url": { + "title": "Portal", + "type": "string", + "format": "uri", + "maxLength": 200 + }, + "noc_contact": { + "title": "NOC contact", + "type": "string" + }, + "admin_contact": { + "title": "Admin contact", + "type": "string" + }, + "comments": { + "title": "Comments", + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "custom_fields": { + "title": "Custom fields", + "type": "object" + }, + "created": { + "title": "Created", + "type": "string", + "format": "date", + "readOnly": true + }, + "last_updated": { + "title": "Last updated", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "circuit_count": { + "title": "Circuit count", + "type": "integer", + "readOnly": true + } + } + }, + "Cable": { + "required": [ + "termination_a_type", + "termination_a_id", + "termination_b_type", + "termination_b_id" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "termination_a_type": { + "title": "Termination a type", + "type": "string" + }, + "termination_a_id": { + "title": "Termination a id", + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + "termination_a": { + "title": "Termination a", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, + "termination_b_type": { + "title": "Termination b type", + "type": "string" + }, + "termination_b_id": { + "title": "Termination b id", + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + "termination_b": { + "title": "Termination b", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "cat3", + "cat5", + "cat5e", + "cat6", + "cat6a", + "cat7", + "dac-active", + "dac-passive", + "coaxial", + "mmf", + "mmf-om1", + "mmf-om2", + "mmf-om3", + "mmf-om4", + "smf", + "smf-os1", + "smf-os2", + "aoc", + "power" + ] + }, + "status": { + "title": "Status", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "label": { + "title": "Label", + "type": "string", + "maxLength": 100 + }, + "color": { + "title": "Color", + "type": "string", + "pattern": "^[0-9a-f]{6}$", + "maxLength": 6 + }, + "length": { + "title": "Length", + "type": "integer", + "maximum": 32767, + "minimum": 0, + "x-nullable": true + }, + "length_unit": { + "title": "Length unit", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + }, + "WritableCable": { + "required": [ + "termination_a_type", + "termination_a_id", + "termination_b_type", + "termination_b_id" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "termination_a_type": { + "title": "Termination a type", + "type": "string" + }, + "termination_a_id": { + "title": "Termination a id", + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + "termination_a": { + "title": "Termination a", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, + "termination_b_type": { + "title": "Termination b type", + "type": "string" + }, + "termination_b_id": { + "title": "Termination b id", + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + "termination_b": { + "title": "Termination b", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "cat3", + "cat5", + "cat5e", + "cat6", + "cat6a", + "cat7", + "dac-active", + "dac-passive", + "coaxial", + "mmf", + "mmf-om1", + "mmf-om2", + "mmf-om3", + "mmf-om4", + "smf", + "smf-os1", + "smf-os2", + "aoc", + "power" + ] + }, + "status": { + "title": "Status", + "type": "string", + "enum": [ + "connected", + "planned" + ] + }, + "label": { + "title": "Label", + "type": "string", + "maxLength": 100 + }, + "color": { + "title": "Color", + "type": "string", + "pattern": "^[0-9a-f]{6}$", + "maxLength": 6 + }, + "length": { + "title": "Length", + "type": "integer", + "maximum": 32767, + "minimum": 0, + "x-nullable": true + }, + "length_unit": { + "title": "Length unit", + "type": "string", + "enum": [ + "m", + "cm", + "ft", + "in" + ] + } + } + }, + "NestedManufacturer": { + "title": "Manufacturer", + "required": [ + "name", + "slug" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "devicetype_count": { + "title": "Devicetype count", + "type": "integer", + "readOnly": true + } + } + }, + "NestedDeviceType": { + "title": "Device type", + "required": [ + "model", + "slug" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "manufacturer": { + "$ref": "#/definitions/NestedManufacturer" + }, + "model": { + "title": "Model", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "display_name": { + "title": "Display name", + "type": "string", + "readOnly": true + }, + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true + } + } + }, + "NestedDeviceRole": { + "title": "Device role", + "required": [ + "name", + "slug" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true + }, + "virtualmachine_count": { + "title": "Virtualmachine count", + "type": "integer", + "readOnly": true + } + } + }, + "NestedPlatform": { + "title": "Platform", + "required": [ + "name", + "slug" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 100, + "minLength": 1 + }, + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true + }, + "virtualmachine_count": { + "title": "Virtualmachine count", + "type": "integer", + "readOnly": true + } + } + }, + "NestedRack": { + "title": "Rack", + "required": [ + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "display_name": { + "title": "Display name", + "type": "string", + "readOnly": true + }, + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true + } + } + }, + "NestedIPAddress": { + "title": "Primary ip", + "required": [ + "address" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "family": { + "title": "Family", + "type": "integer", + "readOnly": true + }, + "address": { + "title": "Address", + "description": "IPv4 or IPv6 address (with mask)", + "type": "string" + } + } + }, + "NestedCluster": { + "title": "Cluster", + "required": [ + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "virtualmachine_count": { + "title": "Virtualmachine count", + "type": "integer", + "readOnly": true + } + } + }, + "NestedVirtualChassis": { + "title": "Virtual chassis", + "required": [ + "master" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "master": { + "$ref": "#/definitions/NestedDevice" + }, + "member_count": { + "title": "Member count", + "type": "integer", + "readOnly": true + } + } + }, + "Device": { + "required": [ + "device_type", + "device_role", + "site" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 64, + "x-nullable": true + }, + "display_name": { + "title": "Display name", + "type": "string", + "readOnly": true + }, + "device_type": { + "$ref": "#/definitions/NestedDeviceType" + }, + "device_role": { + "$ref": "#/definitions/NestedDeviceRole" + }, + "tenant": { + "$ref": "#/definitions/NestedTenant" + }, + "platform": { + "$ref": "#/definitions/NestedPlatform" + }, + "serial": { + "title": "Serial number", + "type": "string", + "maxLength": 50 + }, + "asset_tag": { + "title": "Asset tag", + "description": "A unique tag used to identify this device", + "type": "string", + "maxLength": 50, + "x-nullable": true + }, + "site": { + "$ref": "#/definitions/NestedSite" + }, + "rack": { + "$ref": "#/definitions/NestedRack" + }, + "position": { + "title": "Position (U)", + "description": "The lowest-numbered unit occupied by the device", + "type": "integer", + "maximum": 32767, + "minimum": 1, + "x-nullable": true + }, + "face": { + "title": "Face", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "parent_device": { + "$ref": "#/definitions/NestedDevice" + }, + "status": { + "title": "Status", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "primary_ip": { + "$ref": "#/definitions/NestedIPAddress" + }, + "primary_ip4": { + "$ref": "#/definitions/NestedIPAddress" + }, + "primary_ip6": { + "$ref": "#/definitions/NestedIPAddress" + }, + "cluster": { + "$ref": "#/definitions/NestedCluster" + }, + "virtual_chassis": { + "$ref": "#/definitions/NestedVirtualChassis" + }, + "vc_position": { + "title": "Vc position", + "type": "integer", + "maximum": 255, + "minimum": 0, + "x-nullable": true }, - "url": { - "title": "Url", + "vc_priority": { + "title": "Vc priority", + "type": "integer", + "maximum": 255, + "minimum": 0, + "x-nullable": true + }, + "comments": { + "title": "Comments", + "type": "string" + }, + "local_context_data": { + "title": "Local context data", "type": "string", - "format": "uri", - "readOnly": true + "x-nullable": true }, - "name": { - "title": "Name", + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "custom_fields": { + "title": "Custom fields", + "type": "object" + }, + "created": { + "title": "Created", "type": "string", - "maxLength": 50 + "format": "date", + "readOnly": true }, - "slug": { - "title": "Slug", + "last_updated": { + "title": "Last updated", "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "format": "date-time", + "readOnly": true } } }, - "NestedDevice": { - "title": "Device", + "ConsolePort": { + "required": [ + "device", + "name" + ], "type": "object", "properties": { "id": { @@ -12347,27 +18507,83 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true + "device": { + "$ref": "#/definitions/NestedDevice" }, "name": { "title": "Name", "type": "string", - "maxLength": 64 + "maxLength": 50, + "minLength": 1 }, - "display_name": { - "title": "Display name", + "type": { + "title": "Type", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "connected_endpoint_type": { + "title": "Connected endpoint type", "type": "string", "readOnly": true + }, + "connected_endpoint": { + "title": "Connected endpoint", + "description": "\n Return the appropriate serializer for the type of connected object.\n ", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, + "connection_status": { + "title": "Connection status", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "boolean", + "x-nullable": true + } + }, + "readOnly": true + }, + "cable": { + "$ref": "#/definitions/NestedCable" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } } } }, - "NestedInterface": { - "title": "Lag", + "ConsolePortTemplate": { "required": [ + "device_type", "name" ], "type": "object", @@ -12377,23 +18593,37 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true + "device_type": { + "$ref": "#/definitions/NestedDeviceType" }, "name": { "title": "Name", "type": "string", - "maxLength": 64 + "maxLength": 50, + "minLength": 1 + }, + "type": { + "title": "Type", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } } } }, - "InterfaceNestedCircuit": { - "title": "Circuit", + "WritableConsolePortTemplate": { "required": [ - "cid" + "device_type", + "name" ], "type": "object", "properties": { @@ -12402,25 +18632,40 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", + "device_type": { + "title": "Device type", + "type": "integer" + }, + "name": { + "title": "Name", "type": "string", - "format": "uri", - "readOnly": true + "maxLength": 50, + "minLength": 1 }, - "cid": { - "title": "Circuit ID", + "type": { + "title": "Type", "type": "string", - "maxLength": 50 + "enum": [ + "de-9", + "db-25", + "rj-12", + "rj-45", + "usb-a", + "usb-b", + "usb-c", + "usb-mini-a", + "usb-mini-b", + "usb-micro-a", + "usb-micro-b", + "other" + ] } } }, - "InterfaceCircuitTermination": { - "title": "Circuit termination", + "WritableConsolePort": { "required": [ - "circuit", - "term_side", - "port_speed" + "device", + "name" ], "type": "object", "properties": { @@ -12429,46 +18674,115 @@ "type": "integer", "readOnly": true }, - "circuit": { - "$ref": "#/definitions/InterfaceNestedCircuit" + "device": { + "title": "Device", + "type": "integer" }, - "term_side": { - "title": "Termination", + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "type": { + "title": "Type", "type": "string", "enum": [ - "A", - "Z" + "de-9", + "db-25", + "rj-12", + "rj-45", + "usb-a", + "usb-b", + "usb-c", + "usb-mini-a", + "usb-mini-b", + "usb-micro-a", + "usb-micro-b", + "other" ] }, - "port_speed": { - "title": "Port speed (Kbps)", - "type": "integer", - "maximum": 2147483647, - "minimum": 0 + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 }, - "upstream_speed": { - "title": "Upstream speed (Kbps)", - "description": "Upstream speed, if different from port speed", + "connected_endpoint_type": { + "title": "Connected endpoint type", + "type": "string", + "readOnly": true + }, + "connected_endpoint": { + "title": "Connected endpoint", + "description": "\n Return the appropriate serializer for the type of connected object.\n ", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, + "connection_status": { + "title": "Connection status", + "type": "boolean", + "enum": [ + false, + true + ] + }, + "cable": { + "$ref": "#/definitions/NestedCable" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "ConsoleServerPortTemplate": { + "required": [ + "device_type", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", "type": "integer", - "maximum": 2147483647, - "minimum": 0 + "readOnly": true }, - "xconnect_id": { - "title": "Cross-connect ID", - "type": "string", - "maxLength": 50 + "device_type": { + "$ref": "#/definitions/NestedDeviceType" }, - "pp_info": { - "title": "Patch panel/port(s)", + "name": { + "title": "Name", "type": "string", - "maxLength": 100 + "maxLength": 50, + "minLength": 1 + }, + "type": { + "title": "Type", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } } } }, - "InterfaceVLAN": { - "title": "Untagged vlan", + "WritableConsoleServerPortTemplate": { "required": [ - "vid", + "device_type", "name" ], "type": "object", @@ -12478,41 +18792,40 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true - }, - "vid": { - "title": "ID", - "type": "integer", - "maximum": 4094, - "minimum": 1 + "device_type": { + "title": "Device type", + "type": "integer" }, "name": { "title": "Name", "type": "string", - "maxLength": 64 + "maxLength": 50, + "minLength": 1 }, - "display_name": { - "title": "Display name", + "type": { + "title": "Type", "type": "string", - "readOnly": true + "enum": [ + "de-9", + "db-25", + "rj-12", + "rj-45", + "usb-a", + "usb-b", + "usb-c", + "usb-mini-a", + "usb-mini-b", + "usb-micro-a", + "usb-micro-b", + "other" + ] } } }, - "Interface": { - "title": "Interface", + "ConsoleServerPort": { "required": [ "device", - "name", - "form_factor", - "lag", - "circuit_termination", - "mode", - "untagged_vlan", - "tagged_vlans" + "name" ], "type": "object", "properties": { @@ -12527,10 +18840,11 @@ "name": { "title": "Name", "type": "string", - "maxLength": 64 + "maxLength": 50, + "minLength": 1 }, - "form_factor": { - "title": "Form factor", + "type": { + "title": "Type", "required": [ "label", "value" @@ -12541,52 +18855,31 @@ "type": "string" }, "value": { - "type": "integer" + "type": "string" } } }, - "enabled": { - "title": "Enabled", - "type": "boolean" - }, - "lag": { - "$ref": "#/definitions/NestedInterface" - }, - "mtu": { - "title": "MTU", - "type": "integer", - "maximum": 32767, - "minimum": 0 - }, - "mac_address": { - "title": "MAC Address", - "type": "string" - }, - "mgmt_only": { - "title": "OOB Management", - "description": "This interface is used only for out-of-band management", - "type": "boolean" - }, "description": { "title": "Description", "type": "string", "maxLength": 100 }, - "is_connected": { - "title": "Is connected", + "connected_endpoint_type": { + "title": "Connected endpoint type", "type": "string", "readOnly": true }, - "interface_connection": { - "title": "Interface connection", - "type": "string", + "connected_endpoint": { + "title": "Connected endpoint", + "description": "\n Return the appropriate serializer for the type of connected object.\n ", + "type": "object", + "additionalProperties": { + "type": "string" + }, "readOnly": true }, - "circuit_termination": { - "$ref": "#/definitions/InterfaceCircuitTermination" - }, - "mode": { - "title": "Mode", + "connection_status": { + "title": "Connection status", "required": [ "label", "value" @@ -12597,28 +18890,28 @@ "type": "string" }, "value": { - "type": "integer" + "type": "boolean", + "x-nullable": true } - } + }, + "readOnly": true }, - "untagged_vlan": { - "$ref": "#/definitions/InterfaceVLAN" + "cable": { + "$ref": "#/definitions/NestedCable" }, - "tagged_vlans": { + "tags": { "type": "array", "items": { - "$ref": "#/definitions/InterfaceVLAN" + "type": "string", + "minLength": 1 } } } }, - "CircuitTermination": { + "WritableConsoleServerPort": { "required": [ - "circuit", - "term_side", - "site", - "interface", - "port_speed" + "device", + "name" ], "type": "object", "properties": { @@ -12627,54 +18920,100 @@ "type": "integer", "readOnly": true }, - "circuit": { - "$ref": "#/definitions/NestedCircuit" + "device": { + "title": "Device", + "type": "integer" }, - "term_side": { - "title": "Termination", + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "type": { + "title": "Type", "type": "string", "enum": [ - "A", - "Z" + "de-9", + "db-25", + "rj-12", + "rj-45", + "usb-a", + "usb-b", + "usb-c", + "usb-mini-a", + "usb-mini-b", + "usb-micro-a", + "usb-micro-b", + "other" ] }, - "site": { - "$ref": "#/definitions/NestedSite" + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 }, - "interface": { - "$ref": "#/definitions/Interface" + "connected_endpoint_type": { + "title": "Connected endpoint type", + "type": "string", + "readOnly": true }, - "port_speed": { - "title": "Port speed (Kbps)", - "type": "integer", - "maximum": 2147483647, - "minimum": 0 + "connected_endpoint": { + "title": "Connected endpoint", + "description": "\n Return the appropriate serializer for the type of connected object.\n ", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true }, - "upstream_speed": { - "title": "Upstream speed (Kbps)", - "description": "Upstream speed, if different from port speed", + "connection_status": { + "title": "Connection status", + "type": "boolean", + "enum": [ + false, + true + ] + }, + "cable": { + "$ref": "#/definitions/NestedCable" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "DeviceBayTemplate": { + "required": [ + "device_type", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", "type": "integer", - "maximum": 2147483647, - "minimum": 0 + "readOnly": true }, - "xconnect_id": { - "title": "Cross-connect ID", - "type": "string", - "maxLength": 50 + "device_type": { + "$ref": "#/definitions/NestedDeviceType" }, - "pp_info": { - "title": "Patch panel/port(s)", + "name": { + "title": "Name", "type": "string", - "maxLength": 100 + "maxLength": 50, + "minLength": 1 } } }, - "WritableCircuitTermination": { + "WritableDeviceBayTemplate": { "required": [ - "circuit", - "term_side", - "site", - "port_speed" + "device_type", + "name" ], "type": "object", "properties": { @@ -12683,55 +19022,102 @@ "type": "integer", "readOnly": true }, - "circuit": { - "title": "Circuit", + "device_type": { + "title": "Device type", "type": "integer" }, - "term_side": { - "title": "Termination", + "name": { + "title": "Name", "type": "string", - "enum": [ - "A", - "Z" - ] + "maxLength": 50, + "minLength": 1 + } + } + }, + "DeviceBay": { + "required": [ + "device", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true }, - "site": { - "title": "Site", - "type": "integer" + "device": { + "$ref": "#/definitions/NestedDevice" }, - "interface": { - "title": "Interface", - "type": "integer" + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 }, - "port_speed": { - "title": "Port speed (Kbps)", - "type": "integer", - "maximum": 2147483647, - "minimum": 0 + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 }, - "upstream_speed": { - "title": "Upstream speed (Kbps)", - "description": "Upstream speed, if different from port speed", + "installed_device": { + "$ref": "#/definitions/NestedDevice" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "WritableDeviceBay": { + "required": [ + "device", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", "type": "integer", - "maximum": 2147483647, - "minimum": 0 + "readOnly": true }, - "xconnect_id": { - "title": "Cross-connect ID", + "device": { + "title": "Device", + "type": "integer" + }, + "name": { + "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "installed_device": { + "title": "Installed device", + "type": "integer", + "x-nullable": true }, - "pp_info": { - "title": "Patch panel/port(s)", - "type": "string", - "maxLength": 100 + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } } } }, - "CircuitType": { + "DeviceRole": { "required": [ "name", - "slug" + "slug", + "color" ], "type": "object", "properties": { @@ -12743,21 +19129,50 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "color": { + "title": "Color", + "type": "string", + "pattern": "^[0-9a-f]{6}$", + "maxLength": 6, + "minLength": 1 + }, + "vm_role": { + "title": "VM Role", + "description": "Virtual machines may be assigned to this role", + "type": "boolean" + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true + }, + "virtualmachine_count": { + "title": "Virtualmachine count", + "type": "integer", + "readOnly": true } } }, - "NestedProvider": { - "title": "Provider", + "DeviceType": { "required": [ - "name", + "manufacturer", + "model", "slug" ], "type": "object", @@ -12767,30 +19182,99 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true + "manufacturer": { + "$ref": "#/definitions/NestedManufacturer" }, - "name": { - "title": "Name", + "model": { + "title": "Model", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "display_name": { + "title": "Display name", + "type": "string", + "readOnly": true + }, + "part_number": { + "title": "Part number", + "description": "Discrete part number (optional)", + "type": "string", "maxLength": 50 + }, + "u_height": { + "title": "Height (U)", + "type": "integer", + "maximum": 32767, + "minimum": 0 + }, + "is_full_depth": { + "title": "Is full depth", + "description": "Device consumes both front and rear rack faces", + "type": "boolean" + }, + "subdevice_role": { + "title": "Subdevice role", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "comments": { + "title": "Comments", + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "custom_fields": { + "title": "Custom fields", + "type": "object" + }, + "created": { + "title": "Created", + "type": "string", + "format": "date", + "readOnly": true + }, + "last_updated": { + "title": "Last updated", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true } } }, - "NestedCircuitType": { - "title": "Type", + "WritableDeviceType": { "required": [ - "name", + "manufacturer", + "model", "slug" ], "type": "object", @@ -12800,31 +19284,94 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true + "manufacturer": { + "title": "Manufacturer", + "type": "integer" }, - "name": { - "title": "Name", + "model": { + "title": "Model", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "display_name": { + "title": "Display name", + "type": "string", + "readOnly": true + }, + "part_number": { + "title": "Part number", + "description": "Discrete part number (optional)", + "type": "string", "maxLength": 50 + }, + "u_height": { + "title": "Height (U)", + "type": "integer", + "maximum": 32767, + "minimum": 0 + }, + "is_full_depth": { + "title": "Is full depth", + "description": "Device consumes both front and rear rack faces", + "type": "boolean" + }, + "subdevice_role": { + "title": "Parent/child status", + "description": "Parent devices house child devices in device bays. Leave blank if this device type is neither a parent nor a child.", + "type": "string", + "enum": [ + "parent", + "child" + ] + }, + "comments": { + "title": "Comments", + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "custom_fields": { + "title": "Custom fields", + "type": "object" + }, + "created": { + "title": "Created", + "type": "string", + "format": "date", + "readOnly": true + }, + "last_updated": { + "title": "Last updated", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true } } }, - "NestedTenant": { - "title": "Tenant", + "DeviceWithConfigContext": { "required": [ - "name", - "slug" + "device_type", + "device_role", + "site" ], "type": "object", "properties": { @@ -12833,51 +19380,73 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true - }, "name": { "title": "Name", "type": "string", - "maxLength": 30 + "maxLength": 64, + "x-nullable": true }, - "slug": { - "title": "Slug", + "display_name": { + "title": "Display name", + "type": "string", + "readOnly": true + }, + "device_type": { + "$ref": "#/definitions/NestedDeviceType" + }, + "device_role": { + "$ref": "#/definitions/NestedDeviceRole" + }, + "tenant": { + "$ref": "#/definitions/NestedTenant" + }, + "platform": { + "$ref": "#/definitions/NestedPlatform" + }, + "serial": { + "title": "Serial number", "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", "maxLength": 50 - } - } - }, - "Circuit": { - "required": [ - "cid", - "provider", - "type", - "status", - "tenant" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", + }, + "asset_tag": { + "title": "Asset tag", + "description": "A unique tag used to identify this device", + "type": "string", + "maxLength": 50, + "x-nullable": true + }, + "site": { + "$ref": "#/definitions/NestedSite" + }, + "rack": { + "$ref": "#/definitions/NestedRack" + }, + "position": { + "title": "Position (U)", + "description": "The lowest-numbered unit occupied by the device", "type": "integer", - "readOnly": true - }, - "cid": { - "title": "Circuit ID", - "type": "string", - "maxLength": 50 + "maximum": 32767, + "minimum": 1, + "x-nullable": true }, - "provider": { - "$ref": "#/definitions/NestedProvider" + "face": { + "title": "Face", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } }, - "type": { - "$ref": "#/definitions/NestedCircuitType" + "parent_device": { + "$ref": "#/definitions/NestedDevice" }, "status": { "title": "Status", @@ -12891,37 +19460,67 @@ "type": "string" }, "value": { - "type": "integer" + "type": "string" } } }, - "tenant": { - "$ref": "#/definitions/NestedTenant" + "primary_ip": { + "$ref": "#/definitions/NestedIPAddress" }, - "install_date": { - "title": "Date installed", - "type": "string", - "format": "date" + "primary_ip4": { + "$ref": "#/definitions/NestedIPAddress" }, - "commit_rate": { - "title": "Commit rate (Kbps)", + "primary_ip6": { + "$ref": "#/definitions/NestedIPAddress" + }, + "cluster": { + "$ref": "#/definitions/NestedCluster" + }, + "virtual_chassis": { + "$ref": "#/definitions/NestedVirtualChassis" + }, + "vc_position": { + "title": "Vc position", "type": "integer", - "maximum": 2147483647, - "minimum": 0 + "maximum": 255, + "minimum": 0, + "x-nullable": true }, - "description": { - "title": "Description", - "type": "string", - "maxLength": 100 + "vc_priority": { + "title": "Vc priority", + "type": "integer", + "maximum": 255, + "minimum": 0, + "x-nullable": true }, "comments": { "title": "Comments", "type": "string" }, + "local_context_data": { + "title": "Local context data", + "type": "string", + "x-nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" }, + "config_context": { + "title": "Config context", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, "created": { "title": "Created", "type": "string", @@ -12936,11 +19535,11 @@ } } }, - "WritableCircuit": { + "WritableDeviceWithConfigContext": { "required": [ - "cid", - "provider", - "type" + "device_type", + "device_role", + "site" ], "type": "object", "properties": { @@ -12949,130 +19548,155 @@ "type": "integer", "readOnly": true }, - "cid": { - "title": "Circuit ID", + "name": { + "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 64, + "x-nullable": true }, - "provider": { - "title": "Provider", - "type": "integer" + "display_name": { + "title": "Display name", + "type": "string", + "readOnly": true }, - "type": { - "title": "Type", + "device_type": { + "title": "Device type", "type": "integer" }, - "status": { - "title": "Status", - "type": "integer", - "enum": [ - 2, - 3, - 1, - 4, - 0, - 5 - ] + "device_role": { + "title": "Device role", + "type": "integer" }, "tenant": { "title": "Tenant", - "type": "integer" - }, - "install_date": { - "title": "Date installed", - "type": "string", - "format": "date" + "type": "integer", + "x-nullable": true }, - "commit_rate": { - "title": "Commit rate (Kbps)", + "platform": { + "title": "Platform", "type": "integer", - "maximum": 2147483647, - "minimum": 0 + "x-nullable": true }, - "description": { - "title": "Description", + "serial": { + "title": "Serial number", "type": "string", - "maxLength": 100 + "maxLength": 50 }, - "comments": { - "title": "Comments", - "type": "string" + "asset_tag": { + "title": "Asset tag", + "description": "A unique tag used to identify this device", + "type": "string", + "maxLength": 50, + "x-nullable": true }, - "custom_fields": { - "title": "Custom fields", - "type": "object" + "site": { + "title": "Site", + "type": "integer" }, - "created": { - "title": "Created", - "type": "string", - "format": "date", - "readOnly": true + "rack": { + "title": "Rack", + "type": "integer", + "x-nullable": true }, - "last_updated": { - "title": "Last updated", - "type": "string", - "format": "date-time", - "readOnly": true - } - } - }, - "Provider": { - "required": [ - "name", - "slug" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", + "position": { + "title": "Position (U)", + "description": "The lowest-numbered unit occupied by the device", "type": "integer", - "readOnly": true + "maximum": 32767, + "minimum": 1, + "x-nullable": true }, - "name": { - "title": "Name", + "face": { + "title": "Rack face", "type": "string", - "maxLength": 50 + "enum": [ + "front", + "rear" + ] }, - "slug": { - "title": "Slug", + "parent_device": { + "$ref": "#/definitions/NestedDevice" + }, + "status": { + "title": "Status", "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "enum": [ + "offline", + "active", + "planned", + "staged", + "failed", + "inventory", + "decommissioning" + ] }, - "asn": { - "title": "ASN", + "primary_ip": { + "title": "Primary ip", + "type": "string", + "readOnly": true + }, + "primary_ip4": { + "title": "Primary IPv4", "type": "integer", - "maximum": 4294967295, - "minimum": 1 + "x-nullable": true }, - "account": { - "title": "Account number", - "type": "string", - "maxLength": 30 + "primary_ip6": { + "title": "Primary IPv6", + "type": "integer", + "x-nullable": true }, - "portal_url": { - "title": "Portal", - "type": "string", - "format": "uri", - "maxLength": 200 + "cluster": { + "title": "Cluster", + "type": "integer", + "x-nullable": true }, - "noc_contact": { - "title": "NOC contact", - "type": "string" + "virtual_chassis": { + "title": "Virtual chassis", + "type": "integer", + "x-nullable": true }, - "admin_contact": { - "title": "Admin contact", - "type": "string" + "vc_position": { + "title": "Vc position", + "type": "integer", + "maximum": 255, + "minimum": 0, + "x-nullable": true + }, + "vc_priority": { + "title": "Vc priority", + "type": "integer", + "maximum": 255, + "minimum": 0, + "x-nullable": true }, "comments": { "title": "Comments", "type": "string" }, + "local_context_data": { + "title": "Local context data", + "type": "string", + "x-nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" }, + "config_context": { + "title": "Config context", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, "created": { "title": "Created", "type": "string", @@ -13087,10 +19711,25 @@ } } }, - "WritableProvider": { + "DeviceNAPALM": { "required": [ - "name", - "slug" + "method" + ], + "type": "object", + "properties": { + "method": { + "title": "Method", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "NestedRearPortTemplate": { + "title": "Rear port", + "required": [ + "name" ], "type": "object", "properties": { @@ -13099,70 +19738,131 @@ "type": "integer", "readOnly": true }, - "name": { - "title": "Name", + "url": { + "title": "Url", "type": "string", - "maxLength": 50 + "format": "uri", + "readOnly": true }, - "slug": { - "title": "Slug", + "name": { + "title": "Name", "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 - }, - "asn": { - "title": "ASN", + "maxLength": 64, + "minLength": 1 + } + } + }, + "FrontPortTemplate": { + "required": [ + "device_type", + "name", + "type", + "rear_port" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", "type": "integer", - "maximum": 4294967295, - "minimum": 1 + "readOnly": true }, - "account": { - "title": "Account number", - "type": "string", - "maxLength": 30 + "device_type": { + "$ref": "#/definitions/NestedDeviceType" }, - "portal_url": { - "title": "Portal", + "name": { + "title": "Name", "type": "string", - "format": "uri", - "maxLength": 200 + "maxLength": 64, + "minLength": 1 }, - "noc_contact": { - "title": "NOC contact", - "type": "string" + "type": { + "title": "Type", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } }, - "admin_contact": { - "title": "Admin contact", - "type": "string" + "rear_port": { + "$ref": "#/definitions/NestedRearPortTemplate" }, - "comments": { - "title": "Comments", - "type": "string" + "rear_port_position": { + "title": "Rear port position", + "type": "integer", + "default": 1, + "maximum": 64, + "minimum": 1 + } + } + }, + "WritableFrontPortTemplate": { + "required": [ + "device_type", + "name", + "type", + "rear_port" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true }, - "custom_fields": { - "title": "Custom fields", - "type": "object" + "device_type": { + "title": "Device type", + "type": "integer" }, - "created": { - "title": "Created", + "name": { + "title": "Name", "type": "string", - "format": "date", - "readOnly": true + "maxLength": 64, + "minLength": 1 }, - "last_updated": { - "title": "Last updated", + "type": { + "title": "Type", "type": "string", - "format": "date-time", - "readOnly": true + "enum": [ + "8p8c", + "110-punch", + "bnc", + "fc", + "lc", + "lc-apc", + "lsh", + "lsh-apc", + "mpo", + "mtrj", + "sc", + "sc-apc", + "st" + ] + }, + "rear_port": { + "title": "Rear port", + "type": "integer" + }, + "rear_port_position": { + "title": "Rear port position", + "type": "integer", + "default": 1, + "maximum": 64, + "minimum": 1 } } }, - "NestedManufacturer": { - "title": "Manufacturer", + "FrontPortRearPort": { + "title": "Rear port", "required": [ - "name", - "slug" + "name" ], "type": "object", "properties": { @@ -13180,23 +19880,17 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 - }, - "slug": { - "title": "Slug", - "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 64, + "minLength": 1 } } }, - "NestedDeviceType": { - "title": "Device type", + "FrontPort": { "required": [ - "manufacturer", - "model", - "slug" + "device", + "name", + "type", + "rear_port" ], "type": "object", "properties": { @@ -13205,34 +19899,64 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", + "device": { + "$ref": "#/definitions/NestedDevice" + }, + "name": { + "title": "Name", "type": "string", - "format": "uri", - "readOnly": true + "maxLength": 64, + "minLength": 1 }, - "manufacturer": { - "$ref": "#/definitions/NestedManufacturer" + "type": { + "title": "Type", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } }, - "model": { - "title": "Model", - "type": "string", - "maxLength": 50 + "rear_port": { + "$ref": "#/definitions/FrontPortRearPort" }, - "slug": { - "title": "Slug", + "rear_port_position": { + "title": "Rear port position", + "type": "integer", + "default": 1, + "maximum": 64, + "minimum": 1 + }, + "description": { + "title": "Description", "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 100 + }, + "cable": { + "$ref": "#/definitions/NestedCable" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } } } }, - "NestedDeviceRole": { - "title": "Device role", + "WritableFrontPort": { "required": [ + "device", "name", - "slug" + "type", + "rear_port" ], "type": "object", "properties": { @@ -13241,31 +19965,98 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true + "device": { + "title": "Device", + "type": "integer" }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 64, + "minLength": 1 }, - "slug": { - "title": "Slug", + "type": { + "title": "Type", "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "enum": [ + "8p8c", + "110-punch", + "bnc", + "fc", + "lc", + "lc-apc", + "lsh", + "lsh-apc", + "mpo", + "mtrj", + "sc", + "sc-apc", + "st" + ] + }, + "rear_port": { + "title": "Rear port", + "type": "integer" + }, + "rear_port_position": { + "title": "Rear port position", + "type": "integer", + "default": 1, + "maximum": 64, + "minimum": 1 + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "cable": { + "$ref": "#/definitions/NestedCable" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "InterfaceConnection": { + "required": [ + "interface_b" + ], + "type": "object", + "properties": { + "interface_a": { + "$ref": "#/definitions/NestedInterface" + }, + "interface_b": { + "$ref": "#/definitions/NestedInterface" + }, + "connection_status": { + "title": "Connection status", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "boolean", + "x-nullable": true + } + } } } }, - "NestedPlatform": { - "title": "Platform", + "InterfaceTemplate": { "required": [ - "name", - "slug" + "device_type", + "name" ], "type": "object", "properties": { @@ -13274,30 +20065,42 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true + "device_type": { + "$ref": "#/definitions/NestedDeviceType" }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 64, + "minLength": 1 }, - "slug": { - "title": "Slug", - "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "type": { + "title": "Type", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "mgmt_only": { + "title": "Management only", + "type": "boolean" } } }, - "NestedRack": { - "title": "Rack", + "WritableInterfaceTemplate": { "required": [ - "name" + "device_type", + "name", + "type" ], "type": "object", "properties": { @@ -13306,28 +20109,105 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true + "device_type": { + "title": "Device type", + "type": "integer" }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 64, + "minLength": 1 }, - "display_name": { - "title": "Display name", + "type": { + "title": "Type", "type": "string", - "readOnly": true + "enum": [ + "virtual", + "lag", + "100base-tx", + "1000base-t", + "2.5gbase-t", + "5gbase-t", + "10gbase-t", + "10gbase-cx4", + "1000base-x-gbic", + "1000base-x-sfp", + "10gbase-x-sfpp", + "10gbase-x-xfp", + "10gbase-x-xenpak", + "10gbase-x-x2", + "25gbase-x-sfp28", + "40gbase-x-qsfpp", + "50gbase-x-sfp28", + "100gbase-x-cfp", + "100gbase-x-cfp2", + "200gbase-x-cfp2", + "100gbase-x-cfp4", + "100gbase-x-cpak", + "100gbase-x-qsfp28", + "200gbase-x-qsfp56", + "400gbase-x-qsfpdd", + "400gbase-x-osfp", + "ieee802.11a", + "ieee802.11g", + "ieee802.11n", + "ieee802.11ac", + "ieee802.11ad", + "ieee802.11ax", + "gsm", + "cdma", + "lte", + "sonet-oc3", + "sonet-oc12", + "sonet-oc48", + "sonet-oc192", + "sonet-oc768", + "sonet-oc1920", + "sonet-oc3840", + "1gfc-sfp", + "2gfc-sfp", + "4gfc-sfp", + "8gfc-sfpp", + "16gfc-sfpp", + "32gfc-sfp28", + "128gfc-sfp28", + "inifiband-sdr", + "inifiband-ddr", + "inifiband-qdr", + "inifiband-fdr10", + "inifiband-fdr", + "inifiband-edr", + "inifiband-hdr", + "inifiband-ndr", + "inifiband-xdr", + "t1", + "e1", + "t3", + "e3", + "cisco-stackwise", + "cisco-stackwise-plus", + "cisco-flexstack", + "cisco-flexstack-plus", + "juniper-vcp", + "extreme-summitstack", + "extreme-summitstack-128", + "extreme-summitstack-256", + "extreme-summitstack-512", + "other" + ] + }, + "mgmt_only": { + "title": "Management only", + "type": "boolean" } } }, - "DeviceIPAddress": { - "title": "Primary ip", + "NestedVLAN": { + "title": "Untagged vlan", "required": [ - "address" + "vid", + "name" ], "type": "object", "properties": { @@ -13342,83 +20222,29 @@ "format": "uri", "readOnly": true }, - "family": { - "title": "Family", - "type": "integer", - "readOnly": true - }, - "address": { - "title": "Address", - "description": "IPv4 or IPv6 address (with mask)", - "type": "string" - } - } - }, - "NestedCluster": { - "title": "Cluster", - "required": [ - "name" - ], - "type": "object", - "properties": { - "id": { + "vid": { "title": "ID", "type": "integer", - "readOnly": true - }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true + "maximum": 4094, + "minimum": 1 }, "name": { "title": "Name", "type": "string", - "maxLength": 100 - } - } - }, - "DeviceVirtualChassis": { - "title": "Virtual chassis", - "required": [ - "master" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true + "maxLength": 64, + "minLength": 1 }, - "url": { - "title": "Url", + "display_name": { + "title": "Display name", "type": "string", - "format": "uri", "readOnly": true - }, - "master": { - "$ref": "#/definitions/NestedDevice" } } }, - "Device": { + "DeviceInterface": { "required": [ - "device_type", - "device_role", - "tenant", - "platform", - "site", - "rack", - "position", - "face", - "status", - "primary_ip", - "primary_ip4", - "primary_ip6", - "cluster", - "virtual_chassis", - "vc_position" + "device", + "name" ], "type": "object", "properties": { @@ -13427,54 +20253,76 @@ "type": "integer", "readOnly": true }, + "device": { + "$ref": "#/definitions/NestedDevice" + }, "name": { "title": "Name", "type": "string", - "maxLength": 64 - }, - "display_name": { - "title": "Display name", - "type": "string", - "readOnly": true + "maxLength": 64, + "minLength": 1 }, - "device_type": { - "$ref": "#/definitions/NestedDeviceType" + "type": { + "title": "Type", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } }, - "device_role": { - "$ref": "#/definitions/NestedDeviceRole" + "enabled": { + "title": "Enabled", + "type": "boolean" }, - "tenant": { - "$ref": "#/definitions/NestedTenant" + "lag": { + "$ref": "#/definitions/NestedInterface" }, - "platform": { - "$ref": "#/definitions/NestedPlatform" + "mtu": { + "title": "MTU", + "type": "integer", + "maximum": 65536, + "minimum": 1, + "x-nullable": true }, - "serial": { - "title": "Serial number", + "mac_address": { + "title": "MAC Address", "type": "string", - "maxLength": 50 + "x-nullable": true }, - "asset_tag": { - "title": "Asset tag", - "description": "A unique tag used to identify this device", - "type": "string", - "maxLength": 50 + "mgmt_only": { + "title": "OOB Management", + "description": "This interface is used only for out-of-band management", + "type": "boolean" }, - "site": { - "$ref": "#/definitions/NestedSite" + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 }, - "rack": { - "$ref": "#/definitions/NestedRack" + "connected_endpoint_type": { + "title": "Connected endpoint type", + "type": "string", + "readOnly": true }, - "position": { - "title": "Position (U)", - "description": "The lowest-numbered unit occupied by the device", - "type": "integer", - "maximum": 32767, - "minimum": 1 + "connected_endpoint": { + "title": "Connected endpoint", + "description": "\n Return the appropriate serializer for the type of connected object.\n ", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true }, - "face": { - "title": "Face", + "connection_status": { + "title": "Connection status", "required": [ "label", "value" @@ -13485,18 +20333,17 @@ "type": "string" }, "value": { - "type": "integer", + "type": "boolean", "x-nullable": true } - } - }, - "parent_device": { - "title": "Parent device", - "type": "string", + }, "readOnly": true }, - "status": { - "title": "Status", + "cable": { + "$ref": "#/definitions/NestedCable" + }, + "mode": { + "title": "Mode", "required": [ "label", "value" @@ -13507,64 +20354,39 @@ "type": "string" }, "value": { - "type": "integer" + "type": "string" } } }, - "primary_ip": { - "$ref": "#/definitions/DeviceIPAddress" - }, - "primary_ip4": { - "$ref": "#/definitions/DeviceIPAddress" - }, - "primary_ip6": { - "$ref": "#/definitions/DeviceIPAddress" - }, - "cluster": { - "$ref": "#/definitions/NestedCluster" - }, - "virtual_chassis": { - "$ref": "#/definitions/DeviceVirtualChassis" - }, - "vc_position": { - "title": "Vc position", - "type": "integer", - "maximum": 255, - "minimum": 0 - }, - "vc_priority": { - "title": "Vc priority", - "type": "integer", - "maximum": 255, - "minimum": 0 - }, - "comments": { - "title": "Comments", - "type": "string" - }, - "custom_fields": { - "title": "Custom fields", - "type": "object" + "untagged_vlan": { + "$ref": "#/definitions/NestedVLAN" }, - "created": { - "title": "Created", - "type": "string", - "format": "date", - "readOnly": true + "tagged_vlans": { + "type": "array", + "items": { + "$ref": "#/definitions/NestedVLAN" + }, + "uniqueItems": true }, - "last_updated": { - "title": "Last updated", + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "count_ipaddresses": { + "title": "Count ipaddresses", "type": "string", - "format": "date-time", "readOnly": true } } }, - "ConsoleServerPort": { - "title": "Cs port", + "WritableDeviceInterface": { "required": [ "device", - "name" + "name", + "type" ], "type": "object", "properties": { @@ -13574,43 +20396,137 @@ "readOnly": true }, "device": { - "$ref": "#/definitions/NestedDevice" + "title": "Device", + "type": "integer" }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 64, + "minLength": 1 }, - "connected_console": { - "title": "Connected console", + "type": { + "title": "Type", "type": "string", - "readOnly": true - } - } - }, - "ConsolePort": { - "required": [ - "device", - "name", - "cs_port" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", + "enum": [ + "virtual", + "lag", + "100base-tx", + "1000base-t", + "2.5gbase-t", + "5gbase-t", + "10gbase-t", + "10gbase-cx4", + "1000base-x-gbic", + "1000base-x-sfp", + "10gbase-x-sfpp", + "10gbase-x-xfp", + "10gbase-x-xenpak", + "10gbase-x-x2", + "25gbase-x-sfp28", + "40gbase-x-qsfpp", + "50gbase-x-sfp28", + "100gbase-x-cfp", + "100gbase-x-cfp2", + "200gbase-x-cfp2", + "100gbase-x-cfp4", + "100gbase-x-cpak", + "100gbase-x-qsfp28", + "200gbase-x-qsfp56", + "400gbase-x-qsfpdd", + "400gbase-x-osfp", + "ieee802.11a", + "ieee802.11g", + "ieee802.11n", + "ieee802.11ac", + "ieee802.11ad", + "ieee802.11ax", + "gsm", + "cdma", + "lte", + "sonet-oc3", + "sonet-oc12", + "sonet-oc48", + "sonet-oc192", + "sonet-oc768", + "sonet-oc1920", + "sonet-oc3840", + "1gfc-sfp", + "2gfc-sfp", + "4gfc-sfp", + "8gfc-sfpp", + "16gfc-sfpp", + "32gfc-sfp28", + "128gfc-sfp28", + "inifiband-sdr", + "inifiband-ddr", + "inifiband-qdr", + "inifiband-fdr10", + "inifiband-fdr", + "inifiband-edr", + "inifiband-hdr", + "inifiband-ndr", + "inifiband-xdr", + "t1", + "e1", + "t3", + "e3", + "cisco-stackwise", + "cisco-stackwise-plus", + "cisco-flexstack", + "cisco-flexstack-plus", + "juniper-vcp", + "extreme-summitstack", + "extreme-summitstack-128", + "extreme-summitstack-256", + "extreme-summitstack-512", + "other" + ] + }, + "enabled": { + "title": "Enabled", + "type": "boolean" + }, + "lag": { + "title": "Parent LAG", "type": "integer", - "readOnly": true + "x-nullable": true }, - "device": { - "$ref": "#/definitions/NestedDevice" + "mtu": { + "title": "MTU", + "type": "integer", + "maximum": 65536, + "minimum": 1, + "x-nullable": true }, - "name": { - "title": "Name", + "mac_address": { + "title": "MAC Address", "type": "string", - "maxLength": 50 + "x-nullable": true }, - "cs_port": { - "$ref": "#/definitions/ConsoleServerPort" + "mgmt_only": { + "title": "OOB Management", + "description": "This interface is used only for out-of-band management", + "type": "boolean" + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "connected_endpoint_type": { + "title": "Connected endpoint type", + "type": "string", + "readOnly": true + }, + "connected_endpoint": { + "title": "Connected endpoint", + "description": "\n Return the appropriate serializer for the type of connected object.\n ", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true }, "connection_status": { "title": "Connection status", @@ -13619,55 +20535,47 @@ false, true ] - } - } - }, - "ConsolePortTemplate": { - "required": [ - "device_type", - "name" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true }, - "device_type": { - "$ref": "#/definitions/NestedDeviceType" + "cable": { + "$ref": "#/definitions/NestedCable" }, - "name": { - "title": "Name", + "mode": { + "title": "Mode", "type": "string", - "maxLength": 50 - } - } - }, - "WritableConsolePortTemplate": { - "required": [ - "device_type", - "name" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", + "enum": [ + "access", + "tagged", + "tagged-all" + ] + }, + "untagged_vlan": { + "title": "Untagged VLAN", "type": "integer", - "readOnly": true + "x-nullable": true }, - "device_type": { - "title": "Device type", - "type": "integer" + "tagged_vlans": { + "type": "array", + "items": { + "title": "Tagged VLANs", + "type": "integer" + }, + "uniqueItems": true }, - "name": { - "title": "Name", + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "count_ipaddresses": { + "title": "Count ipaddresses", "type": "string", - "maxLength": 50 + "readOnly": true } } }, - "WritableConsolePort": { + "InventoryItem": { "required": [ "device", "name" @@ -13680,74 +20588,58 @@ "readOnly": true }, "device": { - "title": "Device", - "type": "integer" + "$ref": "#/definitions/NestedDevice" + }, + "parent": { + "title": "Parent", + "type": "integer", + "x-nullable": true }, "name": { "title": "Name", "type": "string", - "maxLength": 50 - }, - "cs_port": { - "title": "Console server port", - "type": "integer" + "maxLength": 50, + "minLength": 1 }, - "connection_status": { - "title": "Connection status", - "type": "boolean", - "enum": [ - false, - true - ] - } - } - }, - "ConsoleServerPortTemplate": { - "required": [ - "device_type", - "name" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true + "manufacturer": { + "$ref": "#/definitions/NestedManufacturer" }, - "device_type": { - "$ref": "#/definitions/NestedDeviceType" + "part_id": { + "title": "Part ID", + "type": "string", + "maxLength": 50 }, - "name": { - "title": "Name", + "serial": { + "title": "Serial number", "type": "string", "maxLength": 50 - } - } - }, - "WritableConsoleServerPortTemplate": { - "required": [ - "device_type", - "name" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true }, - "device_type": { - "title": "Device type", - "type": "integer" + "asset_tag": { + "title": "Asset tag", + "description": "A unique tag used to identify this item", + "type": "string", + "maxLength": 50, + "x-nullable": true }, - "name": { - "title": "Name", + "discovered": { + "title": "Discovered", + "type": "boolean" + }, + "description": { + "title": "Description", "type": "string", - "maxLength": 50 + "maxLength": 100 + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } } } }, - "WritableConsoleServerPort": { + "WritableInventoryItem": { "required": [ "device", "name" @@ -13763,17 +20655,61 @@ "title": "Device", "type": "integer" }, + "parent": { + "title": "Parent", + "type": "integer", + "x-nullable": true + }, "name": { "title": "Name", "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "manufacturer": { + "title": "Manufacturer", + "type": "integer", + "x-nullable": true + }, + "part_id": { + "title": "Part ID", + "type": "string", + "maxLength": 50 + }, + "serial": { + "title": "Serial number", + "type": "string", "maxLength": 50 + }, + "asset_tag": { + "title": "Asset tag", + "description": "A unique tag used to identify this item", + "type": "string", + "maxLength": 50, + "x-nullable": true + }, + "discovered": { + "title": "Discovered", + "type": "boolean" + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } } } }, - "DeviceBayTemplate": { + "Manufacturer": { "required": [ - "device_type", - "name" + "name", + "slug" ], "type": "object", "properties": { @@ -13782,20 +20718,41 @@ "type": "integer", "readOnly": true }, - "device_type": { - "$ref": "#/definitions/NestedDeviceType" - }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "devicetype_count": { + "title": "Devicetype count", + "type": "integer", + "readOnly": true + }, + "inventoryitem_count": { + "title": "Inventoryitem count", + "type": "integer", + "readOnly": true + }, + "platform_count": { + "title": "Platform count", + "type": "integer", + "readOnly": true } } }, - "WritableDeviceBayTemplate": { + "Platform": { "required": [ - "device_type", - "name" + "name", + "slug" ], "type": "object", "properties": { @@ -13804,22 +20761,51 @@ "type": "integer", "readOnly": true }, - "device_type": { - "title": "Device type", - "type": "integer" - }, "name": { "title": "Name", "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 100, + "minLength": 1 + }, + "manufacturer": { + "$ref": "#/definitions/NestedManufacturer" + }, + "napalm_driver": { + "title": "NAPALM driver", + "description": "The name of the NAPALM driver to use when interacting with devices", + "type": "string", "maxLength": 50 + }, + "napalm_args": { + "title": "NAPALM arguments", + "description": "Additional arguments to pass when initiating the NAPALM driver (JSON format)", + "type": "string", + "x-nullable": true + }, + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true + }, + "virtualmachine_count": { + "title": "Virtualmachine count", + "type": "integer", + "readOnly": true } } }, - "DeviceBay": { + "WritablePlatform": { "required": [ - "device", "name", - "installed_device" + "slug" ], "type": "object", "properties": { @@ -13828,20 +20814,51 @@ "type": "integer", "readOnly": true }, - "device": { - "$ref": "#/definitions/NestedDevice" - }, "name": { "title": "Name", "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 100, + "minLength": 1 + }, + "manufacturer": { + "title": "Manufacturer", + "description": "Optionally limit this platform to devices of a certain manufacturer", + "type": "integer", + "x-nullable": true + }, + "napalm_driver": { + "title": "NAPALM driver", + "description": "The name of the NAPALM driver to use when interacting with devices", + "type": "string", "maxLength": 50 }, - "installed_device": { - "$ref": "#/definitions/NestedDevice" + "napalm_args": { + "title": "NAPALM arguments", + "description": "Additional arguments to pass when initiating the NAPALM driver (JSON format)", + "type": "string", + "x-nullable": true + }, + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true + }, + "virtualmachine_count": { + "title": "Virtualmachine count", + "type": "integer", + "readOnly": true } } }, - "WritableDeviceBay": { + "PowerPort": { "required": [ "device", "name" @@ -13854,25 +20871,99 @@ "readOnly": true }, "device": { - "title": "Device", - "type": "integer" + "$ref": "#/definitions/NestedDevice" }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, - "installed_device": { - "title": "Installed device", - "type": "integer" + "type": { + "title": "Type", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "maximum_draw": { + "title": "Maximum draw", + "description": "Maximum power draw (watts)", + "type": "integer", + "maximum": 32767, + "minimum": 1, + "x-nullable": true + }, + "allocated_draw": { + "title": "Allocated draw", + "description": "Allocated power draw (watts)", + "type": "integer", + "maximum": 32767, + "minimum": 1, + "x-nullable": true + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "connected_endpoint_type": { + "title": "Connected endpoint type", + "type": "string", + "readOnly": true + }, + "connected_endpoint": { + "title": "Connected endpoint", + "description": "\n Return the appropriate serializer for the type of connected object.\n ", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, + "connection_status": { + "title": "Connection status", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "boolean", + "x-nullable": true + } + }, + "readOnly": true + }, + "cable": { + "$ref": "#/definitions/NestedCable" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } } } }, - "DeviceRole": { + "NestedPowerPanel": { + "title": "Power panel", "required": [ - "name", - "slug", - "color" + "name" ], "type": "object", "properties": { @@ -13881,38 +20972,29 @@ "type": "integer", "readOnly": true }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 50 - }, - "slug": { - "title": "Slug", + "url": { + "title": "Url", "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "format": "uri", + "readOnly": true }, - "color": { - "title": "Color", + "name": { + "title": "Name", "type": "string", - "pattern": "^[0-9a-f]{6}$", - "maxLength": 6 + "maxLength": 50, + "minLength": 1 }, - "vm_role": { - "title": "VM Role", - "description": "Virtual machines may be assigned to this role", - "type": "boolean" + "powerfeed_count": { + "title": "Powerfeed count", + "type": "integer", + "readOnly": true } } }, - "DeviceType": { + "PowerFeed": { "required": [ - "manufacturer", - "model", - "slug", - "interface_ordering", - "subdevice_role" + "power_panel", + "name" ], "type": "object", "properties": { @@ -13921,40 +21003,62 @@ "type": "integer", "readOnly": true }, - "manufacturer": { - "$ref": "#/definitions/NestedManufacturer" - }, - "model": { - "title": "Model", - "type": "string", - "maxLength": 50 + "power_panel": { + "$ref": "#/definitions/NestedPowerPanel" }, - "slug": { - "title": "Slug", - "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "rack": { + "$ref": "#/definitions/NestedRack" }, - "part_number": { - "title": "Part number", - "description": "Discrete part number (optional)", + "name": { + "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, - "u_height": { - "title": "Height (U)", - "type": "integer", - "maximum": 32767, - "minimum": 0 + "status": { + "title": "Status", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "default": { + "id": 1, + "label": "Active", + "value": "active" + } }, - "is_full_depth": { - "title": "Is full depth", - "description": "Device consumes both front and rear rack faces", - "type": "boolean" + "type": { + "title": "Type", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "default": { + "id": 1, + "label": "Primary", + "value": "primary" + } }, - "interface_ordering": { - "title": "Interface ordering", + "supply": { + "title": "Supply", "required": [ "label", "value" @@ -13965,27 +21069,17 @@ "type": "string" }, "value": { - "type": "integer" + "type": "string" } + }, + "default": { + "id": 1, + "label": "AC", + "value": "ac" } }, - "is_console_server": { - "title": "Is a console server", - "description": "This type of device has console server ports", - "type": "boolean" - }, - "is_pdu": { - "title": "Is a PDU", - "description": "This type of device has power outlets", - "type": "boolean" - }, - "is_network_device": { - "title": "Is a network device", - "description": "This type of device has network interfaces", - "type": "boolean" - }, - "subdevice_role": { - "title": "Subdevice role", + "phase": { + "title": "Phase", "required": [ "label", "value" @@ -13996,121 +21090,67 @@ "type": "string" }, "value": { - "type": "boolean", - "x-nullable": true + "type": "string" } + }, + "default": { + "id": 1, + "label": "Single phase", + "value": "single-phase" } }, - "comments": { - "title": "Comments", - "type": "string" - }, - "custom_fields": { - "title": "Custom fields", - "type": "object" - }, - "instance_count": { - "title": "Instance count", - "type": "integer", - "readOnly": true - } - } - }, - "WritableDeviceType": { - "required": [ - "manufacturer", - "model", - "slug" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", + "voltage": { + "title": "Voltage", "type": "integer", - "readOnly": true - }, - "manufacturer": { - "title": "Manufacturer", - "type": "integer" - }, - "model": { - "title": "Model", - "type": "string", - "maxLength": 50 - }, - "slug": { - "title": "Slug", - "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 - }, - "part_number": { - "title": "Part number", - "description": "Discrete part number (optional)", - "type": "string", - "maxLength": 50 + "maximum": 32767, + "minimum": 1 }, - "u_height": { - "title": "Height (U)", + "amperage": { + "title": "Amperage", "type": "integer", "maximum": 32767, - "minimum": 0 - }, - "is_full_depth": { - "title": "Is full depth", - "description": "Device consumes both front and rear rack faces", - "type": "boolean" + "minimum": 1 }, - "interface_ordering": { - "title": "Interface ordering", + "max_utilization": { + "title": "Max utilization", + "description": "Maximum permissible draw (percentage)", "type": "integer", - "enum": [ - 1, - 2 - ] - }, - "is_console_server": { - "title": "Is a console server", - "description": "This type of device has console server ports", - "type": "boolean" - }, - "is_pdu": { - "title": "Is a PDU", - "description": "This type of device has power outlets", - "type": "boolean" - }, - "is_network_device": { - "title": "Is a network device", - "description": "This type of device has network interfaces", - "type": "boolean" - }, - "subdevice_role": { - "title": "Parent/child status", - "description": "Parent devices house child devices in device bays. Select \"None\" if this device type is neither a parent nor a child.", - "type": "boolean", - "enum": [ - null, - true, - false - ], - "x-nullable": true + "maximum": 100, + "minimum": 1 }, "comments": { "title": "Comments", "type": "string" }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" + }, + "created": { + "title": "Created", + "type": "string", + "format": "date", + "readOnly": true + }, + "last_updated": { + "title": "Last updated", + "type": "string", + "format": "date-time", + "readOnly": true } } }, - "WritableDevice": { + "WritablePowerFeed": { "required": [ - "device_type", - "device_role", - "site" + "power_panel", + "name" ], "type": "object", "properties": { @@ -14119,105 +21159,85 @@ "type": "integer", "readOnly": true }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 64 - }, - "device_type": { - "title": "Device type", - "type": "integer" - }, - "device_role": { - "title": "Device role", - "type": "integer" - }, - "tenant": { - "title": "Tenant", - "type": "integer" - }, - "platform": { - "title": "Platform", - "type": "integer" - }, - "serial": { - "title": "Serial number", - "type": "string", - "maxLength": 50 - }, - "asset_tag": { - "title": "Asset tag", - "description": "A unique tag used to identify this device", - "type": "string", - "maxLength": 50 - }, - "site": { - "title": "Site", + "power_panel": { + "title": "Power panel", "type": "integer" }, "rack": { "title": "Rack", - "type": "integer" - }, - "position": { - "title": "Position (U)", - "description": "The lowest-numbered unit occupied by the device", "type": "integer", - "maximum": 32767, - "minimum": 1 + "x-nullable": true }, - "face": { - "title": "Rack face", - "type": "integer", - "enum": [ - 0, - 1 - ] + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 }, "status": { "title": "Status", - "type": "integer", + "type": "string", "enum": [ - 1, - 0, - 2, - 3, - 4, - 5 + "offline", + "active", + "planned", + "failed" ] }, - "primary_ip4": { - "title": "Primary IPv4", - "type": "integer" + "type": { + "title": "Type", + "type": "string", + "enum": [ + "primary", + "redundant" + ] }, - "primary_ip6": { - "title": "Primary IPv6", - "type": "integer" + "supply": { + "title": "Supply", + "type": "string", + "enum": [ + "ac", + "dc" + ] }, - "cluster": { - "title": "Cluster", - "type": "integer" + "phase": { + "title": "Phase", + "type": "string", + "enum": [ + "single-phase", + "three-phase" + ] }, - "virtual_chassis": { - "title": "Virtual chassis", - "type": "integer" + "voltage": { + "title": "Voltage", + "type": "integer", + "maximum": 32767, + "minimum": 1 }, - "vc_position": { - "title": "Vc position", + "amperage": { + "title": "Amperage", "type": "integer", - "maximum": 255, - "minimum": 0 + "maximum": 32767, + "minimum": 1 }, - "vc_priority": { - "title": "Vc priority", + "max_utilization": { + "title": "Max utilization", + "description": "Maximum permissible draw (percentage)", "type": "integer", - "maximum": 255, - "minimum": 0 + "maximum": 100, + "minimum": 1 }, "comments": { "title": "Comments", "type": "string" }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" @@ -14236,13 +21256,11 @@ } } }, - "PeerInterface": { - "title": "Interface a", + "PowerPortTemplate": { + "title": "Power port", "required": [ - "device", - "name", - "form_factor", - "lag" + "device_type", + "name" ], "type": "object", "properties": { @@ -14251,22 +21269,17 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true - }, - "device": { - "$ref": "#/definitions/NestedDevice" + "device_type": { + "$ref": "#/definitions/NestedDeviceType" }, "name": { "title": "Name", "type": "string", - "maxLength": 64 + "maxLength": 50, + "minLength": 1 }, - "form_factor": { - "title": "Form factor", + "type": { + "title": "Type", "required": [ "label", "value" @@ -14277,44 +21290,32 @@ "type": "string" }, "value": { - "type": "integer" + "type": "string" } } }, - "enabled": { - "title": "Enabled", - "type": "boolean" - }, - "lag": { - "$ref": "#/definitions/NestedInterface" - }, - "mtu": { - "title": "MTU", + "maximum_draw": { + "title": "Maximum draw", + "description": "Maximum power draw (watts)", "type": "integer", "maximum": 32767, - "minimum": 0 - }, - "mac_address": { - "title": "MAC Address", - "type": "string" - }, - "mgmt_only": { - "title": "OOB Management", - "description": "This interface is used only for out-of-band management", - "type": "boolean" + "minimum": 1, + "x-nullable": true }, - "description": { - "title": "Description", - "type": "string", - "maxLength": 100 + "allocated_draw": { + "title": "Allocated draw", + "description": "Allocated power draw (watts)", + "type": "integer", + "maximum": 32767, + "minimum": 1, + "x-nullable": true } } }, - "InterfaceConnection": { + "PowerOutletTemplate": { "required": [ - "interface_a", - "interface_b", - "connection_status" + "device_type", + "name" ], "type": "object", "properties": { @@ -14323,14 +21324,17 @@ "type": "integer", "readOnly": true }, - "interface_a": { - "$ref": "#/definitions/PeerInterface" + "device_type": { + "$ref": "#/definitions/NestedDeviceType" }, - "interface_b": { - "$ref": "#/definitions/PeerInterface" + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 }, - "connection_status": { - "title": "Connection status", + "type": { + "title": "Type", "required": [ "label", "value" @@ -14341,17 +21345,35 @@ "type": "string" }, "value": { - "type": "boolean", - "x-nullable": true + "type": "string" + } + } + }, + "power_port": { + "$ref": "#/definitions/PowerPortTemplate" + }, + "feed_leg": { + "title": "Feed leg", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" } } } } }, - "WritableInterfaceConnection": { + "WritablePowerOutletTemplate": { "required": [ - "interface_a", - "interface_b" + "device_type", + "name" ], "type": "object", "properties": { @@ -14360,29 +21382,90 @@ "type": "integer", "readOnly": true }, - "interface_a": { - "title": "Interface a", + "device_type": { + "title": "Device type", "type": "integer" }, - "interface_b": { - "title": "Interface b", - "type": "integer" + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 }, - "connection_status": { - "title": "Status", - "type": "boolean", + "type": { + "title": "Type", + "type": "string", "enum": [ - false, - true + "iec-60320-c5", + "iec-60320-c7", + "iec-60320-c13", + "iec-60320-c15", + "iec-60320-c19", + "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-5-15r", + "nema-5-20r", + "nema-5-30r", + "nema-5-50r", + "nema-6-15r", + "nema-6-20r", + "nema-6-30r", + "nema-6-50r", + "nema-l5-15r", + "nema-l5-20r", + "nema-l5-30r", + "nema-l5-50r", + "nema-l6-20r", + "nema-l6-30r", + "nema-l6-50r", + "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" + ] + }, + "power_port": { + "$ref": "#/definitions/PowerPortTemplate" + }, + "feed_leg": { + "title": "Feed leg", + "description": "Phase (for three-phase feeds)", + "type": "string", + "enum": [ + "A", + "B", + "C" ] } } }, - "InterfaceTemplate": { + "NestedPowerPort": { + "title": "Power port", "required": [ - "device_type", - "name", - "form_factor" + "name" ], "type": "object", "properties": { @@ -14391,16 +21474,28 @@ "type": "integer", "readOnly": true }, - "device_type": { - "$ref": "#/definitions/NestedDeviceType" + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "device": { + "$ref": "#/definitions/NestedDevice" }, "name": { "title": "Name", "type": "string", - "maxLength": 64 + "maxLength": 50, + "minLength": 1 + }, + "cable": { + "title": "Cable", + "type": "integer", + "x-nullable": true }, - "form_factor": { - "title": "Form factor", + "connection_status": { + "title": "Connection status", "required": [ "label", "value" @@ -14411,19 +21506,17 @@ "type": "string" }, "value": { - "type": "integer" + "type": "boolean", + "x-nullable": true } - } - }, - "mgmt_only": { - "title": "Management only", - "type": "boolean" + }, + "readOnly": true } } }, - "WritableInterfaceTemplate": { + "PowerOutlet": { "required": [ - "device_type", + "device", "name" ], "type": "object", @@ -14433,67 +21526,100 @@ "type": "integer", "readOnly": true }, - "device_type": { - "title": "Device type", - "type": "integer" + "device": { + "$ref": "#/definitions/NestedDevice" }, "name": { "title": "Name", "type": "string", - "maxLength": 64 + "maxLength": 50, + "minLength": 1 }, - "form_factor": { - "title": "Form factor", - "type": "integer", - "enum": [ - 0, - 200, - 800, - 1000, - 1150, - 1170, - 1050, - 1100, - 1200, - 1300, - 1310, - 1320, - 1350, - 1400, - 1500, - 1510, - 1520, - 1550, - 1600, - 2600, - 2610, - 2620, - 2630, - 2640, - 3010, - 3020, - 3040, - 3080, - 3160, - 4000, - 4010, - 4040, - 4050, - 5000, - 5050, - 5100, - 5150, - 5200, - 32767 - ] + "type": { + "title": "Type", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } }, - "mgmt_only": { - "title": "Management only", - "type": "boolean" + "power_port": { + "$ref": "#/definitions/NestedPowerPort" + }, + "feed_leg": { + "title": "Feed leg", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "connected_endpoint_type": { + "title": "Connected endpoint type", + "type": "string", + "readOnly": true + }, + "connected_endpoint": { + "title": "Connected endpoint", + "description": "\n Return the appropriate serializer for the type of connected object.\n ", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, + "connection_status": { + "title": "Connection status", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "boolean", + "x-nullable": true + } + }, + "readOnly": true + }, + "cable": { + "$ref": "#/definitions/NestedCable" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } } } }, - "WritableInterface": { + "WritablePowerOutlet": { "required": [ "device", "name" @@ -14512,110 +21638,162 @@ "name": { "title": "Name", "type": "string", - "maxLength": 64 + "maxLength": 50, + "minLength": 1 }, - "form_factor": { - "title": "Form factor", - "type": "integer", + "type": { + "title": "Type", + "type": "string", "enum": [ - 0, - 200, - 800, - 1000, - 1150, - 1170, - 1050, - 1100, - 1200, - 1300, - 1310, - 1320, - 1350, - 1400, - 1500, - 1510, - 1520, - 1550, - 1600, - 2600, - 2610, - 2620, - 2630, - 2640, - 3010, - 3020, - 3040, - 3080, - 3160, - 4000, - 4010, - 4040, - 4050, - 5000, - 5050, - 5100, - 5150, - 5200, - 32767 + "iec-60320-c5", + "iec-60320-c7", + "iec-60320-c13", + "iec-60320-c15", + "iec-60320-c19", + "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-5-15r", + "nema-5-20r", + "nema-5-30r", + "nema-5-50r", + "nema-6-15r", + "nema-6-20r", + "nema-6-30r", + "nema-6-50r", + "nema-l5-15r", + "nema-l5-20r", + "nema-l5-30r", + "nema-l5-50r", + "nema-l6-20r", + "nema-l6-30r", + "nema-l6-50r", + "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" ] }, - "enabled": { - "title": "Enabled", - "type": "boolean" - }, - "lag": { - "title": "Parent LAG", - "type": "integer" - }, - "mtu": { - "title": "MTU", + "power_port": { + "title": "Power port", "type": "integer", - "maximum": 32767, - "minimum": 0 - }, - "mac_address": { - "title": "MAC Address", - "type": "string" + "x-nullable": true }, - "mgmt_only": { - "title": "OOB Management", - "description": "This interface is used only for out-of-band management", - "type": "boolean" + "feed_leg": { + "title": "Feed leg", + "description": "Phase (for three-phase feeds)", + "type": "string", + "enum": [ + "A", + "B", + "C" + ] }, "description": { "title": "Description", "type": "string", "maxLength": 100 }, - "mode": { - "title": "Mode", - "type": "integer", + "connected_endpoint_type": { + "title": "Connected endpoint type", + "type": "string", + "readOnly": true + }, + "connected_endpoint": { + "title": "Connected endpoint", + "description": "\n Return the appropriate serializer for the type of connected object.\n ", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, + "connection_status": { + "title": "Connection status", + "type": "boolean", "enum": [ - 100, - 200, - 300 + false, + true ] }, - "untagged_vlan": { - "title": "Untagged VLAN", - "type": "integer" + "cable": { + "$ref": "#/definitions/NestedCable" }, - "tagged_vlans": { + "tags": { "type": "array", "items": { - "title": "Tagged VLANs", - "type": "integer" - }, - "uniqueItems": true + "type": "string", + "minLength": 1 + } } } }, - "InventoryItem": { + "NestedRackGroup": { + "title": "Rack group", "required": [ - "device", - "parent", "name", - "manufacturer" + "slug" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "rack_count": { + "title": "Rack count", + "type": "integer", + "readOnly": true + } + } + }, + "PowerPanel": { + "required": [ + "site", + "name" ], "type": "object", "properties": { @@ -14624,51 +21802,28 @@ "type": "integer", "readOnly": true }, - "device": { - "$ref": "#/definitions/NestedDevice" + "site": { + "$ref": "#/definitions/NestedSite" }, - "parent": { - "title": "Parent", - "type": "integer" + "rack_group": { + "$ref": "#/definitions/NestedRackGroup" }, "name": { "title": "Name", "type": "string", - "maxLength": 50 - }, - "manufacturer": { - "$ref": "#/definitions/NestedManufacturer" - }, - "part_id": { - "title": "Part ID", - "type": "string", - "maxLength": 50 - }, - "serial": { - "title": "Serial number", - "type": "string", - "maxLength": 50 - }, - "asset_tag": { - "title": "Asset tag", - "description": "A unique tag used to identify this item", - "type": "string", - "maxLength": 50 - }, - "discovered": { - "title": "Discovered", - "type": "boolean" + "maxLength": 50, + "minLength": 1 }, - "description": { - "title": "Description", - "type": "string", - "maxLength": 100 + "powerfeed_count": { + "title": "Powerfeed count", + "type": "integer", + "readOnly": true } } }, - "WritableInventoryItem": { + "WritablePowerPanel": { "required": [ - "device", + "site", "name" ], "type": "object", @@ -14678,54 +21833,32 @@ "type": "integer", "readOnly": true }, - "device": { - "title": "Device", + "site": { + "title": "Site", "type": "integer" }, - "parent": { - "title": "Parent", - "type": "integer" + "rack_group": { + "title": "Rack group", + "type": "integer", + "x-nullable": true }, "name": { "title": "Name", "type": "string", - "maxLength": 50 - }, - "manufacturer": { - "title": "Manufacturer", - "type": "integer" - }, - "part_id": { - "title": "Part ID", - "type": "string", - "maxLength": 50 - }, - "serial": { - "title": "Serial number", - "type": "string", - "maxLength": 50 - }, - "asset_tag": { - "title": "Asset tag", - "description": "A unique tag used to identify this item", - "type": "string", - "maxLength": 50 - }, - "discovered": { - "title": "Discovered", - "type": "boolean" + "maxLength": 50, + "minLength": 1 }, - "description": { - "title": "Description", - "type": "string", - "maxLength": 100 + "powerfeed_count": { + "title": "Powerfeed count", + "type": "integer", + "readOnly": true } } }, - "Manufacturer": { + "WritablePowerPortTemplate": { "required": [ - "name", - "slug" + "device_type", + "name" ], "type": "object", "properties": { @@ -14734,25 +21867,94 @@ "type": "integer", "readOnly": true }, + "device_type": { + "title": "Device type", + "type": "integer" + }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, - "slug": { - "title": "Slug", + "type": { + "title": "Type", "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "enum": [ + "iec-60320-c6", + "iec-60320-c8", + "iec-60320-c14", + "iec-60320-c16", + "iec-60320-c20", + "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-5-15p", + "nema-5-20p", + "nema-5-30p", + "nema-5-50p", + "nema-6-15p", + "nema-6-20p", + "nema-6-30p", + "nema-6-50p", + "nema-l5-15p", + "nema-l5-20p", + "nema-l5-30p", + "nema-l5-50p", + "nema-l6-20p", + "nema-l6-30p", + "nema-l6-50p", + "cs6361c", + "cs6365c", + "cs8165c", + "cs8265c", + "cs8365c", + "cs8465c", + "ita-e", + "ita-f", + "ita-ef", + "ita-g", + "ita-h", + "ita-i", + "ita-j", + "ita-k", + "ita-l", + "ita-m", + "ita-n", + "ita-o" + ] + }, + "maximum_draw": { + "title": "Maximum draw", + "description": "Maximum power draw (watts)", + "type": "integer", + "maximum": 32767, + "minimum": 1, + "x-nullable": true + }, + "allocated_draw": { + "title": "Allocated draw", + "description": "Allocated power draw (watts)", + "type": "integer", + "maximum": 32767, + "minimum": 1, + "x-nullable": true } } }, - "Platform": { + "WritablePowerPort": { "required": [ - "name", - "slug", - "manufacturer" + "device", + "name" ], "type": "object", "properties": { @@ -14761,42 +21963,132 @@ "type": "integer", "readOnly": true }, + "device": { + "title": "Device", + "type": "integer" + }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, - "slug": { - "title": "Slug", + "type": { + "title": "Type", "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "enum": [ + "iec-60320-c6", + "iec-60320-c8", + "iec-60320-c14", + "iec-60320-c16", + "iec-60320-c20", + "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-5-15p", + "nema-5-20p", + "nema-5-30p", + "nema-5-50p", + "nema-6-15p", + "nema-6-20p", + "nema-6-30p", + "nema-6-50p", + "nema-l5-15p", + "nema-l5-20p", + "nema-l5-30p", + "nema-l5-50p", + "nema-l6-20p", + "nema-l6-30p", + "nema-l6-50p", + "cs6361c", + "cs6365c", + "cs8165c", + "cs8265c", + "cs8365c", + "cs8465c", + "ita-e", + "ita-f", + "ita-ef", + "ita-g", + "ita-h", + "ita-i", + "ita-j", + "ita-k", + "ita-l", + "ita-m", + "ita-n", + "ita-o" + ] }, - "manufacturer": { - "$ref": "#/definitions/NestedManufacturer" + "maximum_draw": { + "title": "Maximum draw", + "description": "Maximum power draw (watts)", + "type": "integer", + "maximum": 32767, + "minimum": 1, + "x-nullable": true }, - "napalm_driver": { - "title": "NAPALM driver", - "description": "The name of the NAPALM driver to use when interacting with devices", + "allocated_draw": { + "title": "Allocated draw", + "description": "Allocated power draw (watts)", + "type": "integer", + "maximum": 32767, + "minimum": 1, + "x-nullable": true + }, + "description": { + "title": "Description", "type": "string", - "maxLength": 50 + "maxLength": 100 }, - "rpc_client": { - "title": "Legacy RPC client", + "connected_endpoint_type": { + "title": "Connected endpoint type", "type": "string", + "readOnly": true + }, + "connected_endpoint": { + "title": "Connected endpoint", + "description": "\n Return the appropriate serializer for the type of connected object.\n ", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, + "connection_status": { + "title": "Connection status", + "type": "boolean", "enum": [ - "juniper-junos", - "cisco-ios", - "opengear" + false, + true ] + }, + "cable": { + "$ref": "#/definitions/NestedCable" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } } } }, - "WritablePlatform": { + "RackGroup": { "required": [ "name", - "slug" + "slug", + "site" ], "type": "object", "properties": { @@ -14808,42 +22100,32 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 - }, - "manufacturer": { - "title": "Manufacturer", - "description": "Optionally limit this platform to devices of a certain manufacturer", - "type": "integer" + "maxLength": 50, + "minLength": 1 }, - "napalm_driver": { - "title": "NAPALM driver", - "description": "The name of the NAPALM driver to use when interacting with devices", - "type": "string", - "maxLength": 50 + "site": { + "$ref": "#/definitions/NestedSite" }, - "rpc_client": { - "title": "Legacy RPC client", - "type": "string", - "enum": [ - "juniper-junos", - "cisco-ios", - "opengear" - ] + "rack_count": { + "title": "Rack count", + "type": "integer", + "readOnly": true } } }, - "PowerOutlet": { - "title": "Power outlet", + "WritableRackGroup": { "required": [ - "device", - "name" + "name", + "slug", + "site" ], "type": "object", "properties": { @@ -14852,26 +22134,35 @@ "type": "integer", "readOnly": true }, - "device": { - "$ref": "#/definitions/NestedDevice" - }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, - "connected_port": { - "title": "Connected port", + "slug": { + "title": "Slug", "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "site": { + "title": "Site", + "type": "integer" + }, + "rack_count": { + "title": "Rack count", + "type": "integer", "readOnly": true } } }, - "PowerPort": { + "NestedUser": { + "title": "User", "required": [ - "device", - "name", - "power_outlet" + "username" ], "type": "object", "properties": { @@ -14880,31 +22171,22 @@ "type": "integer", "readOnly": true }, - "device": { - "$ref": "#/definitions/NestedDevice" - }, - "name": { - "title": "Name", + "username": { + "title": "Username", + "description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.", "type": "string", - "maxLength": 50 - }, - "power_outlet": { - "$ref": "#/definitions/PowerOutlet" - }, - "connection_status": { - "title": "Connection status", - "type": "boolean", - "enum": [ - false, - true - ] + "pattern": "^[\\w.@+-]+$", + "maxLength": 150, + "minLength": 1 } } }, - "PowerOutletTemplate": { + "RackReservation": { "required": [ - "device_type", - "name" + "rack", + "units", + "user", + "description" ], "type": "object", "properties": { @@ -14913,20 +22195,44 @@ "type": "integer", "readOnly": true }, - "device_type": { - "$ref": "#/definitions/NestedDeviceType" + "rack": { + "$ref": "#/definitions/NestedRack" + }, + "units": { + "type": "array", + "items": { + "title": "Units", + "type": "integer", + "maximum": 32767, + "minimum": 0 + } + }, + "created": { + "title": "Created", + "type": "string", + "format": "date", + "readOnly": true + }, + "user": { + "$ref": "#/definitions/NestedUser" }, - "name": { - "title": "Name", + "tenant": { + "$ref": "#/definitions/NestedTenant" + }, + "description": { + "title": "Description", "type": "string", - "maxLength": 50 + "maxLength": 100, + "minLength": 1 } } }, - "WritablePowerOutletTemplate": { + "WritableRackReservation": { "required": [ - "device_type", - "name" + "rack", + "units", + "user", + "description" ], "type": "object", "properties": { @@ -14935,21 +22241,47 @@ "type": "integer", "readOnly": true }, - "device_type": { - "title": "Device type", + "rack": { + "title": "Rack", "type": "integer" }, - "name": { - "title": "Name", + "units": { + "type": "array", + "items": { + "title": "Units", + "type": "integer", + "maximum": 32767, + "minimum": 0 + } + }, + "created": { + "title": "Created", "type": "string", - "maxLength": 50 + "format": "date", + "readOnly": true + }, + "user": { + "title": "User", + "type": "integer" + }, + "tenant": { + "title": "Tenant", + "type": "integer", + "x-nullable": true + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100, + "minLength": 1 } } }, - "WritablePowerOutlet": { + "RackRole": { "required": [ - "device", - "name" + "name", + "slug", + "color" ], "type": "object", "properties": { @@ -14958,21 +22290,44 @@ "type": "integer", "readOnly": true }, - "device": { - "title": "Device", - "type": "integer" - }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "color": { + "title": "Color", + "type": "string", + "pattern": "^[0-9a-f]{6}$", + "maxLength": 6, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "rack_count": { + "title": "Rack count", + "type": "integer", + "readOnly": true } } }, - "PowerPortTemplate": { + "NestedRackRole": { + "title": "Role", "required": [ - "device_type", - "name" + "name", + "slug" ], "type": "object", "properties": { @@ -14981,20 +22336,37 @@ "type": "integer", "readOnly": true }, - "device_type": { - "$ref": "#/definitions/NestedDeviceType" + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "rack_count": { + "title": "Rack count", + "type": "integer", + "readOnly": true } } }, - "WritablePowerPortTemplate": { + "Rack": { "required": [ - "device_type", - "name" + "name", + "site" ], "type": "object", "properties": { @@ -15003,56 +22375,178 @@ "type": "integer", "readOnly": true }, - "device_type": { - "title": "Device type", - "type": "integer" - }, "name": { "title": "Name", "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "facility_id": { + "title": "Facility ID", + "type": "string", + "maxLength": 50, + "x-nullable": true + }, + "display_name": { + "title": "Display name", + "type": "string", + "readOnly": true + }, + "site": { + "$ref": "#/definitions/NestedSite" + }, + "group": { + "$ref": "#/definitions/NestedRackGroup" + }, + "tenant": { + "$ref": "#/definitions/NestedTenant" + }, + "status": { + "title": "Status", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "role": { + "$ref": "#/definitions/NestedRackRole" + }, + "serial": { + "title": "Serial number", + "type": "string", "maxLength": 50 - } - } - }, - "WritablePowerPort": { - "required": [ - "device", - "name" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", + }, + "asset_tag": { + "title": "Asset tag", + "description": "A unique tag used to identify this rack", + "type": "string", + "maxLength": 50, + "x-nullable": true + }, + "type": { + "title": "Type", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "width": { + "title": "Width", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "u_height": { + "title": "Height (U)", "type": "integer", - "readOnly": true + "maximum": 100, + "minimum": 1 + }, + "desc_units": { + "title": "Descending units", + "description": "Units are numbered top-to-bottom", + "type": "boolean" + }, + "outer_width": { + "title": "Outer width", + "type": "integer", + "maximum": 32767, + "minimum": 0, + "x-nullable": true + }, + "outer_depth": { + "title": "Outer depth", + "type": "integer", + "maximum": 32767, + "minimum": 0, + "x-nullable": true + }, + "outer_unit": { + "title": "Outer unit", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "comments": { + "title": "Comments", + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "custom_fields": { + "title": "Custom fields", + "type": "object" }, - "device": { - "title": "Device", - "type": "integer" + "created": { + "title": "Created", + "type": "string", + "format": "date", + "readOnly": true }, - "name": { - "title": "Name", + "last_updated": { + "title": "Last updated", "type": "string", - "maxLength": 50 + "format": "date-time", + "readOnly": true }, - "power_outlet": { - "title": "Power outlet", - "type": "integer" + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true }, - "connection_status": { - "title": "Connection status", - "type": "boolean", - "enum": [ - false, - true - ] + "powerfeed_count": { + "title": "Powerfeed count", + "type": "integer", + "readOnly": true } } }, - "RackGroup": { + "WritableRack": { "required": [ "name", - "slug", "site" ], "type": "object", @@ -15065,194 +22559,195 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, - "slug": { - "title": "Slug", + "facility_id": { + "title": "Facility ID", "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "x-nullable": true + }, + "display_name": { + "title": "Display name", + "type": "string", + "readOnly": true }, "site": { - "$ref": "#/definitions/NestedSite" - } - } - }, - "WritableRackGroup": { - "required": [ - "name", - "slug", - "site" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", + "title": "Site", + "type": "integer" + }, + "group": { + "title": "Group", "type": "integer", - "readOnly": true + "x-nullable": true }, - "name": { - "title": "Name", + "tenant": { + "title": "Tenant", + "type": "integer", + "x-nullable": true + }, + "status": { + "title": "Status", "type": "string", - "maxLength": 50 + "enum": [ + "reserved", + "available", + "planned", + "active", + "deprecated" + ] }, - "slug": { - "title": "Slug", + "role": { + "title": "Role", + "type": "integer", + "x-nullable": true + }, + "serial": { + "title": "Serial number", "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", "maxLength": 50 }, - "site": { - "title": "Site", - "type": "integer" - } - } - }, - "NestedUser": { - "title": "User", - "required": [ - "username" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true + "asset_tag": { + "title": "Asset tag", + "description": "A unique tag used to identify this rack", + "type": "string", + "maxLength": 50, + "x-nullable": true }, - "username": { - "title": "Username", - "description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.", + "type": { + "title": "Type", "type": "string", - "pattern": "^[\\w.@+-]+$", - "maxLength": 150 - } - } - }, - "RackReservation": { - "required": [ - "rack", - "units", - "user", - "tenant", - "description" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", + "enum": [ + "2-post-frame", + "4-post-frame", + "4-post-cabinet", + "wall-frame", + "wall-cabinet" + ] + }, + "width": { + "title": "Width", + "description": "Rail-to-rail width", "type": "integer", - "readOnly": true + "enum": [ + 19, + 23 + ] }, - "rack": { - "$ref": "#/definitions/NestedRack" + "u_height": { + "title": "Height (U)", + "type": "integer", + "maximum": 100, + "minimum": 1 }, - "units": { + "desc_units": { + "title": "Descending units", + "description": "Units are numbered top-to-bottom", + "type": "boolean" + }, + "outer_width": { + "title": "Outer width", + "type": "integer", + "maximum": 32767, + "minimum": 0, + "x-nullable": true + }, + "outer_depth": { + "title": "Outer depth", + "type": "integer", + "maximum": 32767, + "minimum": 0, + "x-nullable": true + }, + "outer_unit": { + "title": "Outer unit", + "type": "string", + "enum": [ + "mm", + "in" + ] + }, + "comments": { + "title": "Comments", + "type": "string" + }, + "tags": { "type": "array", "items": { - "title": "Units", - "type": "integer", - "maximum": 32767, - "minimum": 0 + "type": "string", + "minLength": 1 } }, + "custom_fields": { + "title": "Custom fields", + "type": "object" + }, "created": { "title": "Created", "type": "string", - "format": "date-time", + "format": "date", "readOnly": true }, - "user": { - "$ref": "#/definitions/NestedUser" - }, - "tenant": { - "$ref": "#/definitions/NestedTenant" - }, - "description": { - "title": "Description", + "last_updated": { + "title": "Last updated", "type": "string", - "maxLength": 100 - } - } - }, - "WritableRackReservation": { - "required": [ - "rack", - "units", - "user", - "description" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", + "format": "date-time", "readOnly": true }, - "rack": { - "title": "Rack", - "type": "integer" - }, - "units": { - "type": "array", - "items": { - "title": "Units", - "type": "integer", - "maximum": 32767, - "minimum": 0 - } - }, - "user": { - "title": "User", - "type": "integer" + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true }, - "description": { - "title": "Description", - "type": "string", - "maxLength": 100 + "powerfeed_count": { + "title": "Powerfeed count", + "type": "integer", + "readOnly": true } } }, - "RackRole": { - "required": [ - "name", - "slug", - "color" - ], + "RackUnit": { "type": "object", "properties": { "id": { - "title": "ID", + "title": "Id", "type": "integer", "readOnly": true }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "readOnly": true, + "minLength": 1 }, - "slug": { - "title": "Slug", - "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "face": { + "title": "Face", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "readOnly": true }, - "color": { - "title": "Color", - "type": "string", - "pattern": "^[0-9a-f]{6}$", - "maxLength": 6 + "device": { + "$ref": "#/definitions/NestedDevice" } } }, - "NestedRackGroup": { - "title": "Group", + "RearPortTemplate": { "required": [ + "device_type", "name", - "slug" + "type" ], "type": "object", "properties": { @@ -15261,31 +22756,44 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true + "device_type": { + "$ref": "#/definitions/NestedDeviceType" }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 64, + "minLength": 1 }, - "slug": { - "title": "Slug", - "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "type": { + "title": "Type", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "positions": { + "title": "Positions", + "type": "integer", + "maximum": 64, + "minimum": 1 } } }, - "NestedRackRole": { - "title": "Role", + "WritableRearPortTemplate": { "required": [ + "device_type", "name", - "slug" + "type" ], "type": "object", "properties": { @@ -15294,36 +22802,48 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true + "device_type": { + "title": "Device type", + "type": "integer" }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 64, + "minLength": 1 }, - "slug": { - "title": "Slug", + "type": { + "title": "Type", "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "enum": [ + "8p8c", + "110-punch", + "bnc", + "fc", + "lc", + "lc-apc", + "lsh", + "lsh-apc", + "mpo", + "mtrj", + "sc", + "sc-apc", + "st" + ] + }, + "positions": { + "title": "Positions", + "type": "integer", + "maximum": 64, + "minimum": 1 } } }, - "Rack": { + "RearPort": { "required": [ + "device", "name", - "facility_id", - "site", - "group", - "tenant", - "role", - "type", - "width" + "type" ], "type": "object", "properties": { @@ -15332,37 +22852,14 @@ "type": "integer", "readOnly": true }, + "device": { + "$ref": "#/definitions/NestedDevice" + }, "name": { "title": "Name", "type": "string", - "maxLength": 50 - }, - "facility_id": { - "title": "Facility ID", - "type": "string", - "maxLength": 50 - }, - "display_name": { - "title": "Display name", - "type": "string", - "readOnly": true - }, - "site": { - "$ref": "#/definitions/NestedSite" - }, - "group": { - "$ref": "#/definitions/NestedRackGroup" - }, - "tenant": { - "$ref": "#/definitions/NestedTenant" - }, - "role": { - "$ref": "#/definitions/NestedRackRole" - }, - "serial": { - "title": "Serial number", - "type": "string", - "maxLength": 50 + "maxLength": 64, + "minLength": 1 }, "type": { "title": "Type", @@ -15376,63 +22873,38 @@ "type": "string" }, "value": { - "type": "integer" - } - } - }, - "width": { - "title": "Width", - "required": [ - "label", - "value" - ], - "type": "object", - "properties": { - "label": { "type": "string" - }, - "value": { - "type": "integer" } } }, - "u_height": { - "title": "Height (U)", + "positions": { + "title": "Positions", "type": "integer", - "maximum": 100, + "maximum": 64, "minimum": 1 }, - "desc_units": { - "title": "Descending units", - "description": "Units are numbered top-to-bottom", - "type": "boolean" - }, - "comments": { - "title": "Comments", - "type": "string" - }, - "custom_fields": { - "title": "Custom fields", - "type": "object" - }, - "created": { - "title": "Created", + "description": { + "title": "Description", "type": "string", - "format": "date", - "readOnly": true + "maxLength": 100 }, - "last_updated": { - "title": "Last updated", - "type": "string", - "format": "date-time", - "readOnly": true + "cable": { + "$ref": "#/definitions/NestedCable" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } } } }, - "WritableRack": { + "WritableRearPort": { "required": [ + "device", "name", - "site" + "type" ], "type": "object", "properties": { @@ -15441,87 +22913,55 @@ "type": "integer", "readOnly": true }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 50 - }, - "facility_id": { - "title": "Facility ID", - "type": "string", - "maxLength": 50 - }, - "site": { - "title": "Site", - "type": "integer" - }, - "group": { - "title": "Group", - "type": "integer" - }, - "tenant": { - "title": "Tenant", - "type": "integer" - }, - "role": { - "title": "Role", + "device": { + "title": "Device", "type": "integer" }, - "serial": { - "title": "Serial number", + "name": { + "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 64, + "minLength": 1 }, "type": { "title": "Type", - "type": "integer", - "enum": [ - 100, - 200, - 300, - 1000, - 1100 - ] - }, - "width": { - "title": "Width", - "description": "Rail-to-rail width", - "type": "integer", + "type": "string", "enum": [ - 19, - 23 + "8p8c", + "110-punch", + "bnc", + "fc", + "lc", + "lc-apc", + "lsh", + "lsh-apc", + "mpo", + "mtrj", + "sc", + "sc-apc", + "st" ] }, - "u_height": { - "title": "Height (U)", + "positions": { + "title": "Positions", "type": "integer", - "maximum": 100, + "maximum": 64, "minimum": 1 }, - "desc_units": { - "title": "Descending units", - "description": "Units are numbered top-to-bottom", - "type": "boolean" - }, - "comments": { - "title": "Comments", - "type": "string" - }, - "custom_fields": { - "title": "Custom fields", - "type": "object" - }, - "created": { - "title": "Created", + "description": { + "title": "Description", "type": "string", - "format": "date", - "readOnly": true + "maxLength": 100 }, - "last_updated": { - "title": "Last updated", - "type": "string", - "format": "date-time", - "readOnly": true + "cable": { + "$ref": "#/definitions/NestedCable" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } } } }, @@ -15547,22 +22987,28 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "site_count": { + "title": "Site count", + "type": "integer", + "readOnly": true } } }, "Region": { "required": [ "name", - "slug", - "parent" + "slug" ], "type": "object", "properties": { @@ -15574,17 +23020,24 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "parent": { "$ref": "#/definitions/NestedRegion" + }, + "site_count": { + "title": "Site count", + "type": "integer", + "readOnly": true } } }, @@ -15603,28 +23056,33 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "parent": { "title": "Parent", - "type": "integer" + "type": "integer", + "x-nullable": true + }, + "site_count": { + "title": "Site count", + "type": "integer", + "readOnly": true } } }, "Site": { "required": [ "name", - "slug", - "status", - "region", - "tenant" + "slug" ], "type": "object", "properties": { @@ -15636,14 +23094,16 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "status": { "title": "Status", @@ -15657,7 +23117,7 @@ "type": "string" }, "value": { - "type": "integer" + "type": "string" } } }, @@ -15676,7 +23136,8 @@ "title": "ASN", "type": "integer", "maximum": 4294967295, - "minimum": 1 + "minimum": 1, + "x-nullable": true }, "time_zone": { "title": "Time zone", @@ -15697,6 +23158,18 @@ "type": "string", "maxLength": 200 }, + "latitude": { + "title": "Latitude", + "type": "string", + "format": "decimal", + "x-nullable": true + }, + "longitude": { + "title": "Longitude", + "type": "string", + "format": "decimal", + "x-nullable": true + }, "contact_name": { "title": "Contact name", "type": "string", @@ -15717,6 +23190,13 @@ "title": "Comments", "type": "string" }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" @@ -15733,29 +23213,34 @@ "format": "date-time", "readOnly": true }, - "count_prefixes": { - "title": "Count prefixes", - "type": "string", + "circuit_count": { + "title": "Circuit count", + "type": "integer", "readOnly": true }, - "count_vlans": { - "title": "Count vlans", - "type": "string", + "device_count": { + "title": "Device count", + "type": "integer", "readOnly": true }, - "count_racks": { - "title": "Count racks", - "type": "string", + "prefix_count": { + "title": "Prefix count", + "type": "integer", "readOnly": true }, - "count_devices": { - "title": "Count devices", - "type": "string", + "rack_count": { + "title": "Rack count", + "type": "integer", "readOnly": true }, - "count_circuits": { - "title": "Count circuits", - "type": "string", + "virtualmachine_count": { + "title": "Virtualmachine count", + "type": "integer", + "readOnly": true + }, + "vlan_count": { + "title": "Vlan count", + "type": "integer", "readOnly": true } } @@ -15775,31 +23260,35 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "status": { "title": "Status", - "type": "integer", + "type": "string", "enum": [ - 1, - 2, - 4 + "active", + "planned", + "retired" ] }, "region": { "title": "Region", - "type": "integer" + "type": "integer", + "x-nullable": true }, "tenant": { "title": "Tenant", - "type": "integer" + "type": "integer", + "x-nullable": true }, "facility": { "title": "Facility", @@ -15810,7 +23299,8 @@ "title": "ASN", "type": "integer", "maximum": 4294967295, - "minimum": 1 + "minimum": 1, + "x-nullable": true }, "time_zone": { "title": "Time zone", @@ -15831,6 +23321,18 @@ "type": "string", "maxLength": 200 }, + "latitude": { + "title": "Latitude", + "type": "string", + "format": "decimal", + "x-nullable": true + }, + "longitude": { + "title": "Longitude", + "type": "string", + "format": "decimal", + "x-nullable": true + }, "contact_name": { "title": "Contact name", "type": "string", @@ -15851,6 +23353,13 @@ "title": "Comments", "type": "string" }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" @@ -15866,6 +23375,36 @@ "type": "string", "format": "date-time", "readOnly": true + }, + "circuit_count": { + "title": "Circuit count", + "type": "integer", + "readOnly": true + }, + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true + }, + "prefix_count": { + "title": "Prefix count", + "type": "integer", + "readOnly": true + }, + "rack_count": { + "title": "Rack count", + "type": "integer", + "readOnly": true + }, + "virtualmachine_count": { + "title": "Virtualmachine count", + "type": "integer", + "readOnly": true + }, + "vlan_count": { + "title": "Vlan count", + "type": "integer", + "readOnly": true } } }, @@ -15887,6 +23426,18 @@ "title": "Domain", "type": "string", "maxLength": 30 + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "member_count": { + "title": "Member count", + "type": "integer", + "readOnly": true } } }, @@ -15905,10 +23456,241 @@ "title": "Master", "type": "integer" }, - "domain": { - "title": "Domain", - "type": "string", - "maxLength": 30 + "domain": { + "title": "Domain", + "type": "string", + "maxLength": 30 + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "member_count": { + "title": "Member count", + "type": "integer", + "readOnly": true + } + } + }, + "NestedTenantGroup": { + "required": [ + "name", + "slug" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50, + "minLength": 1 + }, + "tenant_count": { + "title": "Tenant count", + "type": "integer", + "readOnly": true + } + } + }, + "ConfigContext": { + "required": [ + "name", + "data" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "weight": { + "title": "Weight", + "type": "integer", + "maximum": 32767, + "minimum": 0 + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "is_active": { + "title": "Is active", + "type": "boolean" + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/NestedRegion" + }, + "uniqueItems": true + }, + "sites": { + "type": "array", + "items": { + "$ref": "#/definitions/NestedSite" + }, + "uniqueItems": true + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/NestedDeviceRole" + }, + "uniqueItems": true + }, + "platforms": { + "type": "array", + "items": { + "$ref": "#/definitions/NestedPlatform" + }, + "uniqueItems": true + }, + "tenant_groups": { + "type": "array", + "items": { + "$ref": "#/definitions/NestedTenantGroup" + }, + "uniqueItems": true + }, + "tenants": { + "type": "array", + "items": { + "$ref": "#/definitions/NestedTenant" + }, + "uniqueItems": true + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$" + }, + "uniqueItems": true + }, + "data": { + "title": "Data", + "type": "string" + } + } + }, + "WritableConfigContext": { + "required": [ + "name", + "data" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "weight": { + "title": "Weight", + "type": "integer", + "maximum": 32767, + "minimum": 0 + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "is_active": { + "title": "Is active", + "type": "boolean" + }, + "regions": { + "type": "array", + "items": { + "type": "integer" + }, + "uniqueItems": true + }, + "sites": { + "type": "array", + "items": { + "type": "integer" + }, + "uniqueItems": true + }, + "roles": { + "type": "array", + "items": { + "type": "integer" + }, + "uniqueItems": true + }, + "platforms": { + "type": "array", + "items": { + "type": "integer" + }, + "uniqueItems": true + }, + "tenant_groups": { + "type": "array", + "items": { + "type": "integer" + }, + "uniqueItems": true + }, + "tenants": { + "type": "array", + "items": { + "type": "integer" + }, + "uniqueItems": true + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$" + }, + "uniqueItems": true + }, + "data": { + "title": "Data", + "type": "string" } } }, @@ -15932,34 +23714,60 @@ "name": { "title": "Name", "type": "string", - "maxLength": 100 + "maxLength": 100, + "minLength": 1 }, "description": { "title": "Description", "type": "string", "maxLength": 200 }, + "template_language": { + "title": "Template language", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "default": { + "id": 20, + "label": "Jinja2", + "value": "jinja2" + } + }, "template_code": { "title": "Template code", - "type": "string" + "description": "The list of objects being exported is passed as a context variable named <code>queryset</code>.", + "type": "string", + "minLength": 1 }, "mime_type": { - "title": "Mime type", + "title": "MIME type", + "description": "Defaults to <code>text/plain</code>", "type": "string", - "maxLength": 15 + "maxLength": 50 }, "file_extension": { "title": "File extension", + "description": "Extension to append to the rendered filename", "type": "string", "maxLength": 15 } } }, - "Graph": { + "WritableExportTemplate": { "required": [ - "type", + "content_type", "name", - "source" + "template_code" ], "type": "object", "properties": { @@ -15968,47 +23776,50 @@ "type": "integer", "readOnly": true }, - "type": { - "title": "Type", - "required": [ - "label", - "value" - ], - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "value": { - "type": "integer" - } - } - }, - "weight": { - "title": "Weight", - "type": "integer", - "maximum": 32767, - "minimum": 0 + "content_type": { + "title": "Content type", + "type": "integer" }, "name": { "title": "Name", "type": "string", - "maxLength": 100 + "maxLength": 100, + "minLength": 1 }, - "source": { - "title": "Source URL", + "description": { + "title": "Description", "type": "string", - "maxLength": 500 + "maxLength": 200 }, - "link": { - "title": "Link URL", + "template_language": { + "title": "Template language", "type": "string", - "format": "uri", - "maxLength": 200 + "enum": [ + "django", + "jinja2" + ] + }, + "template_code": { + "title": "Template code", + "description": "The list of objects being exported is passed as a context variable named <code>queryset</code>.", + "type": "string", + "minLength": 1 + }, + "mime_type": { + "title": "MIME type", + "description": "Defaults to <code>text/plain</code>", + "type": "string", + "maxLength": 50 + }, + "file_extension": { + "title": "File extension", + "description": "Extension to append to the rendered filename", + "type": "string", + "maxLength": 15 } } }, - "WritableGraph": { + "Graph": { "required": [ "type", "name", @@ -16023,12 +23834,7 @@ }, "type": { "title": "Type", - "type": "integer", - "enum": [ - 100, - 200, - 300 - ] + "type": "string" }, "weight": { "title": "Weight", @@ -16039,12 +23845,22 @@ "name": { "title": "Name", "type": "string", - "maxLength": 100 + "maxLength": 100, + "minLength": 1 + }, + "template_language": { + "title": "Template language", + "type": "string", + "enum": [ + "django", + "jinja2" + ] }, "source": { "title": "Source URL", "type": "string", - "maxLength": 500 + "maxLength": 500, + "minLength": 1 }, "link": { "title": "Link URL", @@ -16056,7 +23872,8 @@ }, "ImageAttachment": { "required": [ - "image", + "content_type", + "object_id", "image_height", "image_width" ], @@ -16067,9 +23884,22 @@ "type": "integer", "readOnly": true }, + "content_type": { + "title": "Content type", + "type": "string" + }, + "object_id": { + "title": "Object id", + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, "parent": { "title": "Parent", - "type": "string", + "type": "object", + "additionalProperties": { + "type": "string" + }, "readOnly": true }, "name": { @@ -16103,46 +23933,9 @@ } } }, - "WritableImageAttachment": { - "required": [ - "content_type", - "object_id", - "image" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "content_type": { - "title": "Content type", - "type": "string" - }, - "object_id": { - "title": "Object id", - "type": "integer", - "maximum": 2147483647, - "minimum": 0 - }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 50 - }, - "image": { - "title": "Image", - "type": "string", - "readOnly": true, - "format": "uri" - } - } - }, - "UserAction": { + "ObjectChange": { "required": [ - "user", - "action" + "changed_object_id" ], "type": "object", "properties": { @@ -16160,6 +23953,18 @@ "user": { "$ref": "#/definitions/NestedUser" }, + "user_name": { + "title": "User name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "request_id": { + "title": "Request id", + "type": "string", + "format": "uuid", + "readOnly": true + }, "action": { "title": "Action", "required": [ @@ -16172,62 +23977,42 @@ "type": "string" }, "value": { - "type": "integer" + "type": "string" } - } - }, - "message": { - "title": "Message", - "type": "string" - } - } - }, - "TopologyMap": { - "required": [ - "name", - "slug", - "site", - "device_patterns" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", + }, "readOnly": true }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 50 - }, - "slug": { - "title": "Slug", + "changed_object_type": { + "title": "Changed object type", "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "readOnly": true }, - "site": { - "$ref": "#/definitions/NestedSite" + "changed_object_id": { + "title": "Changed object id", + "type": "integer", + "maximum": 2147483647, + "minimum": 0 }, - "device_patterns": { - "title": "Device patterns", - "description": "Identify devices to include in the diagram using regular expressions, one per line. Each line will result in a new tier of the drawing. Separate multiple regexes within a line using semicolons. Devices will be rendered in the order they are defined.", - "type": "string" + "changed_object": { + "title": "Changed object", + "description": "\n Serialize a nested representation of the changed object.\n ", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true }, - "description": { - "title": "Description", + "object_data": { + "title": "Object data", "type": "string", - "maxLength": 100 + "readOnly": true } } }, - "WritableTopologyMap": { + "Tag": { "required": [ "name", - "slug", - "device_patterns" + "slug" ], "type": "object", "properties": { @@ -16239,28 +24024,32 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 100, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 100, + "minLength": 1 }, - "site": { - "title": "Site", - "type": "integer" + "color": { + "title": "Color", + "type": "string", + "pattern": "^[0-9a-f]{6}$", + "maxLength": 6, + "minLength": 1 }, - "device_patterns": { - "title": "Device patterns", - "description": "Identify devices to include in the diagram using regular expressions, one per line. Each line will result in a new tier of the drawing. Separate multiple regexes within a line using semicolons. Devices will be rendered in the order they are defined.", + "comments": { + "title": "Comments", "type": "string" }, - "description": { - "title": "Description", - "type": "string", - "maxLength": 100 + "tagged_items": { + "title": "Tagged items", + "type": "integer", + "readOnly": true } } }, @@ -16286,20 +24075,26 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "aggregate_count": { + "title": "Aggregate count", + "type": "integer", + "readOnly": true } } }, "Aggregate": { "required": [ - "family", "prefix", "rir" ], @@ -16312,11 +24107,20 @@ }, "family": { "title": "Family", - "type": "integer", - "enum": [ - 4, - 6 - ] + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "readOnly": true }, "prefix": { "title": "Prefix", @@ -16328,13 +24132,21 @@ "date_added": { "title": "Date added", "type": "string", - "format": "date" + "format": "date", + "x-nullable": true }, "description": { "title": "Description", "type": "string", "maxLength": 100 }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" @@ -16365,6 +24177,15 @@ "type": "integer", "readOnly": true }, + "family": { + "title": "Family", + "type": "integer", + "enum": [ + 4, + 6 + ], + "readOnly": true + }, "prefix": { "title": "Prefix", "type": "string" @@ -16376,13 +24197,21 @@ "date_added": { "title": "Date added", "type": "string", - "format": "date" + "format": "date", + "x-nullable": true }, "description": { "title": "Description", "type": "string", "maxLength": 100 }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" @@ -16404,8 +24233,7 @@ "NestedVRF": { "title": "Vrf", "required": [ - "name", - "rd" + "name" ], "type": "object", "properties": { @@ -16423,12 +24251,19 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "rd": { "title": "Route distinguisher", "type": "string", - "maxLength": 21 + "maxLength": 21, + "x-nullable": true + }, + "prefix_count": { + "title": "Prefix count", + "type": "integer", + "readOnly": true } } }, @@ -16453,15 +24288,14 @@ "name": { "title": "Name", "type": "string", - "maxLength": 64 + "maxLength": 64, + "minLength": 1 } } }, "IPAddressInterface": { "title": "Interface", "required": [ - "device", - "virtual_machine", "name" ], "type": "object", @@ -16485,50 +24319,14 @@ "name": { "title": "Name", "type": "string", - "maxLength": 64 - } - } - }, - "NestedIPAddress": { - "title": "Nat inside", - "required": [ - "address" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true - }, - "family": { - "title": "Family", - "type": "integer", - "readOnly": true - }, - "address": { - "title": "Address", - "description": "IPv4 or IPv6 address (with mask)", - "type": "string" + "maxLength": 64, + "minLength": 1 } } }, "IPAddress": { "required": [ - "address", - "vrf", - "tenant", - "status", - "role", - "interface", - "nat_inside", - "nat_outside" + "address" ], "type": "object", "properties": { @@ -16539,7 +24337,19 @@ }, "family": { "title": "Family", - "type": "integer", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + }, "readOnly": true }, "address": { @@ -16565,7 +24375,7 @@ "type": "string" }, "value": { - "type": "integer" + "type": "string" } } }, @@ -16581,24 +24391,38 @@ "type": "string" }, "value": { - "type": "integer" + "type": "string" } } }, "interface": { "$ref": "#/definitions/IPAddressInterface" }, - "description": { - "title": "Description", - "type": "string", - "maxLength": 100 - }, "nat_inside": { "$ref": "#/definitions/NestedIPAddress" }, "nat_outside": { "$ref": "#/definitions/NestedIPAddress" }, + "dns_name": { + "title": "DNS Name", + "description": "Hostname or FQDN (not case-sensitive)", + "type": "string", + "pattern": "^[0-9A-Za-z._-]+$", + "maxLength": 255 + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" @@ -16619,7 +24443,8 @@ }, "WritableIPAddress": { "required": [ - "address" + "address", + "nat_outside" ], "type": "object", "properties": { @@ -16628,6 +24453,11 @@ "type": "integer", "readOnly": true }, + "family": { + "title": "Family", + "type": "integer", + "readOnly": true + }, "address": { "title": "Address", "description": "IPv4 or IPv6 address (with mask)", @@ -16635,51 +24465,73 @@ }, "vrf": { "title": "VRF", - "type": "integer" + "type": "integer", + "x-nullable": true }, "tenant": { "title": "Tenant", - "type": "integer" + "type": "integer", + "x-nullable": true }, "status": { "title": "Status", "description": "The operational status of this IP", - "type": "integer", + "type": "string", "enum": [ - 1, - 2, - 3, - 5 + "active", + "reserved", + "deprecated", + "dhcp" ] }, "role": { "title": "Role", "description": "The functional role of this IP", - "type": "integer", + "type": "string", "enum": [ - 10, - 20, - 30, - 40, - 41, - 42, - 43, - 44 + "loopback", + "secondary", + "anycast", + "vip", + "vrrp", + "hsrp", + "glbp", + "carp" ] }, "interface": { "title": "Interface", + "type": "integer", + "x-nullable": true + }, + "nat_inside": { + "title": "NAT (Inside)", + "description": "The IP for which this address is the \"outside\" IP", + "type": "integer", + "x-nullable": true + }, + "nat_outside": { + "title": "Nat outside", "type": "integer" }, + "dns_name": { + "title": "DNS Name", + "description": "Hostname or FQDN (not case-sensitive)", + "type": "string", + "pattern": "^[0-9A-Za-z._-]+$", + "maxLength": 255 + }, "description": { "title": "Description", "type": "string", "maxLength": 100 }, - "nat_inside": { - "title": "NAT (Inside)", - "description": "The IP for which this address is the \"outside\" IP", - "type": "integer" + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } }, "custom_fields": { "title": "Custom fields", @@ -16699,43 +24551,6 @@ } } }, - "NestedVLAN": { - "title": "Vlan", - "required": [ - "vid", - "name" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true - }, - "vid": { - "title": "ID", - "type": "integer", - "maximum": 4094, - "minimum": 1 - }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 64 - }, - "display_name": { - "title": "Display name", - "type": "string", - "readOnly": true - } - } - }, "NestedRole": { "title": "Role", "required": [ @@ -16758,26 +24573,32 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "prefix_count": { + "title": "Prefix count", + "type": "integer", + "readOnly": true + }, + "vlan_count": { + "title": "Vlan count", + "type": "integer", + "readOnly": true } } }, "Prefix": { "required": [ - "prefix", - "site", - "vrf", - "tenant", - "vlan", - "status", - "role" + "prefix" ], "type": "object", "properties": { @@ -16788,7 +24609,19 @@ }, "family": { "title": "Family", - "type": "integer", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + }, "readOnly": true }, "prefix": { @@ -16820,7 +24653,7 @@ "type": "string" }, "value": { - "type": "integer" + "type": "string" } } }, @@ -16837,6 +24670,13 @@ "type": "string", "maxLength": 100 }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" @@ -16866,6 +24706,11 @@ "type": "integer", "readOnly": true }, + "family": { + "title": "Family", + "type": "integer", + "readOnly": true + }, "prefix": { "title": "Prefix", "description": "IPv4 or IPv6 network with mask", @@ -16873,35 +24718,40 @@ }, "site": { "title": "Site", - "type": "integer" + "type": "integer", + "x-nullable": true }, "vrf": { "title": "VRF", - "type": "integer" + "type": "integer", + "x-nullable": true }, "tenant": { "title": "Tenant", - "type": "integer" + "type": "integer", + "x-nullable": true }, "vlan": { "title": "VLAN", - "type": "integer" + "type": "integer", + "x-nullable": true }, "status": { "title": "Status", "description": "Operational status of this prefix", - "type": "integer", + "type": "string", "enum": [ - 0, - 1, - 2, - 3 + "container", + "active", + "reserved", + "deprecated" ] }, "role": { "title": "Role", "description": "The primary function of this prefix", - "type": "integer" + "type": "integer", + "x-nullable": true }, "is_pool": { "title": "Is a pool", @@ -16913,6 +24763,13 @@ "type": "string", "maxLength": 100 }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" @@ -16946,19 +24803,26 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "is_private": { "title": "Private", "description": "IP space managed by this RIR is considered private", "type": "boolean" + }, + "aggregate_count": { + "title": "Aggregate count", + "type": "integer", + "readOnly": true } } }, @@ -16977,31 +24841,45 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "weight": { "title": "Weight", "type": "integer", "maximum": 32767, "minimum": 0 + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "prefix_count": { + "title": "Prefix count", + "type": "integer", + "readOnly": true + }, + "vlan_count": { + "title": "Vlan count", + "type": "integer", + "readOnly": true } } }, "Service": { "required": [ - "device", - "virtual_machine", "name", "port", - "protocol", - "ipaddresses" + "protocol" ], "type": "object", "properties": { @@ -17019,7 +24897,8 @@ "name": { "title": "Name", "type": "string", - "maxLength": 30 + "maxLength": 30, + "minLength": 1 }, "port": { "title": "Port number", @@ -17039,7 +24918,7 @@ "type": "string" }, "value": { - "type": "integer" + "type": "string" } } }, @@ -17047,13 +24926,18 @@ "type": "array", "items": { "$ref": "#/definitions/NestedIPAddress" - } + }, + "uniqueItems": true }, "description": { "title": "Description", "type": "string", "maxLength": 100 }, + "custom_fields": { + "title": "Custom fields", + "type": "object" + }, "created": { "title": "Created", "type": "string", @@ -17083,16 +24967,19 @@ }, "device": { "title": "Device", - "type": "integer" + "type": "integer", + "x-nullable": true }, "virtual_machine": { "title": "Virtual machine", - "type": "integer" + "type": "integer", + "x-nullable": true }, "name": { "title": "Name", "type": "string", - "maxLength": 30 + "maxLength": 30, + "minLength": 1 }, "port": { "title": "Port number", @@ -17102,10 +24989,10 @@ }, "protocol": { "title": "Protocol", - "type": "integer", + "type": "string", "enum": [ - 6, - 17 + "tcp", + "udp" ] }, "ipaddresses": { @@ -17121,6 +25008,10 @@ "type": "string", "maxLength": 100 }, + "custom_fields": { + "title": "Custom fields", + "type": "object" + }, "created": { "title": "Created", "type": "string", @@ -17138,8 +25029,7 @@ "VLANGroup": { "required": [ "name", - "slug", - "site" + "slug" ], "type": "object", "properties": { @@ -17151,17 +25041,24 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "site": { "$ref": "#/definitions/NestedSite" + }, + "vlan_count": { + "title": "Vlan count", + "type": "integer", + "readOnly": true } } }, @@ -17180,18 +25077,26 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "site": { "title": "Site", - "type": "integer" + "type": "integer", + "x-nullable": true + }, + "vlan_count": { + "title": "Vlan count", + "type": "integer", + "readOnly": true } } }, @@ -17217,26 +25122,28 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "vlan_count": { + "title": "Vlan count", + "type": "integer", + "readOnly": true } } }, "VLAN": { "required": [ - "site", - "group", "vid", - "name", - "tenant", - "status", - "role" + "name" ], "type": "object", "properties": { @@ -17260,7 +25167,8 @@ "name": { "title": "Name", "type": "string", - "maxLength": 64 + "maxLength": 64, + "minLength": 1 }, "tenant": { "$ref": "#/definitions/NestedTenant" @@ -17277,7 +25185,7 @@ "type": "string" }, "value": { - "type": "integer" + "type": "string" } } }, @@ -17289,6 +25197,13 @@ "type": "string", "maxLength": 100 }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "display_name": { "title": "Display name", "type": "string", @@ -17309,6 +25224,11 @@ "type": "string", "format": "date-time", "readOnly": true + }, + "prefix_count": { + "title": "Prefix count", + "type": "integer", + "readOnly": true } } }, @@ -17326,11 +25246,13 @@ }, "site": { "title": "Site", - "type": "integer" + "type": "integer", + "x-nullable": true }, "group": { "title": "Group", - "type": "integer" + "type": "integer", + "x-nullable": true }, "vid": { "title": "ID", @@ -17341,30 +25263,45 @@ "name": { "title": "Name", "type": "string", - "maxLength": 64 + "maxLength": 64, + "minLength": 1 }, "tenant": { "title": "Tenant", - "type": "integer" + "type": "integer", + "x-nullable": true }, "status": { "title": "Status", - "type": "integer", + "type": "string", "enum": [ - 1, - 2, - 3 + "active", + "reserved", + "deprecated" ] }, "role": { "title": "Role", - "type": "integer" + "type": "integer", + "x-nullable": true }, "description": { "title": "Description", "type": "string", "maxLength": 100 }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "display_name": { + "title": "Display name", + "type": "string", + "readOnly": true + }, "custom_fields": { "title": "Custom fields", "type": "object" @@ -17380,14 +25317,17 @@ "type": "string", "format": "date-time", "readOnly": true + }, + "prefix_count": { + "title": "Prefix count", + "type": "integer", + "readOnly": true } } }, "VRF": { "required": [ - "name", - "rd", - "tenant" + "name" ], "type": "object", "properties": { @@ -17399,12 +25339,14 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "rd": { "title": "Route distinguisher", "type": "string", - "maxLength": 21 + "maxLength": 21, + "x-nullable": true }, "tenant": { "$ref": "#/definitions/NestedTenant" @@ -17419,6 +25361,13 @@ "type": "string", "maxLength": 100 }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "display_name": { "title": "Display name", "type": "string", @@ -17439,13 +25388,22 @@ "type": "string", "format": "date-time", "readOnly": true + }, + "ipaddress_count": { + "title": "Ipaddress count", + "type": "integer", + "readOnly": true + }, + "prefix_count": { + "title": "Prefix count", + "type": "integer", + "readOnly": true } } }, "WritableVRF": { "required": [ - "name", - "rd" + "name" ], "type": "object", "properties": { @@ -17457,16 +25415,19 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "rd": { "title": "Route distinguisher", "type": "string", - "maxLength": 21 + "maxLength": 21, + "x-nullable": true }, "tenant": { "title": "Tenant", - "type": "integer" + "type": "integer", + "x-nullable": true }, "enforce_unique": { "title": "Enforce unique space", @@ -17478,6 +25439,18 @@ "type": "string", "maxLength": 100 }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "display_name": { + "title": "Display name", + "type": "string", + "readOnly": true + }, "custom_fields": { "title": "Custom fields", "type": "object" @@ -17493,6 +25466,16 @@ "type": "string", "format": "date-time", "readOnly": true + }, + "ipaddress_count": { + "title": "Ipaddress count", + "type": "integer", + "readOnly": true + }, + "prefix_count": { + "title": "Prefix count", + "type": "integer", + "readOnly": true } } }, @@ -17511,14 +25494,26 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "secret_count": { + "title": "Secret count", + "type": "integer", + "readOnly": true } } }, @@ -17544,14 +25539,21 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "secret_count": { + "title": "Secret count", + "type": "integer", + "readOnly": true } } }, @@ -17559,7 +25561,7 @@ "required": [ "device", "role", - "name" + "plaintext" ], "type": "object", "properties": { @@ -17582,12 +25584,24 @@ "plaintext": { "title": "Plaintext", "type": "string", - "readOnly": true + "minLength": 1 }, "hash": { "title": "Hash", "type": "string", - "readOnly": true + "readOnly": true, + "minLength": 1 + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "custom_fields": { + "title": "Custom fields", + "type": "object" }, "created": { "title": "Created", @@ -17631,12 +25645,25 @@ }, "plaintext": { "title": "Plaintext", - "type": "string" + "type": "string", + "minLength": 1 }, "hash": { "title": "Hash", "type": "string", - "readOnly": true + "readOnly": true, + "minLength": 1 + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "custom_fields": { + "title": "Custom fields", + "type": "object" }, "created": { "title": "Created", @@ -17667,55 +25694,28 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 - } - } - }, - "NestedTenantGroup": { - "title": "Group", - "required": [ - "name", - "slug" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true + "maxLength": 50, + "minLength": 1 }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", + "tenant_count": { + "title": "Tenant count", + "type": "integer", "readOnly": true - }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 50 - }, - "slug": { - "title": "Slug", - "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 } } }, "Tenant": { "required": [ "name", - "slug", - "group" + "slug" ], "type": "object", "properties": { @@ -17727,14 +25727,16 @@ "name": { "title": "Name", "type": "string", - "maxLength": 30 + "maxLength": 30, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "group": { "$ref": "#/definitions/NestedTenantGroup" @@ -17749,6 +25751,13 @@ "title": "Comments", "type": "string" }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" @@ -17764,6 +25773,56 @@ "type": "string", "format": "date-time", "readOnly": true + }, + "circuit_count": { + "title": "Circuit count", + "type": "integer", + "readOnly": true + }, + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true + }, + "ipaddress_count": { + "title": "Ipaddress count", + "type": "integer", + "readOnly": true + }, + "prefix_count": { + "title": "Prefix count", + "type": "integer", + "readOnly": true + }, + "rack_count": { + "title": "Rack count", + "type": "integer", + "readOnly": true + }, + "site_count": { + "title": "Site count", + "type": "integer", + "readOnly": true + }, + "virtualmachine_count": { + "title": "Virtualmachine count", + "type": "integer", + "readOnly": true + }, + "vlan_count": { + "title": "Vlan count", + "type": "integer", + "readOnly": true + }, + "vrf_count": { + "title": "Vrf count", + "type": "integer", + "readOnly": true + }, + "cluster_count": { + "title": "Cluster count", + "type": "integer", + "readOnly": true } } }, @@ -17782,18 +25841,21 @@ "name": { "title": "Name", "type": "string", - "maxLength": 30 + "maxLength": 30, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "group": { "title": "Group", - "type": "integer" + "type": "integer", + "x-nullable": true }, "description": { "title": "Description", @@ -17805,6 +25867,13 @@ "title": "Comments", "type": "string" }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" @@ -17820,6 +25889,56 @@ "type": "string", "format": "date-time", "readOnly": true + }, + "circuit_count": { + "title": "Circuit count", + "type": "integer", + "readOnly": true + }, + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true + }, + "ipaddress_count": { + "title": "Ipaddress count", + "type": "integer", + "readOnly": true + }, + "prefix_count": { + "title": "Prefix count", + "type": "integer", + "readOnly": true + }, + "rack_count": { + "title": "Rack count", + "type": "integer", + "readOnly": true + }, + "site_count": { + "title": "Site count", + "type": "integer", + "readOnly": true + }, + "virtualmachine_count": { + "title": "Virtualmachine count", + "type": "integer", + "readOnly": true + }, + "vlan_count": { + "title": "Vlan count", + "type": "integer", + "readOnly": true + }, + "vrf_count": { + "title": "Vrf count", + "type": "integer", + "readOnly": true + }, + "cluster_count": { + "title": "Cluster count", + "type": "integer", + "readOnly": true } } }, @@ -17838,14 +25957,21 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "cluster_count": { + "title": "Cluster count", + "type": "integer", + "readOnly": true } } }, @@ -17864,14 +25990,21 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "cluster_count": { + "title": "Cluster count", + "type": "integer", + "readOnly": true } } }, @@ -17897,14 +26030,21 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "cluster_count": { + "title": "Cluster count", + "type": "integer", + "readOnly": true } } }, @@ -17930,23 +26070,28 @@ "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 }, "slug": { "title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "maxLength": 50, + "minLength": 1 + }, + "cluster_count": { + "title": "Cluster count", + "type": "integer", + "readOnly": true } } }, "Cluster": { "required": [ "name", - "type", - "group", - "site" + "type" ], "type": "object", "properties": { @@ -17958,7 +26103,8 @@ "name": { "title": "Name", "type": "string", - "maxLength": 100 + "maxLength": 100, + "minLength": 1 }, "type": { "$ref": "#/definitions/NestedClusterType" @@ -17966,6 +26112,9 @@ "group": { "$ref": "#/definitions/NestedClusterGroup" }, + "tenant": { + "$ref": "#/definitions/NestedTenant" + }, "site": { "$ref": "#/definitions/NestedSite" }, @@ -17973,6 +26122,13 @@ "title": "Comments", "type": "string" }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" @@ -17988,6 +26144,16 @@ "type": "string", "format": "date-time", "readOnly": true + }, + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true + }, + "virtualmachine_count": { + "title": "Virtualmachine count", + "type": "integer", + "readOnly": true } } }, @@ -18006,7 +26172,8 @@ "name": { "title": "Name", "type": "string", - "maxLength": 100 + "maxLength": 100, + "minLength": 1 }, "type": { "title": "Type", @@ -18014,16 +26181,30 @@ }, "group": { "title": "Group", - "type": "integer" + "type": "integer", + "x-nullable": true + }, + "tenant": { + "title": "Tenant", + "type": "integer", + "x-nullable": true }, "site": { "title": "Site", - "type": "integer" + "type": "integer", + "x-nullable": true }, "comments": { "title": "Comments", "type": "string" }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" @@ -18039,13 +26220,23 @@ "type": "string", "format": "date-time", "readOnly": true + }, + "device_count": { + "title": "Device count", + "type": "integer", + "readOnly": true + }, + "virtualmachine_count": { + "title": "Virtualmachine count", + "type": "integer", + "readOnly": true } } }, - "VirtualMachineIPAddress": { - "title": "Primary ip", + "VirtualMachineInterface": { "required": [ - "address" + "virtual_machine", + "name" ], "type": "object", "properties": { @@ -18054,35 +26245,248 @@ "type": "integer", "readOnly": true }, - "url": { - "title": "Url", + "virtual_machine": { + "$ref": "#/definitions/NestedVirtualMachine" + }, + "name": { + "title": "Name", "type": "string", - "format": "uri", - "readOnly": true + "maxLength": 64, + "minLength": 1 }, - "family": { - "title": "Family", + "type": { + "title": "Type", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "default": { + "label": "Virtual", + "value": "virtual" + } + }, + "enabled": { + "title": "Enabled", + "type": "boolean" + }, + "mtu": { + "title": "MTU", + "type": "integer", + "maximum": 65536, + "minimum": 1, + "x-nullable": true + }, + "mac_address": { + "title": "MAC Address", + "type": "string", + "x-nullable": true + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "mode": { + "title": "Mode", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "untagged_vlan": { + "$ref": "#/definitions/NestedVLAN" + }, + "tagged_vlans": { + "type": "array", + "items": { + "$ref": "#/definitions/NestedVLAN" + }, + "uniqueItems": true + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "WritableVirtualMachineInterface": { + "required": [ + "name", + "type" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", "type": "integer", "readOnly": true }, - "address": { - "title": "Address", - "description": "IPv4 or IPv6 address (with mask)", - "type": "string" + "virtual_machine": { + "title": "Virtual machine", + "type": "integer", + "x-nullable": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 64, + "minLength": 1 + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "virtual", + "lag", + "100base-tx", + "1000base-t", + "2.5gbase-t", + "5gbase-t", + "10gbase-t", + "10gbase-cx4", + "1000base-x-gbic", + "1000base-x-sfp", + "10gbase-x-sfpp", + "10gbase-x-xfp", + "10gbase-x-xenpak", + "10gbase-x-x2", + "25gbase-x-sfp28", + "40gbase-x-qsfpp", + "50gbase-x-sfp28", + "100gbase-x-cfp", + "100gbase-x-cfp2", + "200gbase-x-cfp2", + "100gbase-x-cfp4", + "100gbase-x-cpak", + "100gbase-x-qsfp28", + "200gbase-x-qsfp56", + "400gbase-x-qsfpdd", + "400gbase-x-osfp", + "ieee802.11a", + "ieee802.11g", + "ieee802.11n", + "ieee802.11ac", + "ieee802.11ad", + "ieee802.11ax", + "gsm", + "cdma", + "lte", + "sonet-oc3", + "sonet-oc12", + "sonet-oc48", + "sonet-oc192", + "sonet-oc768", + "sonet-oc1920", + "sonet-oc3840", + "1gfc-sfp", + "2gfc-sfp", + "4gfc-sfp", + "8gfc-sfpp", + "16gfc-sfpp", + "32gfc-sfp28", + "128gfc-sfp28", + "inifiband-sdr", + "inifiband-ddr", + "inifiband-qdr", + "inifiband-fdr10", + "inifiband-fdr", + "inifiband-edr", + "inifiband-hdr", + "inifiband-ndr", + "inifiband-xdr", + "t1", + "e1", + "t3", + "e3", + "cisco-stackwise", + "cisco-stackwise-plus", + "cisco-flexstack", + "cisco-flexstack-plus", + "juniper-vcp", + "extreme-summitstack", + "extreme-summitstack-128", + "extreme-summitstack-256", + "extreme-summitstack-512", + "other" + ] + }, + "enabled": { + "title": "Enabled", + "type": "boolean" + }, + "mtu": { + "title": "MTU", + "type": "integer", + "maximum": 65536, + "minimum": 1, + "x-nullable": true + }, + "mac_address": { + "title": "MAC Address", + "type": "string", + "x-nullable": true + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 100 + }, + "mode": { + "title": "Mode", + "type": "string", + "enum": [ + "access", + "tagged", + "tagged-all" + ] + }, + "untagged_vlan": { + "title": "Untagged VLAN", + "type": "integer", + "x-nullable": true + }, + "tagged_vlans": { + "type": "array", + "items": { + "title": "Tagged VLANs", + "type": "integer" + }, + "uniqueItems": true + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } } } }, - "VirtualMachine": { + "VirtualMachineWithConfigContext": { "required": [ "name", - "status", - "cluster", - "role", - "tenant", - "platform", - "primary_ip", - "primary_ip4", - "primary_ip6" + "cluster" ], "type": "object", "properties": { @@ -18094,7 +26498,8 @@ "name": { "title": "Name", "type": "string", - "maxLength": 64 + "maxLength": 64, + "minLength": 1 }, "status": { "title": "Status", @@ -18108,10 +26513,13 @@ "type": "string" }, "value": { - "type": "integer" + "type": "string" } } }, + "site": { + "$ref": "#/definitions/NestedSite" + }, "cluster": { "$ref": "#/definitions/NestedCluster" }, @@ -18125,40 +26533,63 @@ "$ref": "#/definitions/NestedPlatform" }, "primary_ip": { - "$ref": "#/definitions/VirtualMachineIPAddress" + "$ref": "#/definitions/NestedIPAddress" }, "primary_ip4": { - "$ref": "#/definitions/VirtualMachineIPAddress" + "$ref": "#/definitions/NestedIPAddress" }, "primary_ip6": { - "$ref": "#/definitions/VirtualMachineIPAddress" + "$ref": "#/definitions/NestedIPAddress" }, "vcpus": { "title": "VCPUs", "type": "integer", "maximum": 32767, - "minimum": 0 + "minimum": 0, + "x-nullable": true }, "memory": { "title": "Memory (MB)", "type": "integer", "maximum": 2147483647, - "minimum": 0 + "minimum": 0, + "x-nullable": true }, "disk": { "title": "Disk (GB)", "type": "integer", "maximum": 2147483647, - "minimum": 0 + "minimum": 0, + "x-nullable": true }, "comments": { "title": "Comments", "type": "string" }, + "local_context_data": { + "title": "Local context data", + "type": "string", + "x-nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" }, + "config_context": { + "title": "Config context", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, "created": { "title": "Created", "type": "string", @@ -18173,7 +26604,7 @@ } } }, - "WritableVirtualMachine": { + "WritableVirtualMachineWithConfigContext": { "required": [ "name", "cluster" @@ -18188,67 +26619,106 @@ "name": { "title": "Name", "type": "string", - "maxLength": 64 + "maxLength": 64, + "minLength": 1 }, "status": { "title": "Status", - "type": "integer", + "type": "string", "enum": [ - 1, - 0, - 3 + "active", + "offline", + "staged" ] }, + "site": { + "title": "Site", + "type": "string", + "readOnly": true + }, "cluster": { "title": "Cluster", "type": "integer" }, "role": { "title": "Role", - "type": "integer" + "type": "integer", + "x-nullable": true }, "tenant": { "title": "Tenant", - "type": "integer" + "type": "integer", + "x-nullable": true }, "platform": { "title": "Platform", - "type": "integer" + "type": "integer", + "x-nullable": true + }, + "primary_ip": { + "title": "Primary ip", + "type": "string", + "readOnly": true }, "primary_ip4": { "title": "Primary IPv4", - "type": "integer" + "type": "integer", + "x-nullable": true }, "primary_ip6": { "title": "Primary IPv6", - "type": "integer" + "type": "integer", + "x-nullable": true }, "vcpus": { "title": "VCPUs", "type": "integer", "maximum": 32767, - "minimum": 0 + "minimum": 0, + "x-nullable": true }, "memory": { "title": "Memory (MB)", "type": "integer", "maximum": 2147483647, - "minimum": 0 + "minimum": 0, + "x-nullable": true }, "disk": { "title": "Disk (GB)", "type": "integer", "maximum": 2147483647, - "minimum": 0 + "minimum": 0, + "x-nullable": true }, "comments": { "title": "Comments", "type": "string" }, + "local_context_data": { + "title": "Local context data", + "type": "string", + "x-nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, "custom_fields": { "title": "Custom fields", "type": "object" }, + "config_context": { + "title": "Config context", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, "created": { "title": "Created", "type": "string",