diff --git a/rest_client/circuit/circuit_client.go b/rest_client/circuit/circuit_client.go index 636004316..0271b864f 100644 --- a/rest_client/circuit/circuit_client.go +++ b/rest_client/circuit/circuit_client.go @@ -64,9 +64,9 @@ type ClientService interface { } /* - DeleteCircuit deletes a circuit +DeleteCircuit deletes a circuit - Delete a circuit by id. Requires admin access. +Delete a circuit by id. Requires admin access. */ func (a *Client) DeleteCircuit(params *DeleteCircuitParams, opts ...ClientOption) (*DeleteCircuitOK, error) { // TODO: Validate the params before sending @@ -104,9 +104,9 @@ func (a *Client) DeleteCircuit(params *DeleteCircuitParams, opts ...ClientOption } /* - DetailCircuit retrieves a single circuit +DetailCircuit retrieves a single circuit - Retrieves a single circuit by id. Requires admin access. +Retrieves a single circuit by id. Requires admin access. */ func (a *Client) DetailCircuit(params *DetailCircuitParams, opts ...ClientOption) (*DetailCircuitOK, error) { // TODO: Validate the params before sending @@ -144,10 +144,9 @@ func (a *Client) DetailCircuit(params *DetailCircuitParams, opts ...ClientOption } /* - ListCircuits lists circuits - - Retrieves a list of circuit resources; does not supports filtering, sorting, or pagination. Requires admin access. +ListCircuits lists circuits +Retrieves a list of circuit resources; does not supports filtering, sorting, or pagination. Requires admin access. */ func (a *Client) ListCircuits(params *ListCircuitsParams, opts ...ClientOption) (*ListCircuitsOK, error) { // TODO: Validate the params before sending diff --git a/rest_client/circuit/delete_circuit_parameters.go b/rest_client/circuit/delete_circuit_parameters.go index c9c429bda..dac8fdd10 100644 --- a/rest_client/circuit/delete_circuit_parameters.go +++ b/rest_client/circuit/delete_circuit_parameters.go @@ -78,10 +78,12 @@ func NewDeleteCircuitParamsWithHTTPClient(client *http.Client) *DeleteCircuitPar } } -/* DeleteCircuitParams contains all the parameters to send to the API endpoint - for the delete circuit operation. +/* +DeleteCircuitParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the delete circuit operation. + + Typically these are written to a http.Request. */ type DeleteCircuitParams struct { diff --git a/rest_client/circuit/delete_circuit_responses.go b/rest_client/circuit/delete_circuit_responses.go index 2765f228f..02131df36 100644 --- a/rest_client/circuit/delete_circuit_responses.go +++ b/rest_client/circuit/delete_circuit_responses.go @@ -81,7 +81,8 @@ func NewDeleteCircuitOK() *DeleteCircuitOK { return &DeleteCircuitOK{} } -/* DeleteCircuitOK describes a response with status code 200, with default header values. +/* +DeleteCircuitOK describes a response with status code 200, with default header values. The delete request was successful and the resource has been removed */ @@ -89,9 +90,39 @@ type DeleteCircuitOK struct { Payload *rest_model.Empty } +// IsSuccess returns true when this delete circuit o k response has a 2xx status code +func (o *DeleteCircuitOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this delete circuit o k response has a 3xx status code +func (o *DeleteCircuitOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete circuit o k response has a 4xx status code +func (o *DeleteCircuitOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete circuit o k response has a 5xx status code +func (o *DeleteCircuitOK) IsServerError() bool { + return false +} + +// IsCode returns true when this delete circuit o k response a status code equal to that given +func (o *DeleteCircuitOK) IsCode(code int) bool { + return code == 200 +} + func (o *DeleteCircuitOK) Error() string { return fmt.Sprintf("[DELETE /circuits/{id}][%d] deleteCircuitOK %+v", 200, o.Payload) } + +func (o *DeleteCircuitOK) String() string { + return fmt.Sprintf("[DELETE /circuits/{id}][%d] deleteCircuitOK %+v", 200, o.Payload) +} + func (o *DeleteCircuitOK) GetPayload() *rest_model.Empty { return o.Payload } @@ -113,7 +144,8 @@ func NewDeleteCircuitBadRequest() *DeleteCircuitBadRequest { return &DeleteCircuitBadRequest{} } -/* DeleteCircuitBadRequest describes a response with status code 400, with default header values. +/* +DeleteCircuitBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -121,9 +153,39 @@ type DeleteCircuitBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this delete circuit bad request response has a 2xx status code +func (o *DeleteCircuitBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete circuit bad request response has a 3xx status code +func (o *DeleteCircuitBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete circuit bad request response has a 4xx status code +func (o *DeleteCircuitBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete circuit bad request response has a 5xx status code +func (o *DeleteCircuitBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this delete circuit bad request response a status code equal to that given +func (o *DeleteCircuitBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *DeleteCircuitBadRequest) Error() string { return fmt.Sprintf("[DELETE /circuits/{id}][%d] deleteCircuitBadRequest %+v", 400, o.Payload) } + +func (o *DeleteCircuitBadRequest) String() string { + return fmt.Sprintf("[DELETE /circuits/{id}][%d] deleteCircuitBadRequest %+v", 400, o.Payload) +} + func (o *DeleteCircuitBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -145,7 +207,8 @@ func NewDeleteCircuitUnauthorized() *DeleteCircuitUnauthorized { return &DeleteCircuitUnauthorized{} } -/* DeleteCircuitUnauthorized describes a response with status code 401, with default header values. +/* +DeleteCircuitUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -153,9 +216,39 @@ type DeleteCircuitUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this delete circuit unauthorized response has a 2xx status code +func (o *DeleteCircuitUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete circuit unauthorized response has a 3xx status code +func (o *DeleteCircuitUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete circuit unauthorized response has a 4xx status code +func (o *DeleteCircuitUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete circuit unauthorized response has a 5xx status code +func (o *DeleteCircuitUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this delete circuit unauthorized response a status code equal to that given +func (o *DeleteCircuitUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *DeleteCircuitUnauthorized) Error() string { return fmt.Sprintf("[DELETE /circuits/{id}][%d] deleteCircuitUnauthorized %+v", 401, o.Payload) } + +func (o *DeleteCircuitUnauthorized) String() string { + return fmt.Sprintf("[DELETE /circuits/{id}][%d] deleteCircuitUnauthorized %+v", 401, o.Payload) +} + func (o *DeleteCircuitUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -177,7 +270,8 @@ func NewDeleteCircuitConflict() *DeleteCircuitConflict { return &DeleteCircuitConflict{} } -/* DeleteCircuitConflict describes a response with status code 409, with default header values. +/* +DeleteCircuitConflict describes a response with status code 409, with default header values. The resource requested to be removed/altered cannot be as it is referenced by another object. */ @@ -185,9 +279,39 @@ type DeleteCircuitConflict struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this delete circuit conflict response has a 2xx status code +func (o *DeleteCircuitConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete circuit conflict response has a 3xx status code +func (o *DeleteCircuitConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete circuit conflict response has a 4xx status code +func (o *DeleteCircuitConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete circuit conflict response has a 5xx status code +func (o *DeleteCircuitConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this delete circuit conflict response a status code equal to that given +func (o *DeleteCircuitConflict) IsCode(code int) bool { + return code == 409 +} + func (o *DeleteCircuitConflict) Error() string { return fmt.Sprintf("[DELETE /circuits/{id}][%d] deleteCircuitConflict %+v", 409, o.Payload) } + +func (o *DeleteCircuitConflict) String() string { + return fmt.Sprintf("[DELETE /circuits/{id}][%d] deleteCircuitConflict %+v", 409, o.Payload) +} + func (o *DeleteCircuitConflict) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/circuit/detail_circuit_parameters.go b/rest_client/circuit/detail_circuit_parameters.go index e10e86155..88a69e8d4 100644 --- a/rest_client/circuit/detail_circuit_parameters.go +++ b/rest_client/circuit/detail_circuit_parameters.go @@ -76,10 +76,12 @@ func NewDetailCircuitParamsWithHTTPClient(client *http.Client) *DetailCircuitPar } } -/* DetailCircuitParams contains all the parameters to send to the API endpoint - for the detail circuit operation. +/* +DetailCircuitParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the detail circuit operation. + + Typically these are written to a http.Request. */ type DetailCircuitParams struct { diff --git a/rest_client/circuit/detail_circuit_responses.go b/rest_client/circuit/detail_circuit_responses.go index 5c599af8b..a40eefa02 100644 --- a/rest_client/circuit/detail_circuit_responses.go +++ b/rest_client/circuit/detail_circuit_responses.go @@ -75,7 +75,8 @@ func NewDetailCircuitOK() *DetailCircuitOK { return &DetailCircuitOK{} } -/* DetailCircuitOK describes a response with status code 200, with default header values. +/* +DetailCircuitOK describes a response with status code 200, with default header values. A single circuit */ @@ -83,9 +84,39 @@ type DetailCircuitOK struct { Payload *rest_model.DetailCircuitEnvelope } +// IsSuccess returns true when this detail circuit o k response has a 2xx status code +func (o *DetailCircuitOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this detail circuit o k response has a 3xx status code +func (o *DetailCircuitOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail circuit o k response has a 4xx status code +func (o *DetailCircuitOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this detail circuit o k response has a 5xx status code +func (o *DetailCircuitOK) IsServerError() bool { + return false +} + +// IsCode returns true when this detail circuit o k response a status code equal to that given +func (o *DetailCircuitOK) IsCode(code int) bool { + return code == 200 +} + func (o *DetailCircuitOK) Error() string { return fmt.Sprintf("[GET /circuits/{id}][%d] detailCircuitOK %+v", 200, o.Payload) } + +func (o *DetailCircuitOK) String() string { + return fmt.Sprintf("[GET /circuits/{id}][%d] detailCircuitOK %+v", 200, o.Payload) +} + func (o *DetailCircuitOK) GetPayload() *rest_model.DetailCircuitEnvelope { return o.Payload } @@ -107,7 +138,8 @@ func NewDetailCircuitUnauthorized() *DetailCircuitUnauthorized { return &DetailCircuitUnauthorized{} } -/* DetailCircuitUnauthorized describes a response with status code 401, with default header values. +/* +DetailCircuitUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -115,9 +147,39 @@ type DetailCircuitUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this detail circuit unauthorized response has a 2xx status code +func (o *DetailCircuitUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this detail circuit unauthorized response has a 3xx status code +func (o *DetailCircuitUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail circuit unauthorized response has a 4xx status code +func (o *DetailCircuitUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this detail circuit unauthorized response has a 5xx status code +func (o *DetailCircuitUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this detail circuit unauthorized response a status code equal to that given +func (o *DetailCircuitUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *DetailCircuitUnauthorized) Error() string { return fmt.Sprintf("[GET /circuits/{id}][%d] detailCircuitUnauthorized %+v", 401, o.Payload) } + +func (o *DetailCircuitUnauthorized) String() string { + return fmt.Sprintf("[GET /circuits/{id}][%d] detailCircuitUnauthorized %+v", 401, o.Payload) +} + func (o *DetailCircuitUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewDetailCircuitNotFound() *DetailCircuitNotFound { return &DetailCircuitNotFound{} } -/* DetailCircuitNotFound describes a response with status code 404, with default header values. +/* +DetailCircuitNotFound describes a response with status code 404, with default header values. The requested resource does not exist */ @@ -147,9 +210,39 @@ type DetailCircuitNotFound struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this detail circuit not found response has a 2xx status code +func (o *DetailCircuitNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this detail circuit not found response has a 3xx status code +func (o *DetailCircuitNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail circuit not found response has a 4xx status code +func (o *DetailCircuitNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this detail circuit not found response has a 5xx status code +func (o *DetailCircuitNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this detail circuit not found response a status code equal to that given +func (o *DetailCircuitNotFound) IsCode(code int) bool { + return code == 404 +} + func (o *DetailCircuitNotFound) Error() string { return fmt.Sprintf("[GET /circuits/{id}][%d] detailCircuitNotFound %+v", 404, o.Payload) } + +func (o *DetailCircuitNotFound) String() string { + return fmt.Sprintf("[GET /circuits/{id}][%d] detailCircuitNotFound %+v", 404, o.Payload) +} + func (o *DetailCircuitNotFound) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/circuit/list_circuits_parameters.go b/rest_client/circuit/list_circuits_parameters.go index 8119b9bcc..1d026cc75 100644 --- a/rest_client/circuit/list_circuits_parameters.go +++ b/rest_client/circuit/list_circuits_parameters.go @@ -76,10 +76,12 @@ func NewListCircuitsParamsWithHTTPClient(client *http.Client) *ListCircuitsParam } } -/* ListCircuitsParams contains all the parameters to send to the API endpoint - for the list circuits operation. +/* +ListCircuitsParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the list circuits operation. + + Typically these are written to a http.Request. */ type ListCircuitsParams struct { timeout time.Duration diff --git a/rest_client/circuit/list_circuits_responses.go b/rest_client/circuit/list_circuits_responses.go index 00f28054d..e3a226f39 100644 --- a/rest_client/circuit/list_circuits_responses.go +++ b/rest_client/circuit/list_circuits_responses.go @@ -69,7 +69,8 @@ func NewListCircuitsOK() *ListCircuitsOK { return &ListCircuitsOK{} } -/* ListCircuitsOK describes a response with status code 200, with default header values. +/* +ListCircuitsOK describes a response with status code 200, with default header values. A list of circuits */ @@ -77,9 +78,39 @@ type ListCircuitsOK struct { Payload *rest_model.ListCircuitsEnvelope } +// IsSuccess returns true when this list circuits o k response has a 2xx status code +func (o *ListCircuitsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this list circuits o k response has a 3xx status code +func (o *ListCircuitsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list circuits o k response has a 4xx status code +func (o *ListCircuitsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this list circuits o k response has a 5xx status code +func (o *ListCircuitsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this list circuits o k response a status code equal to that given +func (o *ListCircuitsOK) IsCode(code int) bool { + return code == 200 +} + func (o *ListCircuitsOK) Error() string { return fmt.Sprintf("[GET /circuits][%d] listCircuitsOK %+v", 200, o.Payload) } + +func (o *ListCircuitsOK) String() string { + return fmt.Sprintf("[GET /circuits][%d] listCircuitsOK %+v", 200, o.Payload) +} + func (o *ListCircuitsOK) GetPayload() *rest_model.ListCircuitsEnvelope { return o.Payload } @@ -101,7 +132,8 @@ func NewListCircuitsUnauthorized() *ListCircuitsUnauthorized { return &ListCircuitsUnauthorized{} } -/* ListCircuitsUnauthorized describes a response with status code 401, with default header values. +/* +ListCircuitsUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -109,9 +141,39 @@ type ListCircuitsUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this list circuits unauthorized response has a 2xx status code +func (o *ListCircuitsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list circuits unauthorized response has a 3xx status code +func (o *ListCircuitsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list circuits unauthorized response has a 4xx status code +func (o *ListCircuitsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this list circuits unauthorized response has a 5xx status code +func (o *ListCircuitsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this list circuits unauthorized response a status code equal to that given +func (o *ListCircuitsUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *ListCircuitsUnauthorized) Error() string { return fmt.Sprintf("[GET /circuits][%d] listCircuitsUnauthorized %+v", 401, o.Payload) } + +func (o *ListCircuitsUnauthorized) String() string { + return fmt.Sprintf("[GET /circuits][%d] listCircuitsUnauthorized %+v", 401, o.Payload) +} + func (o *ListCircuitsUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/database/check_data_integrity_parameters.go b/rest_client/database/check_data_integrity_parameters.go index 0709fa74a..10c37d628 100644 --- a/rest_client/database/check_data_integrity_parameters.go +++ b/rest_client/database/check_data_integrity_parameters.go @@ -76,10 +76,12 @@ func NewCheckDataIntegrityParamsWithHTTPClient(client *http.Client) *CheckDataIn } } -/* CheckDataIntegrityParams contains all the parameters to send to the API endpoint - for the check data integrity operation. +/* +CheckDataIntegrityParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the check data integrity operation. + + Typically these are written to a http.Request. */ type CheckDataIntegrityParams struct { timeout time.Duration diff --git a/rest_client/database/check_data_integrity_responses.go b/rest_client/database/check_data_integrity_responses.go index 56b675f8c..d609db2d8 100644 --- a/rest_client/database/check_data_integrity_responses.go +++ b/rest_client/database/check_data_integrity_responses.go @@ -75,7 +75,8 @@ func NewCheckDataIntegrityAccepted() *CheckDataIntegrityAccepted { return &CheckDataIntegrityAccepted{} } -/* CheckDataIntegrityAccepted describes a response with status code 202, with default header values. +/* +CheckDataIntegrityAccepted describes a response with status code 202, with default header values. Base empty response */ @@ -83,9 +84,39 @@ type CheckDataIntegrityAccepted struct { Payload *rest_model.Empty } +// IsSuccess returns true when this check data integrity accepted response has a 2xx status code +func (o *CheckDataIntegrityAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this check data integrity accepted response has a 3xx status code +func (o *CheckDataIntegrityAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this check data integrity accepted response has a 4xx status code +func (o *CheckDataIntegrityAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this check data integrity accepted response has a 5xx status code +func (o *CheckDataIntegrityAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this check data integrity accepted response a status code equal to that given +func (o *CheckDataIntegrityAccepted) IsCode(code int) bool { + return code == 202 +} + func (o *CheckDataIntegrityAccepted) Error() string { return fmt.Sprintf("[POST /database/check-data-integrity][%d] checkDataIntegrityAccepted %+v", 202, o.Payload) } + +func (o *CheckDataIntegrityAccepted) String() string { + return fmt.Sprintf("[POST /database/check-data-integrity][%d] checkDataIntegrityAccepted %+v", 202, o.Payload) +} + func (o *CheckDataIntegrityAccepted) GetPayload() *rest_model.Empty { return o.Payload } @@ -107,7 +138,8 @@ func NewCheckDataIntegrityUnauthorized() *CheckDataIntegrityUnauthorized { return &CheckDataIntegrityUnauthorized{} } -/* CheckDataIntegrityUnauthorized describes a response with status code 401, with default header values. +/* +CheckDataIntegrityUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -115,9 +147,39 @@ type CheckDataIntegrityUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this check data integrity unauthorized response has a 2xx status code +func (o *CheckDataIntegrityUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this check data integrity unauthorized response has a 3xx status code +func (o *CheckDataIntegrityUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this check data integrity unauthorized response has a 4xx status code +func (o *CheckDataIntegrityUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this check data integrity unauthorized response has a 5xx status code +func (o *CheckDataIntegrityUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this check data integrity unauthorized response a status code equal to that given +func (o *CheckDataIntegrityUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *CheckDataIntegrityUnauthorized) Error() string { return fmt.Sprintf("[POST /database/check-data-integrity][%d] checkDataIntegrityUnauthorized %+v", 401, o.Payload) } + +func (o *CheckDataIntegrityUnauthorized) String() string { + return fmt.Sprintf("[POST /database/check-data-integrity][%d] checkDataIntegrityUnauthorized %+v", 401, o.Payload) +} + func (o *CheckDataIntegrityUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewCheckDataIntegrityTooManyRequests() *CheckDataIntegrityTooManyRequests { return &CheckDataIntegrityTooManyRequests{} } -/* CheckDataIntegrityTooManyRequests describes a response with status code 429, with default header values. +/* +CheckDataIntegrityTooManyRequests describes a response with status code 429, with default header values. The resource requested is rate limited and the rate limit has been exceeded */ @@ -147,9 +210,39 @@ type CheckDataIntegrityTooManyRequests struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this check data integrity too many requests response has a 2xx status code +func (o *CheckDataIntegrityTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this check data integrity too many requests response has a 3xx status code +func (o *CheckDataIntegrityTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this check data integrity too many requests response has a 4xx status code +func (o *CheckDataIntegrityTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this check data integrity too many requests response has a 5xx status code +func (o *CheckDataIntegrityTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this check data integrity too many requests response a status code equal to that given +func (o *CheckDataIntegrityTooManyRequests) IsCode(code int) bool { + return code == 429 +} + func (o *CheckDataIntegrityTooManyRequests) Error() string { return fmt.Sprintf("[POST /database/check-data-integrity][%d] checkDataIntegrityTooManyRequests %+v", 429, o.Payload) } + +func (o *CheckDataIntegrityTooManyRequests) String() string { + return fmt.Sprintf("[POST /database/check-data-integrity][%d] checkDataIntegrityTooManyRequests %+v", 429, o.Payload) +} + func (o *CheckDataIntegrityTooManyRequests) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/database/create_database_snapshot_parameters.go b/rest_client/database/create_database_snapshot_parameters.go index 88526af8f..ebd173e3d 100644 --- a/rest_client/database/create_database_snapshot_parameters.go +++ b/rest_client/database/create_database_snapshot_parameters.go @@ -76,10 +76,12 @@ func NewCreateDatabaseSnapshotParamsWithHTTPClient(client *http.Client) *CreateD } } -/* CreateDatabaseSnapshotParams contains all the parameters to send to the API endpoint - for the create database snapshot operation. +/* +CreateDatabaseSnapshotParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the create database snapshot operation. + + Typically these are written to a http.Request. */ type CreateDatabaseSnapshotParams struct { timeout time.Duration diff --git a/rest_client/database/create_database_snapshot_responses.go b/rest_client/database/create_database_snapshot_responses.go index c738d03fb..367cc6f74 100644 --- a/rest_client/database/create_database_snapshot_responses.go +++ b/rest_client/database/create_database_snapshot_responses.go @@ -75,7 +75,8 @@ func NewCreateDatabaseSnapshotOK() *CreateDatabaseSnapshotOK { return &CreateDatabaseSnapshotOK{} } -/* CreateDatabaseSnapshotOK describes a response with status code 200, with default header values. +/* +CreateDatabaseSnapshotOK describes a response with status code 200, with default header values. Base empty response */ @@ -83,9 +84,39 @@ type CreateDatabaseSnapshotOK struct { Payload *rest_model.Empty } +// IsSuccess returns true when this create database snapshot o k response has a 2xx status code +func (o *CreateDatabaseSnapshotOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this create database snapshot o k response has a 3xx status code +func (o *CreateDatabaseSnapshotOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create database snapshot o k response has a 4xx status code +func (o *CreateDatabaseSnapshotOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this create database snapshot o k response has a 5xx status code +func (o *CreateDatabaseSnapshotOK) IsServerError() bool { + return false +} + +// IsCode returns true when this create database snapshot o k response a status code equal to that given +func (o *CreateDatabaseSnapshotOK) IsCode(code int) bool { + return code == 200 +} + func (o *CreateDatabaseSnapshotOK) Error() string { return fmt.Sprintf("[POST /database][%d] createDatabaseSnapshotOK %+v", 200, o.Payload) } + +func (o *CreateDatabaseSnapshotOK) String() string { + return fmt.Sprintf("[POST /database][%d] createDatabaseSnapshotOK %+v", 200, o.Payload) +} + func (o *CreateDatabaseSnapshotOK) GetPayload() *rest_model.Empty { return o.Payload } @@ -107,7 +138,8 @@ func NewCreateDatabaseSnapshotUnauthorized() *CreateDatabaseSnapshotUnauthorized return &CreateDatabaseSnapshotUnauthorized{} } -/* CreateDatabaseSnapshotUnauthorized describes a response with status code 401, with default header values. +/* +CreateDatabaseSnapshotUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -115,9 +147,39 @@ type CreateDatabaseSnapshotUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this create database snapshot unauthorized response has a 2xx status code +func (o *CreateDatabaseSnapshotUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create database snapshot unauthorized response has a 3xx status code +func (o *CreateDatabaseSnapshotUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create database snapshot unauthorized response has a 4xx status code +func (o *CreateDatabaseSnapshotUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this create database snapshot unauthorized response has a 5xx status code +func (o *CreateDatabaseSnapshotUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this create database snapshot unauthorized response a status code equal to that given +func (o *CreateDatabaseSnapshotUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *CreateDatabaseSnapshotUnauthorized) Error() string { return fmt.Sprintf("[POST /database][%d] createDatabaseSnapshotUnauthorized %+v", 401, o.Payload) } + +func (o *CreateDatabaseSnapshotUnauthorized) String() string { + return fmt.Sprintf("[POST /database][%d] createDatabaseSnapshotUnauthorized %+v", 401, o.Payload) +} + func (o *CreateDatabaseSnapshotUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewCreateDatabaseSnapshotTooManyRequests() *CreateDatabaseSnapshotTooManyRe return &CreateDatabaseSnapshotTooManyRequests{} } -/* CreateDatabaseSnapshotTooManyRequests describes a response with status code 429, with default header values. +/* +CreateDatabaseSnapshotTooManyRequests describes a response with status code 429, with default header values. The resource requested is rate limited and the rate limit has been exceeded */ @@ -147,9 +210,39 @@ type CreateDatabaseSnapshotTooManyRequests struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this create database snapshot too many requests response has a 2xx status code +func (o *CreateDatabaseSnapshotTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create database snapshot too many requests response has a 3xx status code +func (o *CreateDatabaseSnapshotTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create database snapshot too many requests response has a 4xx status code +func (o *CreateDatabaseSnapshotTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this create database snapshot too many requests response has a 5xx status code +func (o *CreateDatabaseSnapshotTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this create database snapshot too many requests response a status code equal to that given +func (o *CreateDatabaseSnapshotTooManyRequests) IsCode(code int) bool { + return code == 429 +} + func (o *CreateDatabaseSnapshotTooManyRequests) Error() string { return fmt.Sprintf("[POST /database][%d] createDatabaseSnapshotTooManyRequests %+v", 429, o.Payload) } + +func (o *CreateDatabaseSnapshotTooManyRequests) String() string { + return fmt.Sprintf("[POST /database][%d] createDatabaseSnapshotTooManyRequests %+v", 429, o.Payload) +} + func (o *CreateDatabaseSnapshotTooManyRequests) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/database/data_integrity_results_parameters.go b/rest_client/database/data_integrity_results_parameters.go index 801fdffc9..ed620ef70 100644 --- a/rest_client/database/data_integrity_results_parameters.go +++ b/rest_client/database/data_integrity_results_parameters.go @@ -76,10 +76,12 @@ func NewDataIntegrityResultsParamsWithHTTPClient(client *http.Client) *DataInteg } } -/* DataIntegrityResultsParams contains all the parameters to send to the API endpoint - for the data integrity results operation. +/* +DataIntegrityResultsParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the data integrity results operation. + + Typically these are written to a http.Request. */ type DataIntegrityResultsParams struct { timeout time.Duration diff --git a/rest_client/database/data_integrity_results_responses.go b/rest_client/database/data_integrity_results_responses.go index e1c0ad576..33088e71a 100644 --- a/rest_client/database/data_integrity_results_responses.go +++ b/rest_client/database/data_integrity_results_responses.go @@ -69,7 +69,8 @@ func NewDataIntegrityResultsOK() *DataIntegrityResultsOK { return &DataIntegrityResultsOK{} } -/* DataIntegrityResultsOK describes a response with status code 200, with default header values. +/* +DataIntegrityResultsOK describes a response with status code 200, with default header values. A list of data integrity issues found */ @@ -77,9 +78,39 @@ type DataIntegrityResultsOK struct { Payload *rest_model.DataIntegrityCheckResultEnvelope } +// IsSuccess returns true when this data integrity results o k response has a 2xx status code +func (o *DataIntegrityResultsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this data integrity results o k response has a 3xx status code +func (o *DataIntegrityResultsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this data integrity results o k response has a 4xx status code +func (o *DataIntegrityResultsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this data integrity results o k response has a 5xx status code +func (o *DataIntegrityResultsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this data integrity results o k response a status code equal to that given +func (o *DataIntegrityResultsOK) IsCode(code int) bool { + return code == 200 +} + func (o *DataIntegrityResultsOK) Error() string { return fmt.Sprintf("[GET /database/data-integrity-results][%d] dataIntegrityResultsOK %+v", 200, o.Payload) } + +func (o *DataIntegrityResultsOK) String() string { + return fmt.Sprintf("[GET /database/data-integrity-results][%d] dataIntegrityResultsOK %+v", 200, o.Payload) +} + func (o *DataIntegrityResultsOK) GetPayload() *rest_model.DataIntegrityCheckResultEnvelope { return o.Payload } @@ -101,7 +132,8 @@ func NewDataIntegrityResultsUnauthorized() *DataIntegrityResultsUnauthorized { return &DataIntegrityResultsUnauthorized{} } -/* DataIntegrityResultsUnauthorized describes a response with status code 401, with default header values. +/* +DataIntegrityResultsUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -109,9 +141,39 @@ type DataIntegrityResultsUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this data integrity results unauthorized response has a 2xx status code +func (o *DataIntegrityResultsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this data integrity results unauthorized response has a 3xx status code +func (o *DataIntegrityResultsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this data integrity results unauthorized response has a 4xx status code +func (o *DataIntegrityResultsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this data integrity results unauthorized response has a 5xx status code +func (o *DataIntegrityResultsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this data integrity results unauthorized response a status code equal to that given +func (o *DataIntegrityResultsUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *DataIntegrityResultsUnauthorized) Error() string { return fmt.Sprintf("[GET /database/data-integrity-results][%d] dataIntegrityResultsUnauthorized %+v", 401, o.Payload) } + +func (o *DataIntegrityResultsUnauthorized) String() string { + return fmt.Sprintf("[GET /database/data-integrity-results][%d] dataIntegrityResultsUnauthorized %+v", 401, o.Payload) +} + func (o *DataIntegrityResultsUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/database/database_client.go b/rest_client/database/database_client.go index a69195ef2..19a11285f 100644 --- a/rest_client/database/database_client.go +++ b/rest_client/database/database_client.go @@ -66,9 +66,9 @@ type ClientService interface { } /* - CheckDataIntegrity starts a data integrity scan on the datastore +CheckDataIntegrity starts a data integrity scan on the datastore - Starts a data integrity scan on the datastore. Requires admin access. Only once instance may run at a time, including runs of fixDataIntegrity. +Starts a data integrity scan on the datastore. Requires admin access. Only once instance may run at a time, including runs of fixDataIntegrity. */ func (a *Client) CheckDataIntegrity(params *CheckDataIntegrityParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CheckDataIntegrityAccepted, error) { // TODO: Validate the params before sending @@ -107,9 +107,9 @@ func (a *Client) CheckDataIntegrity(params *CheckDataIntegrityParams, authInfo r } /* - CreateDatabaseSnapshot creates a new database snapshot +CreateDatabaseSnapshot creates a new database snapshot - Create a new database snapshot. Requires admin access. +Create a new database snapshot. Requires admin access. */ func (a *Client) CreateDatabaseSnapshot(params *CreateDatabaseSnapshotParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDatabaseSnapshotOK, error) { // TODO: Validate the params before sending @@ -148,9 +148,9 @@ func (a *Client) CreateDatabaseSnapshot(params *CreateDatabaseSnapshotParams, au } /* - DataIntegrityResults returns any results found from in progress integrity checks +DataIntegrityResults returns any results found from in progress integrity checks - Returns any results found from in-progress integrity checks. Requires admin access. +Returns any results found from in-progress integrity checks. Requires admin access. */ func (a *Client) DataIntegrityResults(params *DataIntegrityResultsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DataIntegrityResultsOK, error) { // TODO: Validate the params before sending @@ -189,9 +189,9 @@ func (a *Client) DataIntegrityResults(params *DataIntegrityResultsParams, authIn } /* - FixDataIntegrity runs a data integrity scan on the datastore attempts to fix any issues it can and returns any found issues +FixDataIntegrity runs a data integrity scan on the datastore attempts to fix any issues it can and returns any found issues - Runs a data integrity scan on the datastore, attempts to fix any issues it can, and returns any found issues. Requires admin access. Only once instance may run at a time, including runs of checkDataIntegrity. +Runs a data integrity scan on the datastore, attempts to fix any issues it can, and returns any found issues. Requires admin access. Only once instance may run at a time, including runs of checkDataIntegrity. */ func (a *Client) FixDataIntegrity(params *FixDataIntegrityParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FixDataIntegrityAccepted, error) { // TODO: Validate the params before sending diff --git a/rest_client/database/fix_data_integrity_parameters.go b/rest_client/database/fix_data_integrity_parameters.go index 2adbd1228..209cb870e 100644 --- a/rest_client/database/fix_data_integrity_parameters.go +++ b/rest_client/database/fix_data_integrity_parameters.go @@ -76,10 +76,12 @@ func NewFixDataIntegrityParamsWithHTTPClient(client *http.Client) *FixDataIntegr } } -/* FixDataIntegrityParams contains all the parameters to send to the API endpoint - for the fix data integrity operation. +/* +FixDataIntegrityParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the fix data integrity operation. + + Typically these are written to a http.Request. */ type FixDataIntegrityParams struct { timeout time.Duration diff --git a/rest_client/database/fix_data_integrity_responses.go b/rest_client/database/fix_data_integrity_responses.go index 543bcca70..3c736bc69 100644 --- a/rest_client/database/fix_data_integrity_responses.go +++ b/rest_client/database/fix_data_integrity_responses.go @@ -75,7 +75,8 @@ func NewFixDataIntegrityAccepted() *FixDataIntegrityAccepted { return &FixDataIntegrityAccepted{} } -/* FixDataIntegrityAccepted describes a response with status code 202, with default header values. +/* +FixDataIntegrityAccepted describes a response with status code 202, with default header values. Base empty response */ @@ -83,9 +84,39 @@ type FixDataIntegrityAccepted struct { Payload *rest_model.Empty } +// IsSuccess returns true when this fix data integrity accepted response has a 2xx status code +func (o *FixDataIntegrityAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this fix data integrity accepted response has a 3xx status code +func (o *FixDataIntegrityAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this fix data integrity accepted response has a 4xx status code +func (o *FixDataIntegrityAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this fix data integrity accepted response has a 5xx status code +func (o *FixDataIntegrityAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this fix data integrity accepted response a status code equal to that given +func (o *FixDataIntegrityAccepted) IsCode(code int) bool { + return code == 202 +} + func (o *FixDataIntegrityAccepted) Error() string { return fmt.Sprintf("[POST /database/fix-data-integrity][%d] fixDataIntegrityAccepted %+v", 202, o.Payload) } + +func (o *FixDataIntegrityAccepted) String() string { + return fmt.Sprintf("[POST /database/fix-data-integrity][%d] fixDataIntegrityAccepted %+v", 202, o.Payload) +} + func (o *FixDataIntegrityAccepted) GetPayload() *rest_model.Empty { return o.Payload } @@ -107,7 +138,8 @@ func NewFixDataIntegrityUnauthorized() *FixDataIntegrityUnauthorized { return &FixDataIntegrityUnauthorized{} } -/* FixDataIntegrityUnauthorized describes a response with status code 401, with default header values. +/* +FixDataIntegrityUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -115,9 +147,39 @@ type FixDataIntegrityUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this fix data integrity unauthorized response has a 2xx status code +func (o *FixDataIntegrityUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this fix data integrity unauthorized response has a 3xx status code +func (o *FixDataIntegrityUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this fix data integrity unauthorized response has a 4xx status code +func (o *FixDataIntegrityUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this fix data integrity unauthorized response has a 5xx status code +func (o *FixDataIntegrityUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this fix data integrity unauthorized response a status code equal to that given +func (o *FixDataIntegrityUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *FixDataIntegrityUnauthorized) Error() string { return fmt.Sprintf("[POST /database/fix-data-integrity][%d] fixDataIntegrityUnauthorized %+v", 401, o.Payload) } + +func (o *FixDataIntegrityUnauthorized) String() string { + return fmt.Sprintf("[POST /database/fix-data-integrity][%d] fixDataIntegrityUnauthorized %+v", 401, o.Payload) +} + func (o *FixDataIntegrityUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewFixDataIntegrityTooManyRequests() *FixDataIntegrityTooManyRequests { return &FixDataIntegrityTooManyRequests{} } -/* FixDataIntegrityTooManyRequests describes a response with status code 429, with default header values. +/* +FixDataIntegrityTooManyRequests describes a response with status code 429, with default header values. The resource requested is rate limited and the rate limit has been exceeded */ @@ -147,9 +210,39 @@ type FixDataIntegrityTooManyRequests struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this fix data integrity too many requests response has a 2xx status code +func (o *FixDataIntegrityTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this fix data integrity too many requests response has a 3xx status code +func (o *FixDataIntegrityTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this fix data integrity too many requests response has a 4xx status code +func (o *FixDataIntegrityTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this fix data integrity too many requests response has a 5xx status code +func (o *FixDataIntegrityTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this fix data integrity too many requests response a status code equal to that given +func (o *FixDataIntegrityTooManyRequests) IsCode(code int) bool { + return code == 429 +} + func (o *FixDataIntegrityTooManyRequests) Error() string { return fmt.Sprintf("[POST /database/fix-data-integrity][%d] fixDataIntegrityTooManyRequests %+v", 429, o.Payload) } + +func (o *FixDataIntegrityTooManyRequests) String() string { + return fmt.Sprintf("[POST /database/fix-data-integrity][%d] fixDataIntegrityTooManyRequests %+v", 429, o.Payload) +} + func (o *FixDataIntegrityTooManyRequests) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/inspect/inspect_client.go b/rest_client/inspect/inspect_client.go index f995c6fd5..a81a4c917 100644 --- a/rest_client/inspect/inspect_client.go +++ b/rest_client/inspect/inspect_client.go @@ -60,10 +60,9 @@ type ClientService interface { } /* - Inspect inspects system values - - Requests system information, such as stack dumps or information about capabilities. Requires admin access. +Inspect inspects system values +Requests system information, such as stack dumps or information about capabilities. Requires admin access. */ func (a *Client) Inspect(params *InspectParams, opts ...ClientOption) (*InspectOK, error) { // TODO: Validate the params before sending diff --git a/rest_client/inspect/inspect_parameters.go b/rest_client/inspect/inspect_parameters.go index a2e20469b..4cf41e189 100644 --- a/rest_client/inspect/inspect_parameters.go +++ b/rest_client/inspect/inspect_parameters.go @@ -78,10 +78,12 @@ func NewInspectParamsWithHTTPClient(client *http.Client) *InspectParams { } } -/* InspectParams contains all the parameters to send to the API endpoint - for the inspect operation. +/* +InspectParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the inspect operation. + + Typically these are written to a http.Request. */ type InspectParams struct { diff --git a/rest_client/inspect/inspect_responses.go b/rest_client/inspect/inspect_responses.go index 069a5c344..c76a8c906 100644 --- a/rest_client/inspect/inspect_responses.go +++ b/rest_client/inspect/inspect_responses.go @@ -69,7 +69,8 @@ func NewInspectOK() *InspectOK { return &InspectOK{} } -/* InspectOK describes a response with status code 200, with default header values. +/* +InspectOK describes a response with status code 200, with default header values. A response to an inspect request */ @@ -77,9 +78,39 @@ type InspectOK struct { Payload *rest_model.InspectResponse } +// IsSuccess returns true when this inspect o k response has a 2xx status code +func (o *InspectOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this inspect o k response has a 3xx status code +func (o *InspectOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this inspect o k response has a 4xx status code +func (o *InspectOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this inspect o k response has a 5xx status code +func (o *InspectOK) IsServerError() bool { + return false +} + +// IsCode returns true when this inspect o k response a status code equal to that given +func (o *InspectOK) IsCode(code int) bool { + return code == 200 +} + func (o *InspectOK) Error() string { return fmt.Sprintf("[POST /inspections][%d] inspectOK %+v", 200, o.Payload) } + +func (o *InspectOK) String() string { + return fmt.Sprintf("[POST /inspections][%d] inspectOK %+v", 200, o.Payload) +} + func (o *InspectOK) GetPayload() *rest_model.InspectResponse { return o.Payload } @@ -101,7 +132,8 @@ func NewInspectUnauthorized() *InspectUnauthorized { return &InspectUnauthorized{} } -/* InspectUnauthorized describes a response with status code 401, with default header values. +/* +InspectUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -109,9 +141,39 @@ type InspectUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this inspect unauthorized response has a 2xx status code +func (o *InspectUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this inspect unauthorized response has a 3xx status code +func (o *InspectUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this inspect unauthorized response has a 4xx status code +func (o *InspectUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this inspect unauthorized response has a 5xx status code +func (o *InspectUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this inspect unauthorized response a status code equal to that given +func (o *InspectUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *InspectUnauthorized) Error() string { return fmt.Sprintf("[POST /inspections][%d] inspectUnauthorized %+v", 401, o.Payload) } + +func (o *InspectUnauthorized) String() string { + return fmt.Sprintf("[POST /inspections][%d] inspectUnauthorized %+v", 401, o.Payload) +} + func (o *InspectUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/link/delete_link_parameters.go b/rest_client/link/delete_link_parameters.go index fe2368fdf..97d893705 100644 --- a/rest_client/link/delete_link_parameters.go +++ b/rest_client/link/delete_link_parameters.go @@ -76,10 +76,12 @@ func NewDeleteLinkParamsWithHTTPClient(client *http.Client) *DeleteLinkParams { } } -/* DeleteLinkParams contains all the parameters to send to the API endpoint - for the delete link operation. +/* +DeleteLinkParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the delete link operation. + + Typically these are written to a http.Request. */ type DeleteLinkParams struct { diff --git a/rest_client/link/delete_link_responses.go b/rest_client/link/delete_link_responses.go index 17ebfe779..b9c35c43f 100644 --- a/rest_client/link/delete_link_responses.go +++ b/rest_client/link/delete_link_responses.go @@ -75,7 +75,8 @@ func NewDeleteLinkOK() *DeleteLinkOK { return &DeleteLinkOK{} } -/* DeleteLinkOK describes a response with status code 200, with default header values. +/* +DeleteLinkOK describes a response with status code 200, with default header values. The delete request was successful and the resource has been removed */ @@ -83,9 +84,39 @@ type DeleteLinkOK struct { Payload *rest_model.Empty } +// IsSuccess returns true when this delete link o k response has a 2xx status code +func (o *DeleteLinkOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this delete link o k response has a 3xx status code +func (o *DeleteLinkOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete link o k response has a 4xx status code +func (o *DeleteLinkOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete link o k response has a 5xx status code +func (o *DeleteLinkOK) IsServerError() bool { + return false +} + +// IsCode returns true when this delete link o k response a status code equal to that given +func (o *DeleteLinkOK) IsCode(code int) bool { + return code == 200 +} + func (o *DeleteLinkOK) Error() string { return fmt.Sprintf("[DELETE /links/{id}][%d] deleteLinkOK %+v", 200, o.Payload) } + +func (o *DeleteLinkOK) String() string { + return fmt.Sprintf("[DELETE /links/{id}][%d] deleteLinkOK %+v", 200, o.Payload) +} + func (o *DeleteLinkOK) GetPayload() *rest_model.Empty { return o.Payload } @@ -107,7 +138,8 @@ func NewDeleteLinkBadRequest() *DeleteLinkBadRequest { return &DeleteLinkBadRequest{} } -/* DeleteLinkBadRequest describes a response with status code 400, with default header values. +/* +DeleteLinkBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -115,9 +147,39 @@ type DeleteLinkBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this delete link bad request response has a 2xx status code +func (o *DeleteLinkBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete link bad request response has a 3xx status code +func (o *DeleteLinkBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete link bad request response has a 4xx status code +func (o *DeleteLinkBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete link bad request response has a 5xx status code +func (o *DeleteLinkBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this delete link bad request response a status code equal to that given +func (o *DeleteLinkBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *DeleteLinkBadRequest) Error() string { return fmt.Sprintf("[DELETE /links/{id}][%d] deleteLinkBadRequest %+v", 400, o.Payload) } + +func (o *DeleteLinkBadRequest) String() string { + return fmt.Sprintf("[DELETE /links/{id}][%d] deleteLinkBadRequest %+v", 400, o.Payload) +} + func (o *DeleteLinkBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewDeleteLinkUnauthorized() *DeleteLinkUnauthorized { return &DeleteLinkUnauthorized{} } -/* DeleteLinkUnauthorized describes a response with status code 401, with default header values. +/* +DeleteLinkUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -147,9 +210,39 @@ type DeleteLinkUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this delete link unauthorized response has a 2xx status code +func (o *DeleteLinkUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete link unauthorized response has a 3xx status code +func (o *DeleteLinkUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete link unauthorized response has a 4xx status code +func (o *DeleteLinkUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete link unauthorized response has a 5xx status code +func (o *DeleteLinkUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this delete link unauthorized response a status code equal to that given +func (o *DeleteLinkUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *DeleteLinkUnauthorized) Error() string { return fmt.Sprintf("[DELETE /links/{id}][%d] deleteLinkUnauthorized %+v", 401, o.Payload) } + +func (o *DeleteLinkUnauthorized) String() string { + return fmt.Sprintf("[DELETE /links/{id}][%d] deleteLinkUnauthorized %+v", 401, o.Payload) +} + func (o *DeleteLinkUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/link/detail_link_parameters.go b/rest_client/link/detail_link_parameters.go index 7f9bcdb11..4cfd36892 100644 --- a/rest_client/link/detail_link_parameters.go +++ b/rest_client/link/detail_link_parameters.go @@ -76,10 +76,12 @@ func NewDetailLinkParamsWithHTTPClient(client *http.Client) *DetailLinkParams { } } -/* DetailLinkParams contains all the parameters to send to the API endpoint - for the detail link operation. +/* +DetailLinkParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the detail link operation. + + Typically these are written to a http.Request. */ type DetailLinkParams struct { diff --git a/rest_client/link/detail_link_responses.go b/rest_client/link/detail_link_responses.go index bb56e28f0..22b2b1cbd 100644 --- a/rest_client/link/detail_link_responses.go +++ b/rest_client/link/detail_link_responses.go @@ -75,7 +75,8 @@ func NewDetailLinkOK() *DetailLinkOK { return &DetailLinkOK{} } -/* DetailLinkOK describes a response with status code 200, with default header values. +/* +DetailLinkOK describes a response with status code 200, with default header values. A single link */ @@ -83,9 +84,39 @@ type DetailLinkOK struct { Payload *rest_model.DetailLinkEnvelope } +// IsSuccess returns true when this detail link o k response has a 2xx status code +func (o *DetailLinkOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this detail link o k response has a 3xx status code +func (o *DetailLinkOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail link o k response has a 4xx status code +func (o *DetailLinkOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this detail link o k response has a 5xx status code +func (o *DetailLinkOK) IsServerError() bool { + return false +} + +// IsCode returns true when this detail link o k response a status code equal to that given +func (o *DetailLinkOK) IsCode(code int) bool { + return code == 200 +} + func (o *DetailLinkOK) Error() string { return fmt.Sprintf("[GET /links/{id}][%d] detailLinkOK %+v", 200, o.Payload) } + +func (o *DetailLinkOK) String() string { + return fmt.Sprintf("[GET /links/{id}][%d] detailLinkOK %+v", 200, o.Payload) +} + func (o *DetailLinkOK) GetPayload() *rest_model.DetailLinkEnvelope { return o.Payload } @@ -107,7 +138,8 @@ func NewDetailLinkUnauthorized() *DetailLinkUnauthorized { return &DetailLinkUnauthorized{} } -/* DetailLinkUnauthorized describes a response with status code 401, with default header values. +/* +DetailLinkUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -115,9 +147,39 @@ type DetailLinkUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this detail link unauthorized response has a 2xx status code +func (o *DetailLinkUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this detail link unauthorized response has a 3xx status code +func (o *DetailLinkUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail link unauthorized response has a 4xx status code +func (o *DetailLinkUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this detail link unauthorized response has a 5xx status code +func (o *DetailLinkUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this detail link unauthorized response a status code equal to that given +func (o *DetailLinkUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *DetailLinkUnauthorized) Error() string { return fmt.Sprintf("[GET /links/{id}][%d] detailLinkUnauthorized %+v", 401, o.Payload) } + +func (o *DetailLinkUnauthorized) String() string { + return fmt.Sprintf("[GET /links/{id}][%d] detailLinkUnauthorized %+v", 401, o.Payload) +} + func (o *DetailLinkUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewDetailLinkNotFound() *DetailLinkNotFound { return &DetailLinkNotFound{} } -/* DetailLinkNotFound describes a response with status code 404, with default header values. +/* +DetailLinkNotFound describes a response with status code 404, with default header values. The requested resource does not exist */ @@ -147,9 +210,39 @@ type DetailLinkNotFound struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this detail link not found response has a 2xx status code +func (o *DetailLinkNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this detail link not found response has a 3xx status code +func (o *DetailLinkNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail link not found response has a 4xx status code +func (o *DetailLinkNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this detail link not found response has a 5xx status code +func (o *DetailLinkNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this detail link not found response a status code equal to that given +func (o *DetailLinkNotFound) IsCode(code int) bool { + return code == 404 +} + func (o *DetailLinkNotFound) Error() string { return fmt.Sprintf("[GET /links/{id}][%d] detailLinkNotFound %+v", 404, o.Payload) } + +func (o *DetailLinkNotFound) String() string { + return fmt.Sprintf("[GET /links/{id}][%d] detailLinkNotFound %+v", 404, o.Payload) +} + func (o *DetailLinkNotFound) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/link/link_client.go b/rest_client/link/link_client.go index 6c1034f5a..3aa537e6c 100644 --- a/rest_client/link/link_client.go +++ b/rest_client/link/link_client.go @@ -66,9 +66,9 @@ type ClientService interface { } /* - DeleteLink deletes a link +DeleteLink deletes a link - Delete a link by id. Requires admin access. +Delete a link by id. Requires admin access. */ func (a *Client) DeleteLink(params *DeleteLinkParams, opts ...ClientOption) (*DeleteLinkOK, error) { // TODO: Validate the params before sending @@ -106,9 +106,9 @@ func (a *Client) DeleteLink(params *DeleteLinkParams, opts ...ClientOption) (*De } /* - DetailLink retrieves a single link +DetailLink retrieves a single link - Retrieves a single link by id. Requires admin access. +Retrieves a single link by id. Requires admin access. */ func (a *Client) DetailLink(params *DetailLinkParams, opts ...ClientOption) (*DetailLinkOK, error) { // TODO: Validate the params before sending @@ -146,10 +146,9 @@ func (a *Client) DetailLink(params *DetailLinkParams, opts ...ClientOption) (*De } /* - ListLinks lists links - - Retrieves a list of link resources; does not supports filtering, sorting, or pagination. Requires admin access. +ListLinks lists links +Retrieves a list of link resources; does not supports filtering, sorting, or pagination. Requires admin access. */ func (a *Client) ListLinks(params *ListLinksParams, opts ...ClientOption) (*ListLinksOK, error) { // TODO: Validate the params before sending @@ -187,9 +186,9 @@ func (a *Client) ListLinks(params *ListLinksParams, opts ...ClientOption) (*List } /* - PatchLink updates the supplied fields on a link +PatchLink updates the supplied fields on a link - Update the supplied fields on a link. Requires admin access. +Update the supplied fields on a link. Requires admin access. */ func (a *Client) PatchLink(params *PatchLinkParams, opts ...ClientOption) (*PatchLinkOK, error) { // TODO: Validate the params before sending diff --git a/rest_client/link/list_links_parameters.go b/rest_client/link/list_links_parameters.go index f80058307..d175dae8f 100644 --- a/rest_client/link/list_links_parameters.go +++ b/rest_client/link/list_links_parameters.go @@ -76,10 +76,12 @@ func NewListLinksParamsWithHTTPClient(client *http.Client) *ListLinksParams { } } -/* ListLinksParams contains all the parameters to send to the API endpoint - for the list links operation. +/* +ListLinksParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the list links operation. + + Typically these are written to a http.Request. */ type ListLinksParams struct { timeout time.Duration diff --git a/rest_client/link/list_links_responses.go b/rest_client/link/list_links_responses.go index cb2ccb1fd..bfb9d0a8a 100644 --- a/rest_client/link/list_links_responses.go +++ b/rest_client/link/list_links_responses.go @@ -69,7 +69,8 @@ func NewListLinksOK() *ListLinksOK { return &ListLinksOK{} } -/* ListLinksOK describes a response with status code 200, with default header values. +/* +ListLinksOK describes a response with status code 200, with default header values. A list of links */ @@ -77,9 +78,39 @@ type ListLinksOK struct { Payload *rest_model.ListLinksEnvelope } +// IsSuccess returns true when this list links o k response has a 2xx status code +func (o *ListLinksOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this list links o k response has a 3xx status code +func (o *ListLinksOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list links o k response has a 4xx status code +func (o *ListLinksOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this list links o k response has a 5xx status code +func (o *ListLinksOK) IsServerError() bool { + return false +} + +// IsCode returns true when this list links o k response a status code equal to that given +func (o *ListLinksOK) IsCode(code int) bool { + return code == 200 +} + func (o *ListLinksOK) Error() string { return fmt.Sprintf("[GET /links][%d] listLinksOK %+v", 200, o.Payload) } + +func (o *ListLinksOK) String() string { + return fmt.Sprintf("[GET /links][%d] listLinksOK %+v", 200, o.Payload) +} + func (o *ListLinksOK) GetPayload() *rest_model.ListLinksEnvelope { return o.Payload } @@ -101,7 +132,8 @@ func NewListLinksUnauthorized() *ListLinksUnauthorized { return &ListLinksUnauthorized{} } -/* ListLinksUnauthorized describes a response with status code 401, with default header values. +/* +ListLinksUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -109,9 +141,39 @@ type ListLinksUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this list links unauthorized response has a 2xx status code +func (o *ListLinksUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list links unauthorized response has a 3xx status code +func (o *ListLinksUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list links unauthorized response has a 4xx status code +func (o *ListLinksUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this list links unauthorized response has a 5xx status code +func (o *ListLinksUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this list links unauthorized response a status code equal to that given +func (o *ListLinksUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *ListLinksUnauthorized) Error() string { return fmt.Sprintf("[GET /links][%d] listLinksUnauthorized %+v", 401, o.Payload) } + +func (o *ListLinksUnauthorized) String() string { + return fmt.Sprintf("[GET /links][%d] listLinksUnauthorized %+v", 401, o.Payload) +} + func (o *ListLinksUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/link/patch_link_parameters.go b/rest_client/link/patch_link_parameters.go index 0e3c72b00..07a2e87b9 100644 --- a/rest_client/link/patch_link_parameters.go +++ b/rest_client/link/patch_link_parameters.go @@ -78,10 +78,12 @@ func NewPatchLinkParamsWithHTTPClient(client *http.Client) *PatchLinkParams { } } -/* PatchLinkParams contains all the parameters to send to the API endpoint - for the patch link operation. +/* +PatchLinkParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the patch link operation. + + Typically these are written to a http.Request. */ type PatchLinkParams struct { diff --git a/rest_client/link/patch_link_responses.go b/rest_client/link/patch_link_responses.go index 5fa3caa9c..a544f2b65 100644 --- a/rest_client/link/patch_link_responses.go +++ b/rest_client/link/patch_link_responses.go @@ -81,7 +81,8 @@ func NewPatchLinkOK() *PatchLinkOK { return &PatchLinkOK{} } -/* PatchLinkOK describes a response with status code 200, with default header values. +/* +PatchLinkOK describes a response with status code 200, with default header values. The patch request was successful and the resource has been altered */ @@ -89,9 +90,39 @@ type PatchLinkOK struct { Payload *rest_model.Empty } +// IsSuccess returns true when this patch link o k response has a 2xx status code +func (o *PatchLinkOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this patch link o k response has a 3xx status code +func (o *PatchLinkOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch link o k response has a 4xx status code +func (o *PatchLinkOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this patch link o k response has a 5xx status code +func (o *PatchLinkOK) IsServerError() bool { + return false +} + +// IsCode returns true when this patch link o k response a status code equal to that given +func (o *PatchLinkOK) IsCode(code int) bool { + return code == 200 +} + func (o *PatchLinkOK) Error() string { return fmt.Sprintf("[PATCH /links/{id}][%d] patchLinkOK %+v", 200, o.Payload) } + +func (o *PatchLinkOK) String() string { + return fmt.Sprintf("[PATCH /links/{id}][%d] patchLinkOK %+v", 200, o.Payload) +} + func (o *PatchLinkOK) GetPayload() *rest_model.Empty { return o.Payload } @@ -113,7 +144,8 @@ func NewPatchLinkBadRequest() *PatchLinkBadRequest { return &PatchLinkBadRequest{} } -/* PatchLinkBadRequest describes a response with status code 400, with default header values. +/* +PatchLinkBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -121,9 +153,39 @@ type PatchLinkBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this patch link bad request response has a 2xx status code +func (o *PatchLinkBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch link bad request response has a 3xx status code +func (o *PatchLinkBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch link bad request response has a 4xx status code +func (o *PatchLinkBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch link bad request response has a 5xx status code +func (o *PatchLinkBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this patch link bad request response a status code equal to that given +func (o *PatchLinkBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *PatchLinkBadRequest) Error() string { return fmt.Sprintf("[PATCH /links/{id}][%d] patchLinkBadRequest %+v", 400, o.Payload) } + +func (o *PatchLinkBadRequest) String() string { + return fmt.Sprintf("[PATCH /links/{id}][%d] patchLinkBadRequest %+v", 400, o.Payload) +} + func (o *PatchLinkBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -145,7 +207,8 @@ func NewPatchLinkUnauthorized() *PatchLinkUnauthorized { return &PatchLinkUnauthorized{} } -/* PatchLinkUnauthorized describes a response with status code 401, with default header values. +/* +PatchLinkUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -153,9 +216,39 @@ type PatchLinkUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this patch link unauthorized response has a 2xx status code +func (o *PatchLinkUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch link unauthorized response has a 3xx status code +func (o *PatchLinkUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch link unauthorized response has a 4xx status code +func (o *PatchLinkUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch link unauthorized response has a 5xx status code +func (o *PatchLinkUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this patch link unauthorized response a status code equal to that given +func (o *PatchLinkUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *PatchLinkUnauthorized) Error() string { return fmt.Sprintf("[PATCH /links/{id}][%d] patchLinkUnauthorized %+v", 401, o.Payload) } + +func (o *PatchLinkUnauthorized) String() string { + return fmt.Sprintf("[PATCH /links/{id}][%d] patchLinkUnauthorized %+v", 401, o.Payload) +} + func (o *PatchLinkUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -177,7 +270,8 @@ func NewPatchLinkNotFound() *PatchLinkNotFound { return &PatchLinkNotFound{} } -/* PatchLinkNotFound describes a response with status code 404, with default header values. +/* +PatchLinkNotFound describes a response with status code 404, with default header values. The requested resource does not exist */ @@ -185,9 +279,39 @@ type PatchLinkNotFound struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this patch link not found response has a 2xx status code +func (o *PatchLinkNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch link not found response has a 3xx status code +func (o *PatchLinkNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch link not found response has a 4xx status code +func (o *PatchLinkNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch link not found response has a 5xx status code +func (o *PatchLinkNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this patch link not found response a status code equal to that given +func (o *PatchLinkNotFound) IsCode(code int) bool { + return code == 404 +} + func (o *PatchLinkNotFound) Error() string { return fmt.Sprintf("[PATCH /links/{id}][%d] patchLinkNotFound %+v", 404, o.Payload) } + +func (o *PatchLinkNotFound) String() string { + return fmt.Sprintf("[PATCH /links/{id}][%d] patchLinkNotFound %+v", 404, o.Payload) +} + func (o *PatchLinkNotFound) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/router/create_router_parameters.go b/rest_client/router/create_router_parameters.go index 958bf969d..71b8d2eaf 100644 --- a/rest_client/router/create_router_parameters.go +++ b/rest_client/router/create_router_parameters.go @@ -78,10 +78,12 @@ func NewCreateRouterParamsWithHTTPClient(client *http.Client) *CreateRouterParam } } -/* CreateRouterParams contains all the parameters to send to the API endpoint - for the create router operation. +/* +CreateRouterParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the create router operation. + + Typically these are written to a http.Request. */ type CreateRouterParams struct { diff --git a/rest_client/router/create_router_responses.go b/rest_client/router/create_router_responses.go index 05831d914..cb7ee90c0 100644 --- a/rest_client/router/create_router_responses.go +++ b/rest_client/router/create_router_responses.go @@ -75,7 +75,8 @@ func NewCreateRouterCreated() *CreateRouterCreated { return &CreateRouterCreated{} } -/* CreateRouterCreated describes a response with status code 201, with default header values. +/* +CreateRouterCreated describes a response with status code 201, with default header values. The create request was successful and the resource has been added at the following location */ @@ -83,9 +84,39 @@ type CreateRouterCreated struct { Payload *rest_model.CreateEnvelope } +// IsSuccess returns true when this create router created response has a 2xx status code +func (o *CreateRouterCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this create router created response has a 3xx status code +func (o *CreateRouterCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create router created response has a 4xx status code +func (o *CreateRouterCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this create router created response has a 5xx status code +func (o *CreateRouterCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this create router created response a status code equal to that given +func (o *CreateRouterCreated) IsCode(code int) bool { + return code == 201 +} + func (o *CreateRouterCreated) Error() string { return fmt.Sprintf("[POST /routers][%d] createRouterCreated %+v", 201, o.Payload) } + +func (o *CreateRouterCreated) String() string { + return fmt.Sprintf("[POST /routers][%d] createRouterCreated %+v", 201, o.Payload) +} + func (o *CreateRouterCreated) GetPayload() *rest_model.CreateEnvelope { return o.Payload } @@ -107,7 +138,8 @@ func NewCreateRouterBadRequest() *CreateRouterBadRequest { return &CreateRouterBadRequest{} } -/* CreateRouterBadRequest describes a response with status code 400, with default header values. +/* +CreateRouterBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -115,9 +147,39 @@ type CreateRouterBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this create router bad request response has a 2xx status code +func (o *CreateRouterBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create router bad request response has a 3xx status code +func (o *CreateRouterBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create router bad request response has a 4xx status code +func (o *CreateRouterBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this create router bad request response has a 5xx status code +func (o *CreateRouterBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this create router bad request response a status code equal to that given +func (o *CreateRouterBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *CreateRouterBadRequest) Error() string { return fmt.Sprintf("[POST /routers][%d] createRouterBadRequest %+v", 400, o.Payload) } + +func (o *CreateRouterBadRequest) String() string { + return fmt.Sprintf("[POST /routers][%d] createRouterBadRequest %+v", 400, o.Payload) +} + func (o *CreateRouterBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewCreateRouterUnauthorized() *CreateRouterUnauthorized { return &CreateRouterUnauthorized{} } -/* CreateRouterUnauthorized describes a response with status code 401, with default header values. +/* +CreateRouterUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -147,9 +210,39 @@ type CreateRouterUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this create router unauthorized response has a 2xx status code +func (o *CreateRouterUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create router unauthorized response has a 3xx status code +func (o *CreateRouterUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create router unauthorized response has a 4xx status code +func (o *CreateRouterUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this create router unauthorized response has a 5xx status code +func (o *CreateRouterUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this create router unauthorized response a status code equal to that given +func (o *CreateRouterUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *CreateRouterUnauthorized) Error() string { return fmt.Sprintf("[POST /routers][%d] createRouterUnauthorized %+v", 401, o.Payload) } + +func (o *CreateRouterUnauthorized) String() string { + return fmt.Sprintf("[POST /routers][%d] createRouterUnauthorized %+v", 401, o.Payload) +} + func (o *CreateRouterUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/router/delete_router_parameters.go b/rest_client/router/delete_router_parameters.go index a098aa341..8ca231be8 100644 --- a/rest_client/router/delete_router_parameters.go +++ b/rest_client/router/delete_router_parameters.go @@ -76,10 +76,12 @@ func NewDeleteRouterParamsWithHTTPClient(client *http.Client) *DeleteRouterParam } } -/* DeleteRouterParams contains all the parameters to send to the API endpoint - for the delete router operation. +/* +DeleteRouterParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the delete router operation. + + Typically these are written to a http.Request. */ type DeleteRouterParams struct { diff --git a/rest_client/router/delete_router_responses.go b/rest_client/router/delete_router_responses.go index f01340d16..a04900c98 100644 --- a/rest_client/router/delete_router_responses.go +++ b/rest_client/router/delete_router_responses.go @@ -81,7 +81,8 @@ func NewDeleteRouterOK() *DeleteRouterOK { return &DeleteRouterOK{} } -/* DeleteRouterOK describes a response with status code 200, with default header values. +/* +DeleteRouterOK describes a response with status code 200, with default header values. The delete request was successful and the resource has been removed */ @@ -89,9 +90,39 @@ type DeleteRouterOK struct { Payload *rest_model.Empty } +// IsSuccess returns true when this delete router o k response has a 2xx status code +func (o *DeleteRouterOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this delete router o k response has a 3xx status code +func (o *DeleteRouterOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete router o k response has a 4xx status code +func (o *DeleteRouterOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete router o k response has a 5xx status code +func (o *DeleteRouterOK) IsServerError() bool { + return false +} + +// IsCode returns true when this delete router o k response a status code equal to that given +func (o *DeleteRouterOK) IsCode(code int) bool { + return code == 200 +} + func (o *DeleteRouterOK) Error() string { return fmt.Sprintf("[DELETE /routers/{id}][%d] deleteRouterOK %+v", 200, o.Payload) } + +func (o *DeleteRouterOK) String() string { + return fmt.Sprintf("[DELETE /routers/{id}][%d] deleteRouterOK %+v", 200, o.Payload) +} + func (o *DeleteRouterOK) GetPayload() *rest_model.Empty { return o.Payload } @@ -113,7 +144,8 @@ func NewDeleteRouterBadRequest() *DeleteRouterBadRequest { return &DeleteRouterBadRequest{} } -/* DeleteRouterBadRequest describes a response with status code 400, with default header values. +/* +DeleteRouterBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -121,9 +153,39 @@ type DeleteRouterBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this delete router bad request response has a 2xx status code +func (o *DeleteRouterBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete router bad request response has a 3xx status code +func (o *DeleteRouterBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete router bad request response has a 4xx status code +func (o *DeleteRouterBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete router bad request response has a 5xx status code +func (o *DeleteRouterBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this delete router bad request response a status code equal to that given +func (o *DeleteRouterBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *DeleteRouterBadRequest) Error() string { return fmt.Sprintf("[DELETE /routers/{id}][%d] deleteRouterBadRequest %+v", 400, o.Payload) } + +func (o *DeleteRouterBadRequest) String() string { + return fmt.Sprintf("[DELETE /routers/{id}][%d] deleteRouterBadRequest %+v", 400, o.Payload) +} + func (o *DeleteRouterBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -145,7 +207,8 @@ func NewDeleteRouterUnauthorized() *DeleteRouterUnauthorized { return &DeleteRouterUnauthorized{} } -/* DeleteRouterUnauthorized describes a response with status code 401, with default header values. +/* +DeleteRouterUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -153,9 +216,39 @@ type DeleteRouterUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this delete router unauthorized response has a 2xx status code +func (o *DeleteRouterUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete router unauthorized response has a 3xx status code +func (o *DeleteRouterUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete router unauthorized response has a 4xx status code +func (o *DeleteRouterUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete router unauthorized response has a 5xx status code +func (o *DeleteRouterUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this delete router unauthorized response a status code equal to that given +func (o *DeleteRouterUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *DeleteRouterUnauthorized) Error() string { return fmt.Sprintf("[DELETE /routers/{id}][%d] deleteRouterUnauthorized %+v", 401, o.Payload) } + +func (o *DeleteRouterUnauthorized) String() string { + return fmt.Sprintf("[DELETE /routers/{id}][%d] deleteRouterUnauthorized %+v", 401, o.Payload) +} + func (o *DeleteRouterUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -177,7 +270,8 @@ func NewDeleteRouterConflict() *DeleteRouterConflict { return &DeleteRouterConflict{} } -/* DeleteRouterConflict describes a response with status code 409, with default header values. +/* +DeleteRouterConflict describes a response with status code 409, with default header values. The resource requested to be removed/altered cannot be as it is referenced by another object. */ @@ -185,9 +279,39 @@ type DeleteRouterConflict struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this delete router conflict response has a 2xx status code +func (o *DeleteRouterConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete router conflict response has a 3xx status code +func (o *DeleteRouterConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete router conflict response has a 4xx status code +func (o *DeleteRouterConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete router conflict response has a 5xx status code +func (o *DeleteRouterConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this delete router conflict response a status code equal to that given +func (o *DeleteRouterConflict) IsCode(code int) bool { + return code == 409 +} + func (o *DeleteRouterConflict) Error() string { return fmt.Sprintf("[DELETE /routers/{id}][%d] deleteRouterConflict %+v", 409, o.Payload) } + +func (o *DeleteRouterConflict) String() string { + return fmt.Sprintf("[DELETE /routers/{id}][%d] deleteRouterConflict %+v", 409, o.Payload) +} + func (o *DeleteRouterConflict) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/router/detail_router_parameters.go b/rest_client/router/detail_router_parameters.go index c37fa36e2..68088aa9a 100644 --- a/rest_client/router/detail_router_parameters.go +++ b/rest_client/router/detail_router_parameters.go @@ -76,10 +76,12 @@ func NewDetailRouterParamsWithHTTPClient(client *http.Client) *DetailRouterParam } } -/* DetailRouterParams contains all the parameters to send to the API endpoint - for the detail router operation. +/* +DetailRouterParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the detail router operation. + + Typically these are written to a http.Request. */ type DetailRouterParams struct { diff --git a/rest_client/router/detail_router_responses.go b/rest_client/router/detail_router_responses.go index 3c36209b1..d18ca382f 100644 --- a/rest_client/router/detail_router_responses.go +++ b/rest_client/router/detail_router_responses.go @@ -75,7 +75,8 @@ func NewDetailRouterOK() *DetailRouterOK { return &DetailRouterOK{} } -/* DetailRouterOK describes a response with status code 200, with default header values. +/* +DetailRouterOK describes a response with status code 200, with default header values. A single router */ @@ -83,9 +84,39 @@ type DetailRouterOK struct { Payload *rest_model.DetailRouterEnvelope } +// IsSuccess returns true when this detail router o k response has a 2xx status code +func (o *DetailRouterOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this detail router o k response has a 3xx status code +func (o *DetailRouterOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail router o k response has a 4xx status code +func (o *DetailRouterOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this detail router o k response has a 5xx status code +func (o *DetailRouterOK) IsServerError() bool { + return false +} + +// IsCode returns true when this detail router o k response a status code equal to that given +func (o *DetailRouterOK) IsCode(code int) bool { + return code == 200 +} + func (o *DetailRouterOK) Error() string { return fmt.Sprintf("[GET /routers/{id}][%d] detailRouterOK %+v", 200, o.Payload) } + +func (o *DetailRouterOK) String() string { + return fmt.Sprintf("[GET /routers/{id}][%d] detailRouterOK %+v", 200, o.Payload) +} + func (o *DetailRouterOK) GetPayload() *rest_model.DetailRouterEnvelope { return o.Payload } @@ -107,7 +138,8 @@ func NewDetailRouterUnauthorized() *DetailRouterUnauthorized { return &DetailRouterUnauthorized{} } -/* DetailRouterUnauthorized describes a response with status code 401, with default header values. +/* +DetailRouterUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -115,9 +147,39 @@ type DetailRouterUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this detail router unauthorized response has a 2xx status code +func (o *DetailRouterUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this detail router unauthorized response has a 3xx status code +func (o *DetailRouterUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail router unauthorized response has a 4xx status code +func (o *DetailRouterUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this detail router unauthorized response has a 5xx status code +func (o *DetailRouterUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this detail router unauthorized response a status code equal to that given +func (o *DetailRouterUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *DetailRouterUnauthorized) Error() string { return fmt.Sprintf("[GET /routers/{id}][%d] detailRouterUnauthorized %+v", 401, o.Payload) } + +func (o *DetailRouterUnauthorized) String() string { + return fmt.Sprintf("[GET /routers/{id}][%d] detailRouterUnauthorized %+v", 401, o.Payload) +} + func (o *DetailRouterUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewDetailRouterNotFound() *DetailRouterNotFound { return &DetailRouterNotFound{} } -/* DetailRouterNotFound describes a response with status code 404, with default header values. +/* +DetailRouterNotFound describes a response with status code 404, with default header values. The requested resource does not exist */ @@ -147,9 +210,39 @@ type DetailRouterNotFound struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this detail router not found response has a 2xx status code +func (o *DetailRouterNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this detail router not found response has a 3xx status code +func (o *DetailRouterNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail router not found response has a 4xx status code +func (o *DetailRouterNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this detail router not found response has a 5xx status code +func (o *DetailRouterNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this detail router not found response a status code equal to that given +func (o *DetailRouterNotFound) IsCode(code int) bool { + return code == 404 +} + func (o *DetailRouterNotFound) Error() string { return fmt.Sprintf("[GET /routers/{id}][%d] detailRouterNotFound %+v", 404, o.Payload) } + +func (o *DetailRouterNotFound) String() string { + return fmt.Sprintf("[GET /routers/{id}][%d] detailRouterNotFound %+v", 404, o.Payload) +} + func (o *DetailRouterNotFound) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/router/list_router_terminators_parameters.go b/rest_client/router/list_router_terminators_parameters.go index 50c85ae77..20bb61e1b 100644 --- a/rest_client/router/list_router_terminators_parameters.go +++ b/rest_client/router/list_router_terminators_parameters.go @@ -77,10 +77,12 @@ func NewListRouterTerminatorsParamsWithHTTPClient(client *http.Client) *ListRout } } -/* ListRouterTerminatorsParams contains all the parameters to send to the API endpoint - for the list router terminators operation. +/* +ListRouterTerminatorsParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the list router terminators operation. + + Typically these are written to a http.Request. */ type ListRouterTerminatorsParams struct { diff --git a/rest_client/router/list_router_terminators_responses.go b/rest_client/router/list_router_terminators_responses.go index 66dcdab18..c6f26fc6b 100644 --- a/rest_client/router/list_router_terminators_responses.go +++ b/rest_client/router/list_router_terminators_responses.go @@ -75,7 +75,8 @@ func NewListRouterTerminatorsOK() *ListRouterTerminatorsOK { return &ListRouterTerminatorsOK{} } -/* ListRouterTerminatorsOK describes a response with status code 200, with default header values. +/* +ListRouterTerminatorsOK describes a response with status code 200, with default header values. A list of terminators */ @@ -83,9 +84,39 @@ type ListRouterTerminatorsOK struct { Payload *rest_model.ListTerminatorsEnvelope } +// IsSuccess returns true when this list router terminators o k response has a 2xx status code +func (o *ListRouterTerminatorsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this list router terminators o k response has a 3xx status code +func (o *ListRouterTerminatorsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list router terminators o k response has a 4xx status code +func (o *ListRouterTerminatorsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this list router terminators o k response has a 5xx status code +func (o *ListRouterTerminatorsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this list router terminators o k response a status code equal to that given +func (o *ListRouterTerminatorsOK) IsCode(code int) bool { + return code == 200 +} + func (o *ListRouterTerminatorsOK) Error() string { return fmt.Sprintf("[GET /routers/{id}/terminators][%d] listRouterTerminatorsOK %+v", 200, o.Payload) } + +func (o *ListRouterTerminatorsOK) String() string { + return fmt.Sprintf("[GET /routers/{id}/terminators][%d] listRouterTerminatorsOK %+v", 200, o.Payload) +} + func (o *ListRouterTerminatorsOK) GetPayload() *rest_model.ListTerminatorsEnvelope { return o.Payload } @@ -107,7 +138,8 @@ func NewListRouterTerminatorsBadRequest() *ListRouterTerminatorsBadRequest { return &ListRouterTerminatorsBadRequest{} } -/* ListRouterTerminatorsBadRequest describes a response with status code 400, with default header values. +/* +ListRouterTerminatorsBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -115,9 +147,39 @@ type ListRouterTerminatorsBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this list router terminators bad request response has a 2xx status code +func (o *ListRouterTerminatorsBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list router terminators bad request response has a 3xx status code +func (o *ListRouterTerminatorsBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list router terminators bad request response has a 4xx status code +func (o *ListRouterTerminatorsBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this list router terminators bad request response has a 5xx status code +func (o *ListRouterTerminatorsBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this list router terminators bad request response a status code equal to that given +func (o *ListRouterTerminatorsBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *ListRouterTerminatorsBadRequest) Error() string { return fmt.Sprintf("[GET /routers/{id}/terminators][%d] listRouterTerminatorsBadRequest %+v", 400, o.Payload) } + +func (o *ListRouterTerminatorsBadRequest) String() string { + return fmt.Sprintf("[GET /routers/{id}/terminators][%d] listRouterTerminatorsBadRequest %+v", 400, o.Payload) +} + func (o *ListRouterTerminatorsBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewListRouterTerminatorsUnauthorized() *ListRouterTerminatorsUnauthorized { return &ListRouterTerminatorsUnauthorized{} } -/* ListRouterTerminatorsUnauthorized describes a response with status code 401, with default header values. +/* +ListRouterTerminatorsUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -147,9 +210,39 @@ type ListRouterTerminatorsUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this list router terminators unauthorized response has a 2xx status code +func (o *ListRouterTerminatorsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list router terminators unauthorized response has a 3xx status code +func (o *ListRouterTerminatorsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list router terminators unauthorized response has a 4xx status code +func (o *ListRouterTerminatorsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this list router terminators unauthorized response has a 5xx status code +func (o *ListRouterTerminatorsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this list router terminators unauthorized response a status code equal to that given +func (o *ListRouterTerminatorsUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *ListRouterTerminatorsUnauthorized) Error() string { return fmt.Sprintf("[GET /routers/{id}/terminators][%d] listRouterTerminatorsUnauthorized %+v", 401, o.Payload) } + +func (o *ListRouterTerminatorsUnauthorized) String() string { + return fmt.Sprintf("[GET /routers/{id}/terminators][%d] listRouterTerminatorsUnauthorized %+v", 401, o.Payload) +} + func (o *ListRouterTerminatorsUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/router/list_routers_parameters.go b/rest_client/router/list_routers_parameters.go index a59ba4fc4..7f61a0f0a 100644 --- a/rest_client/router/list_routers_parameters.go +++ b/rest_client/router/list_routers_parameters.go @@ -77,10 +77,12 @@ func NewListRoutersParamsWithHTTPClient(client *http.Client) *ListRoutersParams } } -/* ListRoutersParams contains all the parameters to send to the API endpoint - for the list routers operation. +/* +ListRoutersParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the list routers operation. + + Typically these are written to a http.Request. */ type ListRoutersParams struct { diff --git a/rest_client/router/list_routers_responses.go b/rest_client/router/list_routers_responses.go index e79b01f62..a66d09118 100644 --- a/rest_client/router/list_routers_responses.go +++ b/rest_client/router/list_routers_responses.go @@ -69,7 +69,8 @@ func NewListRoutersOK() *ListRoutersOK { return &ListRoutersOK{} } -/* ListRoutersOK describes a response with status code 200, with default header values. +/* +ListRoutersOK describes a response with status code 200, with default header values. A list of routers */ @@ -77,9 +78,39 @@ type ListRoutersOK struct { Payload *rest_model.ListRoutersEnvelope } +// IsSuccess returns true when this list routers o k response has a 2xx status code +func (o *ListRoutersOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this list routers o k response has a 3xx status code +func (o *ListRoutersOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list routers o k response has a 4xx status code +func (o *ListRoutersOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this list routers o k response has a 5xx status code +func (o *ListRoutersOK) IsServerError() bool { + return false +} + +// IsCode returns true when this list routers o k response a status code equal to that given +func (o *ListRoutersOK) IsCode(code int) bool { + return code == 200 +} + func (o *ListRoutersOK) Error() string { return fmt.Sprintf("[GET /routers][%d] listRoutersOK %+v", 200, o.Payload) } + +func (o *ListRoutersOK) String() string { + return fmt.Sprintf("[GET /routers][%d] listRoutersOK %+v", 200, o.Payload) +} + func (o *ListRoutersOK) GetPayload() *rest_model.ListRoutersEnvelope { return o.Payload } @@ -101,7 +132,8 @@ func NewListRoutersUnauthorized() *ListRoutersUnauthorized { return &ListRoutersUnauthorized{} } -/* ListRoutersUnauthorized describes a response with status code 401, with default header values. +/* +ListRoutersUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -109,9 +141,39 @@ type ListRoutersUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this list routers unauthorized response has a 2xx status code +func (o *ListRoutersUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list routers unauthorized response has a 3xx status code +func (o *ListRoutersUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list routers unauthorized response has a 4xx status code +func (o *ListRoutersUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this list routers unauthorized response has a 5xx status code +func (o *ListRoutersUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this list routers unauthorized response a status code equal to that given +func (o *ListRoutersUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *ListRoutersUnauthorized) Error() string { return fmt.Sprintf("[GET /routers][%d] listRoutersUnauthorized %+v", 401, o.Payload) } + +func (o *ListRoutersUnauthorized) String() string { + return fmt.Sprintf("[GET /routers][%d] listRoutersUnauthorized %+v", 401, o.Payload) +} + func (o *ListRoutersUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/router/patch_router_parameters.go b/rest_client/router/patch_router_parameters.go index 5fc89c9dc..962bb6054 100644 --- a/rest_client/router/patch_router_parameters.go +++ b/rest_client/router/patch_router_parameters.go @@ -78,10 +78,12 @@ func NewPatchRouterParamsWithHTTPClient(client *http.Client) *PatchRouterParams } } -/* PatchRouterParams contains all the parameters to send to the API endpoint - for the patch router operation. +/* +PatchRouterParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the patch router operation. + + Typically these are written to a http.Request. */ type PatchRouterParams struct { diff --git a/rest_client/router/patch_router_responses.go b/rest_client/router/patch_router_responses.go index 1b123044b..012174df4 100644 --- a/rest_client/router/patch_router_responses.go +++ b/rest_client/router/patch_router_responses.go @@ -81,7 +81,8 @@ func NewPatchRouterOK() *PatchRouterOK { return &PatchRouterOK{} } -/* PatchRouterOK describes a response with status code 200, with default header values. +/* +PatchRouterOK describes a response with status code 200, with default header values. The patch request was successful and the resource has been altered */ @@ -89,9 +90,39 @@ type PatchRouterOK struct { Payload *rest_model.Empty } +// IsSuccess returns true when this patch router o k response has a 2xx status code +func (o *PatchRouterOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this patch router o k response has a 3xx status code +func (o *PatchRouterOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch router o k response has a 4xx status code +func (o *PatchRouterOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this patch router o k response has a 5xx status code +func (o *PatchRouterOK) IsServerError() bool { + return false +} + +// IsCode returns true when this patch router o k response a status code equal to that given +func (o *PatchRouterOK) IsCode(code int) bool { + return code == 200 +} + func (o *PatchRouterOK) Error() string { return fmt.Sprintf("[PATCH /routers/{id}][%d] patchRouterOK %+v", 200, o.Payload) } + +func (o *PatchRouterOK) String() string { + return fmt.Sprintf("[PATCH /routers/{id}][%d] patchRouterOK %+v", 200, o.Payload) +} + func (o *PatchRouterOK) GetPayload() *rest_model.Empty { return o.Payload } @@ -113,7 +144,8 @@ func NewPatchRouterBadRequest() *PatchRouterBadRequest { return &PatchRouterBadRequest{} } -/* PatchRouterBadRequest describes a response with status code 400, with default header values. +/* +PatchRouterBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -121,9 +153,39 @@ type PatchRouterBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this patch router bad request response has a 2xx status code +func (o *PatchRouterBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch router bad request response has a 3xx status code +func (o *PatchRouterBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch router bad request response has a 4xx status code +func (o *PatchRouterBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch router bad request response has a 5xx status code +func (o *PatchRouterBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this patch router bad request response a status code equal to that given +func (o *PatchRouterBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *PatchRouterBadRequest) Error() string { return fmt.Sprintf("[PATCH /routers/{id}][%d] patchRouterBadRequest %+v", 400, o.Payload) } + +func (o *PatchRouterBadRequest) String() string { + return fmt.Sprintf("[PATCH /routers/{id}][%d] patchRouterBadRequest %+v", 400, o.Payload) +} + func (o *PatchRouterBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -145,7 +207,8 @@ func NewPatchRouterUnauthorized() *PatchRouterUnauthorized { return &PatchRouterUnauthorized{} } -/* PatchRouterUnauthorized describes a response with status code 401, with default header values. +/* +PatchRouterUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -153,9 +216,39 @@ type PatchRouterUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this patch router unauthorized response has a 2xx status code +func (o *PatchRouterUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch router unauthorized response has a 3xx status code +func (o *PatchRouterUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch router unauthorized response has a 4xx status code +func (o *PatchRouterUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch router unauthorized response has a 5xx status code +func (o *PatchRouterUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this patch router unauthorized response a status code equal to that given +func (o *PatchRouterUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *PatchRouterUnauthorized) Error() string { return fmt.Sprintf("[PATCH /routers/{id}][%d] patchRouterUnauthorized %+v", 401, o.Payload) } + +func (o *PatchRouterUnauthorized) String() string { + return fmt.Sprintf("[PATCH /routers/{id}][%d] patchRouterUnauthorized %+v", 401, o.Payload) +} + func (o *PatchRouterUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -177,7 +270,8 @@ func NewPatchRouterNotFound() *PatchRouterNotFound { return &PatchRouterNotFound{} } -/* PatchRouterNotFound describes a response with status code 404, with default header values. +/* +PatchRouterNotFound describes a response with status code 404, with default header values. The requested resource does not exist */ @@ -185,9 +279,39 @@ type PatchRouterNotFound struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this patch router not found response has a 2xx status code +func (o *PatchRouterNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch router not found response has a 3xx status code +func (o *PatchRouterNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch router not found response has a 4xx status code +func (o *PatchRouterNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch router not found response has a 5xx status code +func (o *PatchRouterNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this patch router not found response a status code equal to that given +func (o *PatchRouterNotFound) IsCode(code int) bool { + return code == 404 +} + func (o *PatchRouterNotFound) Error() string { return fmt.Sprintf("[PATCH /routers/{id}][%d] patchRouterNotFound %+v", 404, o.Payload) } + +func (o *PatchRouterNotFound) String() string { + return fmt.Sprintf("[PATCH /routers/{id}][%d] patchRouterNotFound %+v", 404, o.Payload) +} + func (o *PatchRouterNotFound) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/router/router_client.go b/rest_client/router/router_client.go index b96457d69..e1600ec33 100644 --- a/rest_client/router/router_client.go +++ b/rest_client/router/router_client.go @@ -72,9 +72,9 @@ type ClientService interface { } /* - CreateRouter creates a router resource +CreateRouter creates a router resource - Create a router resource. Requires admin access. +Create a router resource. Requires admin access. */ func (a *Client) CreateRouter(params *CreateRouterParams, opts ...ClientOption) (*CreateRouterCreated, error) { // TODO: Validate the params before sending @@ -112,9 +112,9 @@ func (a *Client) CreateRouter(params *CreateRouterParams, opts ...ClientOption) } /* - DeleteRouter deletes a router +DeleteRouter deletes a router - Delete a router by id. Requires admin access. +Delete a router by id. Requires admin access. */ func (a *Client) DeleteRouter(params *DeleteRouterParams, opts ...ClientOption) (*DeleteRouterOK, error) { // TODO: Validate the params before sending @@ -152,9 +152,9 @@ func (a *Client) DeleteRouter(params *DeleteRouterParams, opts ...ClientOption) } /* - DetailRouter retrieves a single router +DetailRouter retrieves a single router - Retrieves a single router by id. Requires admin access. +Retrieves a single router by id. Requires admin access. */ func (a *Client) DetailRouter(params *DetailRouterParams, opts ...ClientOption) (*DetailRouterOK, error) { // TODO: Validate the params before sending @@ -192,10 +192,9 @@ func (a *Client) DetailRouter(params *DetailRouterParams, opts ...ClientOption) } /* - ListRouterTerminators lists of terminators assigned to a router - - Retrieves a list of terminator resources that are assigned specific router; supports filtering, sorting, and pagination. +ListRouterTerminators lists of terminators assigned to a router +Retrieves a list of terminator resources that are assigned specific router; supports filtering, sorting, and pagination. */ func (a *Client) ListRouterTerminators(params *ListRouterTerminatorsParams, opts ...ClientOption) (*ListRouterTerminatorsOK, error) { // TODO: Validate the params before sending @@ -233,10 +232,9 @@ func (a *Client) ListRouterTerminators(params *ListRouterTerminatorsParams, opts } /* - ListRouters lists routers - - Retrieves a list of router resources; supports filtering, sorting, and pagination. Requires admin access. +ListRouters lists routers +Retrieves a list of router resources; supports filtering, sorting, and pagination. Requires admin access. */ func (a *Client) ListRouters(params *ListRoutersParams, opts ...ClientOption) (*ListRoutersOK, error) { // TODO: Validate the params before sending @@ -274,9 +272,9 @@ func (a *Client) ListRouters(params *ListRoutersParams, opts ...ClientOption) (* } /* - PatchRouter updates the supplied fields on a router +PatchRouter updates the supplied fields on a router - Update the supplied fields on a router. Requires admin access. +Update the supplied fields on a router. Requires admin access. */ func (a *Client) PatchRouter(params *PatchRouterParams, opts ...ClientOption) (*PatchRouterOK, error) { // TODO: Validate the params before sending @@ -314,9 +312,9 @@ func (a *Client) PatchRouter(params *PatchRouterParams, opts ...ClientOption) (* } /* - UpdateRouter updates all fields on a router +UpdateRouter updates all fields on a router - Update all fields on a router by id. Requires admin access. +Update all fields on a router by id. Requires admin access. */ func (a *Client) UpdateRouter(params *UpdateRouterParams, opts ...ClientOption) (*UpdateRouterOK, error) { // TODO: Validate the params before sending diff --git a/rest_client/router/update_router_parameters.go b/rest_client/router/update_router_parameters.go index d9944fbe9..b4542846a 100644 --- a/rest_client/router/update_router_parameters.go +++ b/rest_client/router/update_router_parameters.go @@ -78,10 +78,12 @@ func NewUpdateRouterParamsWithHTTPClient(client *http.Client) *UpdateRouterParam } } -/* UpdateRouterParams contains all the parameters to send to the API endpoint - for the update router operation. +/* +UpdateRouterParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the update router operation. + + Typically these are written to a http.Request. */ type UpdateRouterParams struct { diff --git a/rest_client/router/update_router_responses.go b/rest_client/router/update_router_responses.go index 0d403666a..438d0fb29 100644 --- a/rest_client/router/update_router_responses.go +++ b/rest_client/router/update_router_responses.go @@ -81,7 +81,8 @@ func NewUpdateRouterOK() *UpdateRouterOK { return &UpdateRouterOK{} } -/* UpdateRouterOK describes a response with status code 200, with default header values. +/* +UpdateRouterOK describes a response with status code 200, with default header values. The update request was successful and the resource has been altered */ @@ -89,9 +90,39 @@ type UpdateRouterOK struct { Payload *rest_model.Empty } +// IsSuccess returns true when this update router o k response has a 2xx status code +func (o *UpdateRouterOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update router o k response has a 3xx status code +func (o *UpdateRouterOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update router o k response has a 4xx status code +func (o *UpdateRouterOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update router o k response has a 5xx status code +func (o *UpdateRouterOK) IsServerError() bool { + return false +} + +// IsCode returns true when this update router o k response a status code equal to that given +func (o *UpdateRouterOK) IsCode(code int) bool { + return code == 200 +} + func (o *UpdateRouterOK) Error() string { return fmt.Sprintf("[PUT /routers/{id}][%d] updateRouterOK %+v", 200, o.Payload) } + +func (o *UpdateRouterOK) String() string { + return fmt.Sprintf("[PUT /routers/{id}][%d] updateRouterOK %+v", 200, o.Payload) +} + func (o *UpdateRouterOK) GetPayload() *rest_model.Empty { return o.Payload } @@ -113,7 +144,8 @@ func NewUpdateRouterBadRequest() *UpdateRouterBadRequest { return &UpdateRouterBadRequest{} } -/* UpdateRouterBadRequest describes a response with status code 400, with default header values. +/* +UpdateRouterBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -121,9 +153,39 @@ type UpdateRouterBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this update router bad request response has a 2xx status code +func (o *UpdateRouterBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update router bad request response has a 3xx status code +func (o *UpdateRouterBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update router bad request response has a 4xx status code +func (o *UpdateRouterBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this update router bad request response has a 5xx status code +func (o *UpdateRouterBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this update router bad request response a status code equal to that given +func (o *UpdateRouterBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *UpdateRouterBadRequest) Error() string { return fmt.Sprintf("[PUT /routers/{id}][%d] updateRouterBadRequest %+v", 400, o.Payload) } + +func (o *UpdateRouterBadRequest) String() string { + return fmt.Sprintf("[PUT /routers/{id}][%d] updateRouterBadRequest %+v", 400, o.Payload) +} + func (o *UpdateRouterBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -145,7 +207,8 @@ func NewUpdateRouterUnauthorized() *UpdateRouterUnauthorized { return &UpdateRouterUnauthorized{} } -/* UpdateRouterUnauthorized describes a response with status code 401, with default header values. +/* +UpdateRouterUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -153,9 +216,39 @@ type UpdateRouterUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this update router unauthorized response has a 2xx status code +func (o *UpdateRouterUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update router unauthorized response has a 3xx status code +func (o *UpdateRouterUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update router unauthorized response has a 4xx status code +func (o *UpdateRouterUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this update router unauthorized response has a 5xx status code +func (o *UpdateRouterUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this update router unauthorized response a status code equal to that given +func (o *UpdateRouterUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *UpdateRouterUnauthorized) Error() string { return fmt.Sprintf("[PUT /routers/{id}][%d] updateRouterUnauthorized %+v", 401, o.Payload) } + +func (o *UpdateRouterUnauthorized) String() string { + return fmt.Sprintf("[PUT /routers/{id}][%d] updateRouterUnauthorized %+v", 401, o.Payload) +} + func (o *UpdateRouterUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -177,7 +270,8 @@ func NewUpdateRouterNotFound() *UpdateRouterNotFound { return &UpdateRouterNotFound{} } -/* UpdateRouterNotFound describes a response with status code 404, with default header values. +/* +UpdateRouterNotFound describes a response with status code 404, with default header values. The requested resource does not exist */ @@ -185,9 +279,39 @@ type UpdateRouterNotFound struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this update router not found response has a 2xx status code +func (o *UpdateRouterNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update router not found response has a 3xx status code +func (o *UpdateRouterNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update router not found response has a 4xx status code +func (o *UpdateRouterNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this update router not found response has a 5xx status code +func (o *UpdateRouterNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this update router not found response a status code equal to that given +func (o *UpdateRouterNotFound) IsCode(code int) bool { + return code == 404 +} + func (o *UpdateRouterNotFound) Error() string { return fmt.Sprintf("[PUT /routers/{id}][%d] updateRouterNotFound %+v", 404, o.Payload) } + +func (o *UpdateRouterNotFound) String() string { + return fmt.Sprintf("[PUT /routers/{id}][%d] updateRouterNotFound %+v", 404, o.Payload) +} + func (o *UpdateRouterNotFound) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/service/create_service_parameters.go b/rest_client/service/create_service_parameters.go index 186befa19..86527f8db 100644 --- a/rest_client/service/create_service_parameters.go +++ b/rest_client/service/create_service_parameters.go @@ -78,10 +78,12 @@ func NewCreateServiceParamsWithHTTPClient(client *http.Client) *CreateServicePar } } -/* CreateServiceParams contains all the parameters to send to the API endpoint - for the create service operation. +/* +CreateServiceParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the create service operation. + + Typically these are written to a http.Request. */ type CreateServiceParams struct { diff --git a/rest_client/service/create_service_responses.go b/rest_client/service/create_service_responses.go index d13c38853..2e0d49808 100644 --- a/rest_client/service/create_service_responses.go +++ b/rest_client/service/create_service_responses.go @@ -75,7 +75,8 @@ func NewCreateServiceCreated() *CreateServiceCreated { return &CreateServiceCreated{} } -/* CreateServiceCreated describes a response with status code 201, with default header values. +/* +CreateServiceCreated describes a response with status code 201, with default header values. The create request was successful and the resource has been added at the following location */ @@ -83,9 +84,39 @@ type CreateServiceCreated struct { Payload *rest_model.CreateEnvelope } +// IsSuccess returns true when this create service created response has a 2xx status code +func (o *CreateServiceCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this create service created response has a 3xx status code +func (o *CreateServiceCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create service created response has a 4xx status code +func (o *CreateServiceCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this create service created response has a 5xx status code +func (o *CreateServiceCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this create service created response a status code equal to that given +func (o *CreateServiceCreated) IsCode(code int) bool { + return code == 201 +} + func (o *CreateServiceCreated) Error() string { return fmt.Sprintf("[POST /services][%d] createServiceCreated %+v", 201, o.Payload) } + +func (o *CreateServiceCreated) String() string { + return fmt.Sprintf("[POST /services][%d] createServiceCreated %+v", 201, o.Payload) +} + func (o *CreateServiceCreated) GetPayload() *rest_model.CreateEnvelope { return o.Payload } @@ -107,7 +138,8 @@ func NewCreateServiceBadRequest() *CreateServiceBadRequest { return &CreateServiceBadRequest{} } -/* CreateServiceBadRequest describes a response with status code 400, with default header values. +/* +CreateServiceBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -115,9 +147,39 @@ type CreateServiceBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this create service bad request response has a 2xx status code +func (o *CreateServiceBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create service bad request response has a 3xx status code +func (o *CreateServiceBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create service bad request response has a 4xx status code +func (o *CreateServiceBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this create service bad request response has a 5xx status code +func (o *CreateServiceBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this create service bad request response a status code equal to that given +func (o *CreateServiceBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *CreateServiceBadRequest) Error() string { return fmt.Sprintf("[POST /services][%d] createServiceBadRequest %+v", 400, o.Payload) } + +func (o *CreateServiceBadRequest) String() string { + return fmt.Sprintf("[POST /services][%d] createServiceBadRequest %+v", 400, o.Payload) +} + func (o *CreateServiceBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewCreateServiceUnauthorized() *CreateServiceUnauthorized { return &CreateServiceUnauthorized{} } -/* CreateServiceUnauthorized describes a response with status code 401, with default header values. +/* +CreateServiceUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -147,9 +210,39 @@ type CreateServiceUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this create service unauthorized response has a 2xx status code +func (o *CreateServiceUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create service unauthorized response has a 3xx status code +func (o *CreateServiceUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create service unauthorized response has a 4xx status code +func (o *CreateServiceUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this create service unauthorized response has a 5xx status code +func (o *CreateServiceUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this create service unauthorized response a status code equal to that given +func (o *CreateServiceUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *CreateServiceUnauthorized) Error() string { return fmt.Sprintf("[POST /services][%d] createServiceUnauthorized %+v", 401, o.Payload) } + +func (o *CreateServiceUnauthorized) String() string { + return fmt.Sprintf("[POST /services][%d] createServiceUnauthorized %+v", 401, o.Payload) +} + func (o *CreateServiceUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/service/delete_service_parameters.go b/rest_client/service/delete_service_parameters.go index 5eb86ff71..d8aac81ae 100644 --- a/rest_client/service/delete_service_parameters.go +++ b/rest_client/service/delete_service_parameters.go @@ -76,10 +76,12 @@ func NewDeleteServiceParamsWithHTTPClient(client *http.Client) *DeleteServicePar } } -/* DeleteServiceParams contains all the parameters to send to the API endpoint - for the delete service operation. +/* +DeleteServiceParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the delete service operation. + + Typically these are written to a http.Request. */ type DeleteServiceParams struct { diff --git a/rest_client/service/delete_service_responses.go b/rest_client/service/delete_service_responses.go index 7c5e39fb7..a5b966326 100644 --- a/rest_client/service/delete_service_responses.go +++ b/rest_client/service/delete_service_responses.go @@ -81,7 +81,8 @@ func NewDeleteServiceOK() *DeleteServiceOK { return &DeleteServiceOK{} } -/* DeleteServiceOK describes a response with status code 200, with default header values. +/* +DeleteServiceOK describes a response with status code 200, with default header values. The delete request was successful and the resource has been removed */ @@ -89,9 +90,39 @@ type DeleteServiceOK struct { Payload *rest_model.Empty } +// IsSuccess returns true when this delete service o k response has a 2xx status code +func (o *DeleteServiceOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this delete service o k response has a 3xx status code +func (o *DeleteServiceOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete service o k response has a 4xx status code +func (o *DeleteServiceOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete service o k response has a 5xx status code +func (o *DeleteServiceOK) IsServerError() bool { + return false +} + +// IsCode returns true when this delete service o k response a status code equal to that given +func (o *DeleteServiceOK) IsCode(code int) bool { + return code == 200 +} + func (o *DeleteServiceOK) Error() string { return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceOK %+v", 200, o.Payload) } + +func (o *DeleteServiceOK) String() string { + return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceOK %+v", 200, o.Payload) +} + func (o *DeleteServiceOK) GetPayload() *rest_model.Empty { return o.Payload } @@ -113,7 +144,8 @@ func NewDeleteServiceBadRequest() *DeleteServiceBadRequest { return &DeleteServiceBadRequest{} } -/* DeleteServiceBadRequest describes a response with status code 400, with default header values. +/* +DeleteServiceBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -121,9 +153,39 @@ type DeleteServiceBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this delete service bad request response has a 2xx status code +func (o *DeleteServiceBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete service bad request response has a 3xx status code +func (o *DeleteServiceBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete service bad request response has a 4xx status code +func (o *DeleteServiceBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete service bad request response has a 5xx status code +func (o *DeleteServiceBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this delete service bad request response a status code equal to that given +func (o *DeleteServiceBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *DeleteServiceBadRequest) Error() string { return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceBadRequest %+v", 400, o.Payload) } + +func (o *DeleteServiceBadRequest) String() string { + return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceBadRequest %+v", 400, o.Payload) +} + func (o *DeleteServiceBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -145,7 +207,8 @@ func NewDeleteServiceUnauthorized() *DeleteServiceUnauthorized { return &DeleteServiceUnauthorized{} } -/* DeleteServiceUnauthorized describes a response with status code 401, with default header values. +/* +DeleteServiceUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -153,9 +216,39 @@ type DeleteServiceUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this delete service unauthorized response has a 2xx status code +func (o *DeleteServiceUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete service unauthorized response has a 3xx status code +func (o *DeleteServiceUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete service unauthorized response has a 4xx status code +func (o *DeleteServiceUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete service unauthorized response has a 5xx status code +func (o *DeleteServiceUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this delete service unauthorized response a status code equal to that given +func (o *DeleteServiceUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *DeleteServiceUnauthorized) Error() string { return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceUnauthorized %+v", 401, o.Payload) } + +func (o *DeleteServiceUnauthorized) String() string { + return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceUnauthorized %+v", 401, o.Payload) +} + func (o *DeleteServiceUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -177,7 +270,8 @@ func NewDeleteServiceConflict() *DeleteServiceConflict { return &DeleteServiceConflict{} } -/* DeleteServiceConflict describes a response with status code 409, with default header values. +/* +DeleteServiceConflict describes a response with status code 409, with default header values. The resource requested to be removed/altered cannot be as it is referenced by another object. */ @@ -185,9 +279,39 @@ type DeleteServiceConflict struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this delete service conflict response has a 2xx status code +func (o *DeleteServiceConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete service conflict response has a 3xx status code +func (o *DeleteServiceConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete service conflict response has a 4xx status code +func (o *DeleteServiceConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete service conflict response has a 5xx status code +func (o *DeleteServiceConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this delete service conflict response a status code equal to that given +func (o *DeleteServiceConflict) IsCode(code int) bool { + return code == 409 +} + func (o *DeleteServiceConflict) Error() string { return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceConflict %+v", 409, o.Payload) } + +func (o *DeleteServiceConflict) String() string { + return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceConflict %+v", 409, o.Payload) +} + func (o *DeleteServiceConflict) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/service/detail_service_parameters.go b/rest_client/service/detail_service_parameters.go index 850a20228..3679574a8 100644 --- a/rest_client/service/detail_service_parameters.go +++ b/rest_client/service/detail_service_parameters.go @@ -76,10 +76,12 @@ func NewDetailServiceParamsWithHTTPClient(client *http.Client) *DetailServicePar } } -/* DetailServiceParams contains all the parameters to send to the API endpoint - for the detail service operation. +/* +DetailServiceParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the detail service operation. + + Typically these are written to a http.Request. */ type DetailServiceParams struct { diff --git a/rest_client/service/detail_service_responses.go b/rest_client/service/detail_service_responses.go index 9dcc19a0e..9b12b3f61 100644 --- a/rest_client/service/detail_service_responses.go +++ b/rest_client/service/detail_service_responses.go @@ -75,7 +75,8 @@ func NewDetailServiceOK() *DetailServiceOK { return &DetailServiceOK{} } -/* DetailServiceOK describes a response with status code 200, with default header values. +/* +DetailServiceOK describes a response with status code 200, with default header values. A single service */ @@ -83,9 +84,39 @@ type DetailServiceOK struct { Payload *rest_model.DetailServiceEnvelope } +// IsSuccess returns true when this detail service o k response has a 2xx status code +func (o *DetailServiceOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this detail service o k response has a 3xx status code +func (o *DetailServiceOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail service o k response has a 4xx status code +func (o *DetailServiceOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this detail service o k response has a 5xx status code +func (o *DetailServiceOK) IsServerError() bool { + return false +} + +// IsCode returns true when this detail service o k response a status code equal to that given +func (o *DetailServiceOK) IsCode(code int) bool { + return code == 200 +} + func (o *DetailServiceOK) Error() string { return fmt.Sprintf("[GET /services/{id}][%d] detailServiceOK %+v", 200, o.Payload) } + +func (o *DetailServiceOK) String() string { + return fmt.Sprintf("[GET /services/{id}][%d] detailServiceOK %+v", 200, o.Payload) +} + func (o *DetailServiceOK) GetPayload() *rest_model.DetailServiceEnvelope { return o.Payload } @@ -107,7 +138,8 @@ func NewDetailServiceUnauthorized() *DetailServiceUnauthorized { return &DetailServiceUnauthorized{} } -/* DetailServiceUnauthorized describes a response with status code 401, with default header values. +/* +DetailServiceUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -115,9 +147,39 @@ type DetailServiceUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this detail service unauthorized response has a 2xx status code +func (o *DetailServiceUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this detail service unauthorized response has a 3xx status code +func (o *DetailServiceUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail service unauthorized response has a 4xx status code +func (o *DetailServiceUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this detail service unauthorized response has a 5xx status code +func (o *DetailServiceUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this detail service unauthorized response a status code equal to that given +func (o *DetailServiceUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *DetailServiceUnauthorized) Error() string { return fmt.Sprintf("[GET /services/{id}][%d] detailServiceUnauthorized %+v", 401, o.Payload) } + +func (o *DetailServiceUnauthorized) String() string { + return fmt.Sprintf("[GET /services/{id}][%d] detailServiceUnauthorized %+v", 401, o.Payload) +} + func (o *DetailServiceUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewDetailServiceNotFound() *DetailServiceNotFound { return &DetailServiceNotFound{} } -/* DetailServiceNotFound describes a response with status code 404, with default header values. +/* +DetailServiceNotFound describes a response with status code 404, with default header values. The requested resource does not exist */ @@ -147,9 +210,39 @@ type DetailServiceNotFound struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this detail service not found response has a 2xx status code +func (o *DetailServiceNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this detail service not found response has a 3xx status code +func (o *DetailServiceNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail service not found response has a 4xx status code +func (o *DetailServiceNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this detail service not found response has a 5xx status code +func (o *DetailServiceNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this detail service not found response a status code equal to that given +func (o *DetailServiceNotFound) IsCode(code int) bool { + return code == 404 +} + func (o *DetailServiceNotFound) Error() string { return fmt.Sprintf("[GET /services/{id}][%d] detailServiceNotFound %+v", 404, o.Payload) } + +func (o *DetailServiceNotFound) String() string { + return fmt.Sprintf("[GET /services/{id}][%d] detailServiceNotFound %+v", 404, o.Payload) +} + func (o *DetailServiceNotFound) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/service/list_service_terminators_parameters.go b/rest_client/service/list_service_terminators_parameters.go index c6024e506..e436e5a77 100644 --- a/rest_client/service/list_service_terminators_parameters.go +++ b/rest_client/service/list_service_terminators_parameters.go @@ -77,10 +77,12 @@ func NewListServiceTerminatorsParamsWithHTTPClient(client *http.Client) *ListSer } } -/* ListServiceTerminatorsParams contains all the parameters to send to the API endpoint - for the list service terminators operation. +/* +ListServiceTerminatorsParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the list service terminators operation. + + Typically these are written to a http.Request. */ type ListServiceTerminatorsParams struct { diff --git a/rest_client/service/list_service_terminators_responses.go b/rest_client/service/list_service_terminators_responses.go index 2116b7302..6363926b7 100644 --- a/rest_client/service/list_service_terminators_responses.go +++ b/rest_client/service/list_service_terminators_responses.go @@ -75,7 +75,8 @@ func NewListServiceTerminatorsOK() *ListServiceTerminatorsOK { return &ListServiceTerminatorsOK{} } -/* ListServiceTerminatorsOK describes a response with status code 200, with default header values. +/* +ListServiceTerminatorsOK describes a response with status code 200, with default header values. A list of terminators */ @@ -83,9 +84,39 @@ type ListServiceTerminatorsOK struct { Payload *rest_model.ListTerminatorsEnvelope } +// IsSuccess returns true when this list service terminators o k response has a 2xx status code +func (o *ListServiceTerminatorsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this list service terminators o k response has a 3xx status code +func (o *ListServiceTerminatorsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list service terminators o k response has a 4xx status code +func (o *ListServiceTerminatorsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this list service terminators o k response has a 5xx status code +func (o *ListServiceTerminatorsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this list service terminators o k response a status code equal to that given +func (o *ListServiceTerminatorsOK) IsCode(code int) bool { + return code == 200 +} + func (o *ListServiceTerminatorsOK) Error() string { return fmt.Sprintf("[GET /services/{id}/terminators][%d] listServiceTerminatorsOK %+v", 200, o.Payload) } + +func (o *ListServiceTerminatorsOK) String() string { + return fmt.Sprintf("[GET /services/{id}/terminators][%d] listServiceTerminatorsOK %+v", 200, o.Payload) +} + func (o *ListServiceTerminatorsOK) GetPayload() *rest_model.ListTerminatorsEnvelope { return o.Payload } @@ -107,7 +138,8 @@ func NewListServiceTerminatorsBadRequest() *ListServiceTerminatorsBadRequest { return &ListServiceTerminatorsBadRequest{} } -/* ListServiceTerminatorsBadRequest describes a response with status code 400, with default header values. +/* +ListServiceTerminatorsBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -115,9 +147,39 @@ type ListServiceTerminatorsBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this list service terminators bad request response has a 2xx status code +func (o *ListServiceTerminatorsBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list service terminators bad request response has a 3xx status code +func (o *ListServiceTerminatorsBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list service terminators bad request response has a 4xx status code +func (o *ListServiceTerminatorsBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this list service terminators bad request response has a 5xx status code +func (o *ListServiceTerminatorsBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this list service terminators bad request response a status code equal to that given +func (o *ListServiceTerminatorsBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *ListServiceTerminatorsBadRequest) Error() string { return fmt.Sprintf("[GET /services/{id}/terminators][%d] listServiceTerminatorsBadRequest %+v", 400, o.Payload) } + +func (o *ListServiceTerminatorsBadRequest) String() string { + return fmt.Sprintf("[GET /services/{id}/terminators][%d] listServiceTerminatorsBadRequest %+v", 400, o.Payload) +} + func (o *ListServiceTerminatorsBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewListServiceTerminatorsUnauthorized() *ListServiceTerminatorsUnauthorized return &ListServiceTerminatorsUnauthorized{} } -/* ListServiceTerminatorsUnauthorized describes a response with status code 401, with default header values. +/* +ListServiceTerminatorsUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -147,9 +210,39 @@ type ListServiceTerminatorsUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this list service terminators unauthorized response has a 2xx status code +func (o *ListServiceTerminatorsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list service terminators unauthorized response has a 3xx status code +func (o *ListServiceTerminatorsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list service terminators unauthorized response has a 4xx status code +func (o *ListServiceTerminatorsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this list service terminators unauthorized response has a 5xx status code +func (o *ListServiceTerminatorsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this list service terminators unauthorized response a status code equal to that given +func (o *ListServiceTerminatorsUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *ListServiceTerminatorsUnauthorized) Error() string { return fmt.Sprintf("[GET /services/{id}/terminators][%d] listServiceTerminatorsUnauthorized %+v", 401, o.Payload) } + +func (o *ListServiceTerminatorsUnauthorized) String() string { + return fmt.Sprintf("[GET /services/{id}/terminators][%d] listServiceTerminatorsUnauthorized %+v", 401, o.Payload) +} + func (o *ListServiceTerminatorsUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/service/list_services_parameters.go b/rest_client/service/list_services_parameters.go index d4958c076..d04d39769 100644 --- a/rest_client/service/list_services_parameters.go +++ b/rest_client/service/list_services_parameters.go @@ -77,10 +77,12 @@ func NewListServicesParamsWithHTTPClient(client *http.Client) *ListServicesParam } } -/* ListServicesParams contains all the parameters to send to the API endpoint - for the list services operation. +/* +ListServicesParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the list services operation. + + Typically these are written to a http.Request. */ type ListServicesParams struct { diff --git a/rest_client/service/list_services_responses.go b/rest_client/service/list_services_responses.go index 046cbef23..b2399fb81 100644 --- a/rest_client/service/list_services_responses.go +++ b/rest_client/service/list_services_responses.go @@ -69,7 +69,8 @@ func NewListServicesOK() *ListServicesOK { return &ListServicesOK{} } -/* ListServicesOK describes a response with status code 200, with default header values. +/* +ListServicesOK describes a response with status code 200, with default header values. A list of services */ @@ -77,9 +78,39 @@ type ListServicesOK struct { Payload *rest_model.ListServicesEnvelope } +// IsSuccess returns true when this list services o k response has a 2xx status code +func (o *ListServicesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this list services o k response has a 3xx status code +func (o *ListServicesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list services o k response has a 4xx status code +func (o *ListServicesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this list services o k response has a 5xx status code +func (o *ListServicesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this list services o k response a status code equal to that given +func (o *ListServicesOK) IsCode(code int) bool { + return code == 200 +} + func (o *ListServicesOK) Error() string { return fmt.Sprintf("[GET /services][%d] listServicesOK %+v", 200, o.Payload) } + +func (o *ListServicesOK) String() string { + return fmt.Sprintf("[GET /services][%d] listServicesOK %+v", 200, o.Payload) +} + func (o *ListServicesOK) GetPayload() *rest_model.ListServicesEnvelope { return o.Payload } @@ -101,7 +132,8 @@ func NewListServicesUnauthorized() *ListServicesUnauthorized { return &ListServicesUnauthorized{} } -/* ListServicesUnauthorized describes a response with status code 401, with default header values. +/* +ListServicesUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -109,9 +141,39 @@ type ListServicesUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this list services unauthorized response has a 2xx status code +func (o *ListServicesUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list services unauthorized response has a 3xx status code +func (o *ListServicesUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list services unauthorized response has a 4xx status code +func (o *ListServicesUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this list services unauthorized response has a 5xx status code +func (o *ListServicesUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this list services unauthorized response a status code equal to that given +func (o *ListServicesUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *ListServicesUnauthorized) Error() string { return fmt.Sprintf("[GET /services][%d] listServicesUnauthorized %+v", 401, o.Payload) } + +func (o *ListServicesUnauthorized) String() string { + return fmt.Sprintf("[GET /services][%d] listServicesUnauthorized %+v", 401, o.Payload) +} + func (o *ListServicesUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/service/patch_service_parameters.go b/rest_client/service/patch_service_parameters.go index 15f84800a..2c29fda55 100644 --- a/rest_client/service/patch_service_parameters.go +++ b/rest_client/service/patch_service_parameters.go @@ -78,10 +78,12 @@ func NewPatchServiceParamsWithHTTPClient(client *http.Client) *PatchServiceParam } } -/* PatchServiceParams contains all the parameters to send to the API endpoint - for the patch service operation. +/* +PatchServiceParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the patch service operation. + + Typically these are written to a http.Request. */ type PatchServiceParams struct { diff --git a/rest_client/service/patch_service_responses.go b/rest_client/service/patch_service_responses.go index 5bbaf8ba0..7030f2bba 100644 --- a/rest_client/service/patch_service_responses.go +++ b/rest_client/service/patch_service_responses.go @@ -81,7 +81,8 @@ func NewPatchServiceOK() *PatchServiceOK { return &PatchServiceOK{} } -/* PatchServiceOK describes a response with status code 200, with default header values. +/* +PatchServiceOK describes a response with status code 200, with default header values. The patch request was successful and the resource has been altered */ @@ -89,9 +90,39 @@ type PatchServiceOK struct { Payload *rest_model.Empty } +// IsSuccess returns true when this patch service o k response has a 2xx status code +func (o *PatchServiceOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this patch service o k response has a 3xx status code +func (o *PatchServiceOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch service o k response has a 4xx status code +func (o *PatchServiceOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this patch service o k response has a 5xx status code +func (o *PatchServiceOK) IsServerError() bool { + return false +} + +// IsCode returns true when this patch service o k response a status code equal to that given +func (o *PatchServiceOK) IsCode(code int) bool { + return code == 200 +} + func (o *PatchServiceOK) Error() string { return fmt.Sprintf("[PATCH /services/{id}][%d] patchServiceOK %+v", 200, o.Payload) } + +func (o *PatchServiceOK) String() string { + return fmt.Sprintf("[PATCH /services/{id}][%d] patchServiceOK %+v", 200, o.Payload) +} + func (o *PatchServiceOK) GetPayload() *rest_model.Empty { return o.Payload } @@ -113,7 +144,8 @@ func NewPatchServiceBadRequest() *PatchServiceBadRequest { return &PatchServiceBadRequest{} } -/* PatchServiceBadRequest describes a response with status code 400, with default header values. +/* +PatchServiceBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -121,9 +153,39 @@ type PatchServiceBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this patch service bad request response has a 2xx status code +func (o *PatchServiceBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch service bad request response has a 3xx status code +func (o *PatchServiceBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch service bad request response has a 4xx status code +func (o *PatchServiceBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch service bad request response has a 5xx status code +func (o *PatchServiceBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this patch service bad request response a status code equal to that given +func (o *PatchServiceBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *PatchServiceBadRequest) Error() string { return fmt.Sprintf("[PATCH /services/{id}][%d] patchServiceBadRequest %+v", 400, o.Payload) } + +func (o *PatchServiceBadRequest) String() string { + return fmt.Sprintf("[PATCH /services/{id}][%d] patchServiceBadRequest %+v", 400, o.Payload) +} + func (o *PatchServiceBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -145,7 +207,8 @@ func NewPatchServiceUnauthorized() *PatchServiceUnauthorized { return &PatchServiceUnauthorized{} } -/* PatchServiceUnauthorized describes a response with status code 401, with default header values. +/* +PatchServiceUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -153,9 +216,39 @@ type PatchServiceUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this patch service unauthorized response has a 2xx status code +func (o *PatchServiceUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch service unauthorized response has a 3xx status code +func (o *PatchServiceUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch service unauthorized response has a 4xx status code +func (o *PatchServiceUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch service unauthorized response has a 5xx status code +func (o *PatchServiceUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this patch service unauthorized response a status code equal to that given +func (o *PatchServiceUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *PatchServiceUnauthorized) Error() string { return fmt.Sprintf("[PATCH /services/{id}][%d] patchServiceUnauthorized %+v", 401, o.Payload) } + +func (o *PatchServiceUnauthorized) String() string { + return fmt.Sprintf("[PATCH /services/{id}][%d] patchServiceUnauthorized %+v", 401, o.Payload) +} + func (o *PatchServiceUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -177,7 +270,8 @@ func NewPatchServiceNotFound() *PatchServiceNotFound { return &PatchServiceNotFound{} } -/* PatchServiceNotFound describes a response with status code 404, with default header values. +/* +PatchServiceNotFound describes a response with status code 404, with default header values. The requested resource does not exist */ @@ -185,9 +279,39 @@ type PatchServiceNotFound struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this patch service not found response has a 2xx status code +func (o *PatchServiceNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch service not found response has a 3xx status code +func (o *PatchServiceNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch service not found response has a 4xx status code +func (o *PatchServiceNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch service not found response has a 5xx status code +func (o *PatchServiceNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this patch service not found response a status code equal to that given +func (o *PatchServiceNotFound) IsCode(code int) bool { + return code == 404 +} + func (o *PatchServiceNotFound) Error() string { return fmt.Sprintf("[PATCH /services/{id}][%d] patchServiceNotFound %+v", 404, o.Payload) } + +func (o *PatchServiceNotFound) String() string { + return fmt.Sprintf("[PATCH /services/{id}][%d] patchServiceNotFound %+v", 404, o.Payload) +} + func (o *PatchServiceNotFound) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/service/service_client.go b/rest_client/service/service_client.go index 2ed794f21..17ac3f5ff 100644 --- a/rest_client/service/service_client.go +++ b/rest_client/service/service_client.go @@ -72,9 +72,9 @@ type ClientService interface { } /* - CreateService creates a service resource +CreateService creates a service resource - Create a service resource. Requires admin access. +Create a service resource. Requires admin access. */ func (a *Client) CreateService(params *CreateServiceParams, opts ...ClientOption) (*CreateServiceCreated, error) { // TODO: Validate the params before sending @@ -112,9 +112,9 @@ func (a *Client) CreateService(params *CreateServiceParams, opts ...ClientOption } /* - DeleteService deletes a service +DeleteService deletes a service - Delete a service by id. Requires admin access. +Delete a service by id. Requires admin access. */ func (a *Client) DeleteService(params *DeleteServiceParams, opts ...ClientOption) (*DeleteServiceOK, error) { // TODO: Validate the params before sending @@ -152,9 +152,9 @@ func (a *Client) DeleteService(params *DeleteServiceParams, opts ...ClientOption } /* - DetailService retrieves a single service +DetailService retrieves a single service - Retrieves a single service by id. Requires admin access. +Retrieves a single service by id. Requires admin access. */ func (a *Client) DetailService(params *DetailServiceParams, opts ...ClientOption) (*DetailServiceOK, error) { // TODO: Validate the params before sending @@ -192,10 +192,9 @@ func (a *Client) DetailService(params *DetailServiceParams, opts ...ClientOption } /* - ListServiceTerminators lists of terminators assigned to a service - - Retrieves a list of terminator resources that are assigned specific service; supports filtering, sorting, and pagination. +ListServiceTerminators lists of terminators assigned to a service +Retrieves a list of terminator resources that are assigned specific service; supports filtering, sorting, and pagination. */ func (a *Client) ListServiceTerminators(params *ListServiceTerminatorsParams, opts ...ClientOption) (*ListServiceTerminatorsOK, error) { // TODO: Validate the params before sending @@ -233,10 +232,9 @@ func (a *Client) ListServiceTerminators(params *ListServiceTerminatorsParams, op } /* - ListServices lists services - - Retrieves a list of service resources; supports filtering, sorting, and pagination. Requires admin access. +ListServices lists services +Retrieves a list of service resources; supports filtering, sorting, and pagination. Requires admin access. */ func (a *Client) ListServices(params *ListServicesParams, opts ...ClientOption) (*ListServicesOK, error) { // TODO: Validate the params before sending @@ -274,9 +272,9 @@ func (a *Client) ListServices(params *ListServicesParams, opts ...ClientOption) } /* - PatchService updates the supplied fields on a service +PatchService updates the supplied fields on a service - Update the supplied fields on a service. Requires admin access. +Update the supplied fields on a service. Requires admin access. */ func (a *Client) PatchService(params *PatchServiceParams, opts ...ClientOption) (*PatchServiceOK, error) { // TODO: Validate the params before sending @@ -314,9 +312,9 @@ func (a *Client) PatchService(params *PatchServiceParams, opts ...ClientOption) } /* - UpdateService updates all fields on a service +UpdateService updates all fields on a service - Update all fields on a service by id. Requires admin access. +Update all fields on a service by id. Requires admin access. */ func (a *Client) UpdateService(params *UpdateServiceParams, opts ...ClientOption) (*UpdateServiceOK, error) { // TODO: Validate the params before sending diff --git a/rest_client/service/update_service_parameters.go b/rest_client/service/update_service_parameters.go index d578d1afd..31c7657ab 100644 --- a/rest_client/service/update_service_parameters.go +++ b/rest_client/service/update_service_parameters.go @@ -78,10 +78,12 @@ func NewUpdateServiceParamsWithHTTPClient(client *http.Client) *UpdateServicePar } } -/* UpdateServiceParams contains all the parameters to send to the API endpoint - for the update service operation. +/* +UpdateServiceParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the update service operation. + + Typically these are written to a http.Request. */ type UpdateServiceParams struct { diff --git a/rest_client/service/update_service_responses.go b/rest_client/service/update_service_responses.go index 7e5533ad8..5af27f5bc 100644 --- a/rest_client/service/update_service_responses.go +++ b/rest_client/service/update_service_responses.go @@ -81,7 +81,8 @@ func NewUpdateServiceOK() *UpdateServiceOK { return &UpdateServiceOK{} } -/* UpdateServiceOK describes a response with status code 200, with default header values. +/* +UpdateServiceOK describes a response with status code 200, with default header values. The update request was successful and the resource has been altered */ @@ -89,9 +90,39 @@ type UpdateServiceOK struct { Payload *rest_model.Empty } +// IsSuccess returns true when this update service o k response has a 2xx status code +func (o *UpdateServiceOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update service o k response has a 3xx status code +func (o *UpdateServiceOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update service o k response has a 4xx status code +func (o *UpdateServiceOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update service o k response has a 5xx status code +func (o *UpdateServiceOK) IsServerError() bool { + return false +} + +// IsCode returns true when this update service o k response a status code equal to that given +func (o *UpdateServiceOK) IsCode(code int) bool { + return code == 200 +} + func (o *UpdateServiceOK) Error() string { return fmt.Sprintf("[PUT /services/{id}][%d] updateServiceOK %+v", 200, o.Payload) } + +func (o *UpdateServiceOK) String() string { + return fmt.Sprintf("[PUT /services/{id}][%d] updateServiceOK %+v", 200, o.Payload) +} + func (o *UpdateServiceOK) GetPayload() *rest_model.Empty { return o.Payload } @@ -113,7 +144,8 @@ func NewUpdateServiceBadRequest() *UpdateServiceBadRequest { return &UpdateServiceBadRequest{} } -/* UpdateServiceBadRequest describes a response with status code 400, with default header values. +/* +UpdateServiceBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -121,9 +153,39 @@ type UpdateServiceBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this update service bad request response has a 2xx status code +func (o *UpdateServiceBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update service bad request response has a 3xx status code +func (o *UpdateServiceBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update service bad request response has a 4xx status code +func (o *UpdateServiceBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this update service bad request response has a 5xx status code +func (o *UpdateServiceBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this update service bad request response a status code equal to that given +func (o *UpdateServiceBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *UpdateServiceBadRequest) Error() string { return fmt.Sprintf("[PUT /services/{id}][%d] updateServiceBadRequest %+v", 400, o.Payload) } + +func (o *UpdateServiceBadRequest) String() string { + return fmt.Sprintf("[PUT /services/{id}][%d] updateServiceBadRequest %+v", 400, o.Payload) +} + func (o *UpdateServiceBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -145,7 +207,8 @@ func NewUpdateServiceUnauthorized() *UpdateServiceUnauthorized { return &UpdateServiceUnauthorized{} } -/* UpdateServiceUnauthorized describes a response with status code 401, with default header values. +/* +UpdateServiceUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -153,9 +216,39 @@ type UpdateServiceUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this update service unauthorized response has a 2xx status code +func (o *UpdateServiceUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update service unauthorized response has a 3xx status code +func (o *UpdateServiceUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update service unauthorized response has a 4xx status code +func (o *UpdateServiceUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this update service unauthorized response has a 5xx status code +func (o *UpdateServiceUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this update service unauthorized response a status code equal to that given +func (o *UpdateServiceUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *UpdateServiceUnauthorized) Error() string { return fmt.Sprintf("[PUT /services/{id}][%d] updateServiceUnauthorized %+v", 401, o.Payload) } + +func (o *UpdateServiceUnauthorized) String() string { + return fmt.Sprintf("[PUT /services/{id}][%d] updateServiceUnauthorized %+v", 401, o.Payload) +} + func (o *UpdateServiceUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -177,7 +270,8 @@ func NewUpdateServiceNotFound() *UpdateServiceNotFound { return &UpdateServiceNotFound{} } -/* UpdateServiceNotFound describes a response with status code 404, with default header values. +/* +UpdateServiceNotFound describes a response with status code 404, with default header values. The requested resource does not exist */ @@ -185,9 +279,39 @@ type UpdateServiceNotFound struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this update service not found response has a 2xx status code +func (o *UpdateServiceNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update service not found response has a 3xx status code +func (o *UpdateServiceNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update service not found response has a 4xx status code +func (o *UpdateServiceNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this update service not found response has a 5xx status code +func (o *UpdateServiceNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this update service not found response a status code equal to that given +func (o *UpdateServiceNotFound) IsCode(code int) bool { + return code == 404 +} + func (o *UpdateServiceNotFound) Error() string { return fmt.Sprintf("[PUT /services/{id}][%d] updateServiceNotFound %+v", 404, o.Payload) } + +func (o *UpdateServiceNotFound) String() string { + return fmt.Sprintf("[PUT /services/{id}][%d] updateServiceNotFound %+v", 404, o.Payload) +} + func (o *UpdateServiceNotFound) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/terminator/create_terminator_parameters.go b/rest_client/terminator/create_terminator_parameters.go index 4cccedd90..bad5d67e2 100644 --- a/rest_client/terminator/create_terminator_parameters.go +++ b/rest_client/terminator/create_terminator_parameters.go @@ -78,10 +78,12 @@ func NewCreateTerminatorParamsWithHTTPClient(client *http.Client) *CreateTermina } } -/* CreateTerminatorParams contains all the parameters to send to the API endpoint - for the create terminator operation. +/* +CreateTerminatorParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the create terminator operation. + + Typically these are written to a http.Request. */ type CreateTerminatorParams struct { diff --git a/rest_client/terminator/create_terminator_responses.go b/rest_client/terminator/create_terminator_responses.go index 7c19e7bf8..ca57c54d6 100644 --- a/rest_client/terminator/create_terminator_responses.go +++ b/rest_client/terminator/create_terminator_responses.go @@ -75,7 +75,8 @@ func NewCreateTerminatorCreated() *CreateTerminatorCreated { return &CreateTerminatorCreated{} } -/* CreateTerminatorCreated describes a response with status code 201, with default header values. +/* +CreateTerminatorCreated describes a response with status code 201, with default header values. The create request was successful and the resource has been added at the following location */ @@ -83,9 +84,39 @@ type CreateTerminatorCreated struct { Payload *rest_model.CreateEnvelope } +// IsSuccess returns true when this create terminator created response has a 2xx status code +func (o *CreateTerminatorCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this create terminator created response has a 3xx status code +func (o *CreateTerminatorCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create terminator created response has a 4xx status code +func (o *CreateTerminatorCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this create terminator created response has a 5xx status code +func (o *CreateTerminatorCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this create terminator created response a status code equal to that given +func (o *CreateTerminatorCreated) IsCode(code int) bool { + return code == 201 +} + func (o *CreateTerminatorCreated) Error() string { return fmt.Sprintf("[POST /terminators][%d] createTerminatorCreated %+v", 201, o.Payload) } + +func (o *CreateTerminatorCreated) String() string { + return fmt.Sprintf("[POST /terminators][%d] createTerminatorCreated %+v", 201, o.Payload) +} + func (o *CreateTerminatorCreated) GetPayload() *rest_model.CreateEnvelope { return o.Payload } @@ -107,7 +138,8 @@ func NewCreateTerminatorBadRequest() *CreateTerminatorBadRequest { return &CreateTerminatorBadRequest{} } -/* CreateTerminatorBadRequest describes a response with status code 400, with default header values. +/* +CreateTerminatorBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -115,9 +147,39 @@ type CreateTerminatorBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this create terminator bad request response has a 2xx status code +func (o *CreateTerminatorBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create terminator bad request response has a 3xx status code +func (o *CreateTerminatorBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create terminator bad request response has a 4xx status code +func (o *CreateTerminatorBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this create terminator bad request response has a 5xx status code +func (o *CreateTerminatorBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this create terminator bad request response a status code equal to that given +func (o *CreateTerminatorBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *CreateTerminatorBadRequest) Error() string { return fmt.Sprintf("[POST /terminators][%d] createTerminatorBadRequest %+v", 400, o.Payload) } + +func (o *CreateTerminatorBadRequest) String() string { + return fmt.Sprintf("[POST /terminators][%d] createTerminatorBadRequest %+v", 400, o.Payload) +} + func (o *CreateTerminatorBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewCreateTerminatorUnauthorized() *CreateTerminatorUnauthorized { return &CreateTerminatorUnauthorized{} } -/* CreateTerminatorUnauthorized describes a response with status code 401, with default header values. +/* +CreateTerminatorUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -147,9 +210,39 @@ type CreateTerminatorUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this create terminator unauthorized response has a 2xx status code +func (o *CreateTerminatorUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create terminator unauthorized response has a 3xx status code +func (o *CreateTerminatorUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create terminator unauthorized response has a 4xx status code +func (o *CreateTerminatorUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this create terminator unauthorized response has a 5xx status code +func (o *CreateTerminatorUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this create terminator unauthorized response a status code equal to that given +func (o *CreateTerminatorUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *CreateTerminatorUnauthorized) Error() string { return fmt.Sprintf("[POST /terminators][%d] createTerminatorUnauthorized %+v", 401, o.Payload) } + +func (o *CreateTerminatorUnauthorized) String() string { + return fmt.Sprintf("[POST /terminators][%d] createTerminatorUnauthorized %+v", 401, o.Payload) +} + func (o *CreateTerminatorUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/terminator/delete_terminator_parameters.go b/rest_client/terminator/delete_terminator_parameters.go index 1a5682ed5..280b36a92 100644 --- a/rest_client/terminator/delete_terminator_parameters.go +++ b/rest_client/terminator/delete_terminator_parameters.go @@ -76,10 +76,12 @@ func NewDeleteTerminatorParamsWithHTTPClient(client *http.Client) *DeleteTermina } } -/* DeleteTerminatorParams contains all the parameters to send to the API endpoint - for the delete terminator operation. +/* +DeleteTerminatorParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the delete terminator operation. + + Typically these are written to a http.Request. */ type DeleteTerminatorParams struct { diff --git a/rest_client/terminator/delete_terminator_responses.go b/rest_client/terminator/delete_terminator_responses.go index cf838bab7..676482a2b 100644 --- a/rest_client/terminator/delete_terminator_responses.go +++ b/rest_client/terminator/delete_terminator_responses.go @@ -81,7 +81,8 @@ func NewDeleteTerminatorOK() *DeleteTerminatorOK { return &DeleteTerminatorOK{} } -/* DeleteTerminatorOK describes a response with status code 200, with default header values. +/* +DeleteTerminatorOK describes a response with status code 200, with default header values. The delete request was successful and the resource has been removed */ @@ -89,9 +90,39 @@ type DeleteTerminatorOK struct { Payload *rest_model.Empty } +// IsSuccess returns true when this delete terminator o k response has a 2xx status code +func (o *DeleteTerminatorOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this delete terminator o k response has a 3xx status code +func (o *DeleteTerminatorOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete terminator o k response has a 4xx status code +func (o *DeleteTerminatorOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete terminator o k response has a 5xx status code +func (o *DeleteTerminatorOK) IsServerError() bool { + return false +} + +// IsCode returns true when this delete terminator o k response a status code equal to that given +func (o *DeleteTerminatorOK) IsCode(code int) bool { + return code == 200 +} + func (o *DeleteTerminatorOK) Error() string { return fmt.Sprintf("[DELETE /terminators/{id}][%d] deleteTerminatorOK %+v", 200, o.Payload) } + +func (o *DeleteTerminatorOK) String() string { + return fmt.Sprintf("[DELETE /terminators/{id}][%d] deleteTerminatorOK %+v", 200, o.Payload) +} + func (o *DeleteTerminatorOK) GetPayload() *rest_model.Empty { return o.Payload } @@ -113,7 +144,8 @@ func NewDeleteTerminatorBadRequest() *DeleteTerminatorBadRequest { return &DeleteTerminatorBadRequest{} } -/* DeleteTerminatorBadRequest describes a response with status code 400, with default header values. +/* +DeleteTerminatorBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -121,9 +153,39 @@ type DeleteTerminatorBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this delete terminator bad request response has a 2xx status code +func (o *DeleteTerminatorBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete terminator bad request response has a 3xx status code +func (o *DeleteTerminatorBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete terminator bad request response has a 4xx status code +func (o *DeleteTerminatorBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete terminator bad request response has a 5xx status code +func (o *DeleteTerminatorBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this delete terminator bad request response a status code equal to that given +func (o *DeleteTerminatorBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *DeleteTerminatorBadRequest) Error() string { return fmt.Sprintf("[DELETE /terminators/{id}][%d] deleteTerminatorBadRequest %+v", 400, o.Payload) } + +func (o *DeleteTerminatorBadRequest) String() string { + return fmt.Sprintf("[DELETE /terminators/{id}][%d] deleteTerminatorBadRequest %+v", 400, o.Payload) +} + func (o *DeleteTerminatorBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -145,7 +207,8 @@ func NewDeleteTerminatorUnauthorized() *DeleteTerminatorUnauthorized { return &DeleteTerminatorUnauthorized{} } -/* DeleteTerminatorUnauthorized describes a response with status code 401, with default header values. +/* +DeleteTerminatorUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -153,9 +216,39 @@ type DeleteTerminatorUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this delete terminator unauthorized response has a 2xx status code +func (o *DeleteTerminatorUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete terminator unauthorized response has a 3xx status code +func (o *DeleteTerminatorUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete terminator unauthorized response has a 4xx status code +func (o *DeleteTerminatorUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete terminator unauthorized response has a 5xx status code +func (o *DeleteTerminatorUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this delete terminator unauthorized response a status code equal to that given +func (o *DeleteTerminatorUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *DeleteTerminatorUnauthorized) Error() string { return fmt.Sprintf("[DELETE /terminators/{id}][%d] deleteTerminatorUnauthorized %+v", 401, o.Payload) } + +func (o *DeleteTerminatorUnauthorized) String() string { + return fmt.Sprintf("[DELETE /terminators/{id}][%d] deleteTerminatorUnauthorized %+v", 401, o.Payload) +} + func (o *DeleteTerminatorUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -177,7 +270,8 @@ func NewDeleteTerminatorConflict() *DeleteTerminatorConflict { return &DeleteTerminatorConflict{} } -/* DeleteTerminatorConflict describes a response with status code 409, with default header values. +/* +DeleteTerminatorConflict describes a response with status code 409, with default header values. The resource requested to be removed/altered cannot be as it is referenced by another object. */ @@ -185,9 +279,39 @@ type DeleteTerminatorConflict struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this delete terminator conflict response has a 2xx status code +func (o *DeleteTerminatorConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete terminator conflict response has a 3xx status code +func (o *DeleteTerminatorConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete terminator conflict response has a 4xx status code +func (o *DeleteTerminatorConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete terminator conflict response has a 5xx status code +func (o *DeleteTerminatorConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this delete terminator conflict response a status code equal to that given +func (o *DeleteTerminatorConflict) IsCode(code int) bool { + return code == 409 +} + func (o *DeleteTerminatorConflict) Error() string { return fmt.Sprintf("[DELETE /terminators/{id}][%d] deleteTerminatorConflict %+v", 409, o.Payload) } + +func (o *DeleteTerminatorConflict) String() string { + return fmt.Sprintf("[DELETE /terminators/{id}][%d] deleteTerminatorConflict %+v", 409, o.Payload) +} + func (o *DeleteTerminatorConflict) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/terminator/detail_terminator_parameters.go b/rest_client/terminator/detail_terminator_parameters.go index d4f86df30..0da90a5fa 100644 --- a/rest_client/terminator/detail_terminator_parameters.go +++ b/rest_client/terminator/detail_terminator_parameters.go @@ -76,10 +76,12 @@ func NewDetailTerminatorParamsWithHTTPClient(client *http.Client) *DetailTermina } } -/* DetailTerminatorParams contains all the parameters to send to the API endpoint - for the detail terminator operation. +/* +DetailTerminatorParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the detail terminator operation. + + Typically these are written to a http.Request. */ type DetailTerminatorParams struct { diff --git a/rest_client/terminator/detail_terminator_responses.go b/rest_client/terminator/detail_terminator_responses.go index 623e9ded9..810fa5b95 100644 --- a/rest_client/terminator/detail_terminator_responses.go +++ b/rest_client/terminator/detail_terminator_responses.go @@ -75,7 +75,8 @@ func NewDetailTerminatorOK() *DetailTerminatorOK { return &DetailTerminatorOK{} } -/* DetailTerminatorOK describes a response with status code 200, with default header values. +/* +DetailTerminatorOK describes a response with status code 200, with default header values. A single terminator */ @@ -83,9 +84,39 @@ type DetailTerminatorOK struct { Payload *rest_model.DetailTerminatorEnvelope } +// IsSuccess returns true when this detail terminator o k response has a 2xx status code +func (o *DetailTerminatorOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this detail terminator o k response has a 3xx status code +func (o *DetailTerminatorOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail terminator o k response has a 4xx status code +func (o *DetailTerminatorOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this detail terminator o k response has a 5xx status code +func (o *DetailTerminatorOK) IsServerError() bool { + return false +} + +// IsCode returns true when this detail terminator o k response a status code equal to that given +func (o *DetailTerminatorOK) IsCode(code int) bool { + return code == 200 +} + func (o *DetailTerminatorOK) Error() string { return fmt.Sprintf("[GET /terminators/{id}][%d] detailTerminatorOK %+v", 200, o.Payload) } + +func (o *DetailTerminatorOK) String() string { + return fmt.Sprintf("[GET /terminators/{id}][%d] detailTerminatorOK %+v", 200, o.Payload) +} + func (o *DetailTerminatorOK) GetPayload() *rest_model.DetailTerminatorEnvelope { return o.Payload } @@ -107,7 +138,8 @@ func NewDetailTerminatorUnauthorized() *DetailTerminatorUnauthorized { return &DetailTerminatorUnauthorized{} } -/* DetailTerminatorUnauthorized describes a response with status code 401, with default header values. +/* +DetailTerminatorUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -115,9 +147,39 @@ type DetailTerminatorUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this detail terminator unauthorized response has a 2xx status code +func (o *DetailTerminatorUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this detail terminator unauthorized response has a 3xx status code +func (o *DetailTerminatorUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail terminator unauthorized response has a 4xx status code +func (o *DetailTerminatorUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this detail terminator unauthorized response has a 5xx status code +func (o *DetailTerminatorUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this detail terminator unauthorized response a status code equal to that given +func (o *DetailTerminatorUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *DetailTerminatorUnauthorized) Error() string { return fmt.Sprintf("[GET /terminators/{id}][%d] detailTerminatorUnauthorized %+v", 401, o.Payload) } + +func (o *DetailTerminatorUnauthorized) String() string { + return fmt.Sprintf("[GET /terminators/{id}][%d] detailTerminatorUnauthorized %+v", 401, o.Payload) +} + func (o *DetailTerminatorUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewDetailTerminatorNotFound() *DetailTerminatorNotFound { return &DetailTerminatorNotFound{} } -/* DetailTerminatorNotFound describes a response with status code 404, with default header values. +/* +DetailTerminatorNotFound describes a response with status code 404, with default header values. The requested resource does not exist */ @@ -147,9 +210,39 @@ type DetailTerminatorNotFound struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this detail terminator not found response has a 2xx status code +func (o *DetailTerminatorNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this detail terminator not found response has a 3xx status code +func (o *DetailTerminatorNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this detail terminator not found response has a 4xx status code +func (o *DetailTerminatorNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this detail terminator not found response has a 5xx status code +func (o *DetailTerminatorNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this detail terminator not found response a status code equal to that given +func (o *DetailTerminatorNotFound) IsCode(code int) bool { + return code == 404 +} + func (o *DetailTerminatorNotFound) Error() string { return fmt.Sprintf("[GET /terminators/{id}][%d] detailTerminatorNotFound %+v", 404, o.Payload) } + +func (o *DetailTerminatorNotFound) String() string { + return fmt.Sprintf("[GET /terminators/{id}][%d] detailTerminatorNotFound %+v", 404, o.Payload) +} + func (o *DetailTerminatorNotFound) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/terminator/list_terminators_parameters.go b/rest_client/terminator/list_terminators_parameters.go index fd7777db3..dbac7e8bc 100644 --- a/rest_client/terminator/list_terminators_parameters.go +++ b/rest_client/terminator/list_terminators_parameters.go @@ -77,10 +77,12 @@ func NewListTerminatorsParamsWithHTTPClient(client *http.Client) *ListTerminator } } -/* ListTerminatorsParams contains all the parameters to send to the API endpoint - for the list terminators operation. +/* +ListTerminatorsParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the list terminators operation. + + Typically these are written to a http.Request. */ type ListTerminatorsParams struct { diff --git a/rest_client/terminator/list_terminators_responses.go b/rest_client/terminator/list_terminators_responses.go index 69d5bcd7a..72291b6d2 100644 --- a/rest_client/terminator/list_terminators_responses.go +++ b/rest_client/terminator/list_terminators_responses.go @@ -75,7 +75,8 @@ func NewListTerminatorsOK() *ListTerminatorsOK { return &ListTerminatorsOK{} } -/* ListTerminatorsOK describes a response with status code 200, with default header values. +/* +ListTerminatorsOK describes a response with status code 200, with default header values. A list of terminators */ @@ -83,9 +84,39 @@ type ListTerminatorsOK struct { Payload *rest_model.ListTerminatorsEnvelope } +// IsSuccess returns true when this list terminators o k response has a 2xx status code +func (o *ListTerminatorsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this list terminators o k response has a 3xx status code +func (o *ListTerminatorsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list terminators o k response has a 4xx status code +func (o *ListTerminatorsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this list terminators o k response has a 5xx status code +func (o *ListTerminatorsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this list terminators o k response a status code equal to that given +func (o *ListTerminatorsOK) IsCode(code int) bool { + return code == 200 +} + func (o *ListTerminatorsOK) Error() string { return fmt.Sprintf("[GET /terminators][%d] listTerminatorsOK %+v", 200, o.Payload) } + +func (o *ListTerminatorsOK) String() string { + return fmt.Sprintf("[GET /terminators][%d] listTerminatorsOK %+v", 200, o.Payload) +} + func (o *ListTerminatorsOK) GetPayload() *rest_model.ListTerminatorsEnvelope { return o.Payload } @@ -107,7 +138,8 @@ func NewListTerminatorsBadRequest() *ListTerminatorsBadRequest { return &ListTerminatorsBadRequest{} } -/* ListTerminatorsBadRequest describes a response with status code 400, with default header values. +/* +ListTerminatorsBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -115,9 +147,39 @@ type ListTerminatorsBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this list terminators bad request response has a 2xx status code +func (o *ListTerminatorsBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list terminators bad request response has a 3xx status code +func (o *ListTerminatorsBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list terminators bad request response has a 4xx status code +func (o *ListTerminatorsBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this list terminators bad request response has a 5xx status code +func (o *ListTerminatorsBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this list terminators bad request response a status code equal to that given +func (o *ListTerminatorsBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *ListTerminatorsBadRequest) Error() string { return fmt.Sprintf("[GET /terminators][%d] listTerminatorsBadRequest %+v", 400, o.Payload) } + +func (o *ListTerminatorsBadRequest) String() string { + return fmt.Sprintf("[GET /terminators][%d] listTerminatorsBadRequest %+v", 400, o.Payload) +} + func (o *ListTerminatorsBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -139,7 +201,8 @@ func NewListTerminatorsUnauthorized() *ListTerminatorsUnauthorized { return &ListTerminatorsUnauthorized{} } -/* ListTerminatorsUnauthorized describes a response with status code 401, with default header values. +/* +ListTerminatorsUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -147,9 +210,39 @@ type ListTerminatorsUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this list terminators unauthorized response has a 2xx status code +func (o *ListTerminatorsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list terminators unauthorized response has a 3xx status code +func (o *ListTerminatorsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list terminators unauthorized response has a 4xx status code +func (o *ListTerminatorsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this list terminators unauthorized response has a 5xx status code +func (o *ListTerminatorsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this list terminators unauthorized response a status code equal to that given +func (o *ListTerminatorsUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *ListTerminatorsUnauthorized) Error() string { return fmt.Sprintf("[GET /terminators][%d] listTerminatorsUnauthorized %+v", 401, o.Payload) } + +func (o *ListTerminatorsUnauthorized) String() string { + return fmt.Sprintf("[GET /terminators][%d] listTerminatorsUnauthorized %+v", 401, o.Payload) +} + func (o *ListTerminatorsUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/terminator/patch_terminator_parameters.go b/rest_client/terminator/patch_terminator_parameters.go index 030b1a858..58c331826 100644 --- a/rest_client/terminator/patch_terminator_parameters.go +++ b/rest_client/terminator/patch_terminator_parameters.go @@ -78,10 +78,12 @@ func NewPatchTerminatorParamsWithHTTPClient(client *http.Client) *PatchTerminato } } -/* PatchTerminatorParams contains all the parameters to send to the API endpoint - for the patch terminator operation. +/* +PatchTerminatorParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the patch terminator operation. + + Typically these are written to a http.Request. */ type PatchTerminatorParams struct { diff --git a/rest_client/terminator/patch_terminator_responses.go b/rest_client/terminator/patch_terminator_responses.go index 56eb53d5e..8d418dc7a 100644 --- a/rest_client/terminator/patch_terminator_responses.go +++ b/rest_client/terminator/patch_terminator_responses.go @@ -81,7 +81,8 @@ func NewPatchTerminatorOK() *PatchTerminatorOK { return &PatchTerminatorOK{} } -/* PatchTerminatorOK describes a response with status code 200, with default header values. +/* +PatchTerminatorOK describes a response with status code 200, with default header values. The patch request was successful and the resource has been altered */ @@ -89,9 +90,39 @@ type PatchTerminatorOK struct { Payload *rest_model.Empty } +// IsSuccess returns true when this patch terminator o k response has a 2xx status code +func (o *PatchTerminatorOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this patch terminator o k response has a 3xx status code +func (o *PatchTerminatorOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch terminator o k response has a 4xx status code +func (o *PatchTerminatorOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this patch terminator o k response has a 5xx status code +func (o *PatchTerminatorOK) IsServerError() bool { + return false +} + +// IsCode returns true when this patch terminator o k response a status code equal to that given +func (o *PatchTerminatorOK) IsCode(code int) bool { + return code == 200 +} + func (o *PatchTerminatorOK) Error() string { return fmt.Sprintf("[PATCH /terminators/{id}][%d] patchTerminatorOK %+v", 200, o.Payload) } + +func (o *PatchTerminatorOK) String() string { + return fmt.Sprintf("[PATCH /terminators/{id}][%d] patchTerminatorOK %+v", 200, o.Payload) +} + func (o *PatchTerminatorOK) GetPayload() *rest_model.Empty { return o.Payload } @@ -113,7 +144,8 @@ func NewPatchTerminatorBadRequest() *PatchTerminatorBadRequest { return &PatchTerminatorBadRequest{} } -/* PatchTerminatorBadRequest describes a response with status code 400, with default header values. +/* +PatchTerminatorBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -121,9 +153,39 @@ type PatchTerminatorBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this patch terminator bad request response has a 2xx status code +func (o *PatchTerminatorBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch terminator bad request response has a 3xx status code +func (o *PatchTerminatorBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch terminator bad request response has a 4xx status code +func (o *PatchTerminatorBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch terminator bad request response has a 5xx status code +func (o *PatchTerminatorBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this patch terminator bad request response a status code equal to that given +func (o *PatchTerminatorBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *PatchTerminatorBadRequest) Error() string { return fmt.Sprintf("[PATCH /terminators/{id}][%d] patchTerminatorBadRequest %+v", 400, o.Payload) } + +func (o *PatchTerminatorBadRequest) String() string { + return fmt.Sprintf("[PATCH /terminators/{id}][%d] patchTerminatorBadRequest %+v", 400, o.Payload) +} + func (o *PatchTerminatorBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -145,7 +207,8 @@ func NewPatchTerminatorUnauthorized() *PatchTerminatorUnauthorized { return &PatchTerminatorUnauthorized{} } -/* PatchTerminatorUnauthorized describes a response with status code 401, with default header values. +/* +PatchTerminatorUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -153,9 +216,39 @@ type PatchTerminatorUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this patch terminator unauthorized response has a 2xx status code +func (o *PatchTerminatorUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch terminator unauthorized response has a 3xx status code +func (o *PatchTerminatorUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch terminator unauthorized response has a 4xx status code +func (o *PatchTerminatorUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch terminator unauthorized response has a 5xx status code +func (o *PatchTerminatorUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this patch terminator unauthorized response a status code equal to that given +func (o *PatchTerminatorUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *PatchTerminatorUnauthorized) Error() string { return fmt.Sprintf("[PATCH /terminators/{id}][%d] patchTerminatorUnauthorized %+v", 401, o.Payload) } + +func (o *PatchTerminatorUnauthorized) String() string { + return fmt.Sprintf("[PATCH /terminators/{id}][%d] patchTerminatorUnauthorized %+v", 401, o.Payload) +} + func (o *PatchTerminatorUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -177,7 +270,8 @@ func NewPatchTerminatorNotFound() *PatchTerminatorNotFound { return &PatchTerminatorNotFound{} } -/* PatchTerminatorNotFound describes a response with status code 404, with default header values. +/* +PatchTerminatorNotFound describes a response with status code 404, with default header values. The requested resource does not exist */ @@ -185,9 +279,39 @@ type PatchTerminatorNotFound struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this patch terminator not found response has a 2xx status code +func (o *PatchTerminatorNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch terminator not found response has a 3xx status code +func (o *PatchTerminatorNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch terminator not found response has a 4xx status code +func (o *PatchTerminatorNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch terminator not found response has a 5xx status code +func (o *PatchTerminatorNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this patch terminator not found response a status code equal to that given +func (o *PatchTerminatorNotFound) IsCode(code int) bool { + return code == 404 +} + func (o *PatchTerminatorNotFound) Error() string { return fmt.Sprintf("[PATCH /terminators/{id}][%d] patchTerminatorNotFound %+v", 404, o.Payload) } + +func (o *PatchTerminatorNotFound) String() string { + return fmt.Sprintf("[PATCH /terminators/{id}][%d] patchTerminatorNotFound %+v", 404, o.Payload) +} + func (o *PatchTerminatorNotFound) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_client/terminator/terminator_client.go b/rest_client/terminator/terminator_client.go index e560593a7..d468588fb 100644 --- a/rest_client/terminator/terminator_client.go +++ b/rest_client/terminator/terminator_client.go @@ -70,9 +70,9 @@ type ClientService interface { } /* - CreateTerminator creates a terminator resource +CreateTerminator creates a terminator resource - Create a terminator resource. Requires admin access. +Create a terminator resource. Requires admin access. */ func (a *Client) CreateTerminator(params *CreateTerminatorParams, opts ...ClientOption) (*CreateTerminatorCreated, error) { // TODO: Validate the params before sending @@ -110,9 +110,9 @@ func (a *Client) CreateTerminator(params *CreateTerminatorParams, opts ...Client } /* - DeleteTerminator deletes a terminator +DeleteTerminator deletes a terminator - Delete a terminator by id. Requires admin access. +Delete a terminator by id. Requires admin access. */ func (a *Client) DeleteTerminator(params *DeleteTerminatorParams, opts ...ClientOption) (*DeleteTerminatorOK, error) { // TODO: Validate the params before sending @@ -150,9 +150,9 @@ func (a *Client) DeleteTerminator(params *DeleteTerminatorParams, opts ...Client } /* - DetailTerminator retrieves a single terminator +DetailTerminator retrieves a single terminator - Retrieves a single terminator by id. Requires admin access. +Retrieves a single terminator by id. Requires admin access. */ func (a *Client) DetailTerminator(params *DetailTerminatorParams, opts ...ClientOption) (*DetailTerminatorOK, error) { // TODO: Validate the params before sending @@ -190,10 +190,9 @@ func (a *Client) DetailTerminator(params *DetailTerminatorParams, opts ...Client } /* - ListTerminators lists terminators - - Retrieves a list of terminator resources; supports filtering, sorting, and pagination. Requires admin access. +ListTerminators lists terminators +Retrieves a list of terminator resources; supports filtering, sorting, and pagination. Requires admin access. */ func (a *Client) ListTerminators(params *ListTerminatorsParams, opts ...ClientOption) (*ListTerminatorsOK, error) { // TODO: Validate the params before sending @@ -231,9 +230,9 @@ func (a *Client) ListTerminators(params *ListTerminatorsParams, opts ...ClientOp } /* - PatchTerminator updates the supplied fields on a terminator +PatchTerminator updates the supplied fields on a terminator - Update the supplied fields on a terminator. Requires admin access. +Update the supplied fields on a terminator. Requires admin access. */ func (a *Client) PatchTerminator(params *PatchTerminatorParams, opts ...ClientOption) (*PatchTerminatorOK, error) { // TODO: Validate the params before sending @@ -271,9 +270,9 @@ func (a *Client) PatchTerminator(params *PatchTerminatorParams, opts ...ClientOp } /* - UpdateTerminator updates all fields on a terminator +UpdateTerminator updates all fields on a terminator - Update all fields on a terminator by id. Requires admin access. +Update all fields on a terminator by id. Requires admin access. */ func (a *Client) UpdateTerminator(params *UpdateTerminatorParams, opts ...ClientOption) (*UpdateTerminatorOK, error) { // TODO: Validate the params before sending diff --git a/rest_client/terminator/update_terminator_parameters.go b/rest_client/terminator/update_terminator_parameters.go index 2b537c9c9..e38762230 100644 --- a/rest_client/terminator/update_terminator_parameters.go +++ b/rest_client/terminator/update_terminator_parameters.go @@ -78,10 +78,12 @@ func NewUpdateTerminatorParamsWithHTTPClient(client *http.Client) *UpdateTermina } } -/* UpdateTerminatorParams contains all the parameters to send to the API endpoint - for the update terminator operation. +/* +UpdateTerminatorParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the update terminator operation. + + Typically these are written to a http.Request. */ type UpdateTerminatorParams struct { diff --git a/rest_client/terminator/update_terminator_responses.go b/rest_client/terminator/update_terminator_responses.go index 03880ce52..13f476367 100644 --- a/rest_client/terminator/update_terminator_responses.go +++ b/rest_client/terminator/update_terminator_responses.go @@ -81,7 +81,8 @@ func NewUpdateTerminatorOK() *UpdateTerminatorOK { return &UpdateTerminatorOK{} } -/* UpdateTerminatorOK describes a response with status code 200, with default header values. +/* +UpdateTerminatorOK describes a response with status code 200, with default header values. The update request was successful and the resource has been altered */ @@ -89,9 +90,39 @@ type UpdateTerminatorOK struct { Payload *rest_model.Empty } +// IsSuccess returns true when this update terminator o k response has a 2xx status code +func (o *UpdateTerminatorOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update terminator o k response has a 3xx status code +func (o *UpdateTerminatorOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update terminator o k response has a 4xx status code +func (o *UpdateTerminatorOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update terminator o k response has a 5xx status code +func (o *UpdateTerminatorOK) IsServerError() bool { + return false +} + +// IsCode returns true when this update terminator o k response a status code equal to that given +func (o *UpdateTerminatorOK) IsCode(code int) bool { + return code == 200 +} + func (o *UpdateTerminatorOK) Error() string { return fmt.Sprintf("[PUT /terminators/{id}][%d] updateTerminatorOK %+v", 200, o.Payload) } + +func (o *UpdateTerminatorOK) String() string { + return fmt.Sprintf("[PUT /terminators/{id}][%d] updateTerminatorOK %+v", 200, o.Payload) +} + func (o *UpdateTerminatorOK) GetPayload() *rest_model.Empty { return o.Payload } @@ -113,7 +144,8 @@ func NewUpdateTerminatorBadRequest() *UpdateTerminatorBadRequest { return &UpdateTerminatorBadRequest{} } -/* UpdateTerminatorBadRequest describes a response with status code 400, with default header values. +/* +UpdateTerminatorBadRequest describes a response with status code 400, with default header values. The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information */ @@ -121,9 +153,39 @@ type UpdateTerminatorBadRequest struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this update terminator bad request response has a 2xx status code +func (o *UpdateTerminatorBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update terminator bad request response has a 3xx status code +func (o *UpdateTerminatorBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update terminator bad request response has a 4xx status code +func (o *UpdateTerminatorBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this update terminator bad request response has a 5xx status code +func (o *UpdateTerminatorBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this update terminator bad request response a status code equal to that given +func (o *UpdateTerminatorBadRequest) IsCode(code int) bool { + return code == 400 +} + func (o *UpdateTerminatorBadRequest) Error() string { return fmt.Sprintf("[PUT /terminators/{id}][%d] updateTerminatorBadRequest %+v", 400, o.Payload) } + +func (o *UpdateTerminatorBadRequest) String() string { + return fmt.Sprintf("[PUT /terminators/{id}][%d] updateTerminatorBadRequest %+v", 400, o.Payload) +} + func (o *UpdateTerminatorBadRequest) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -145,7 +207,8 @@ func NewUpdateTerminatorUnauthorized() *UpdateTerminatorUnauthorized { return &UpdateTerminatorUnauthorized{} } -/* UpdateTerminatorUnauthorized describes a response with status code 401, with default header values. +/* +UpdateTerminatorUnauthorized describes a response with status code 401, with default header values. The currently supplied session does not have the correct access rights to request this resource */ @@ -153,9 +216,39 @@ type UpdateTerminatorUnauthorized struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this update terminator unauthorized response has a 2xx status code +func (o *UpdateTerminatorUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update terminator unauthorized response has a 3xx status code +func (o *UpdateTerminatorUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update terminator unauthorized response has a 4xx status code +func (o *UpdateTerminatorUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this update terminator unauthorized response has a 5xx status code +func (o *UpdateTerminatorUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this update terminator unauthorized response a status code equal to that given +func (o *UpdateTerminatorUnauthorized) IsCode(code int) bool { + return code == 401 +} + func (o *UpdateTerminatorUnauthorized) Error() string { return fmt.Sprintf("[PUT /terminators/{id}][%d] updateTerminatorUnauthorized %+v", 401, o.Payload) } + +func (o *UpdateTerminatorUnauthorized) String() string { + return fmt.Sprintf("[PUT /terminators/{id}][%d] updateTerminatorUnauthorized %+v", 401, o.Payload) +} + func (o *UpdateTerminatorUnauthorized) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } @@ -177,7 +270,8 @@ func NewUpdateTerminatorNotFound() *UpdateTerminatorNotFound { return &UpdateTerminatorNotFound{} } -/* UpdateTerminatorNotFound describes a response with status code 404, with default header values. +/* +UpdateTerminatorNotFound describes a response with status code 404, with default header values. The requested resource does not exist */ @@ -185,9 +279,39 @@ type UpdateTerminatorNotFound struct { Payload *rest_model.APIErrorEnvelope } +// IsSuccess returns true when this update terminator not found response has a 2xx status code +func (o *UpdateTerminatorNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update terminator not found response has a 3xx status code +func (o *UpdateTerminatorNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update terminator not found response has a 4xx status code +func (o *UpdateTerminatorNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this update terminator not found response has a 5xx status code +func (o *UpdateTerminatorNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this update terminator not found response a status code equal to that given +func (o *UpdateTerminatorNotFound) IsCode(code int) bool { + return code == 404 +} + func (o *UpdateTerminatorNotFound) Error() string { return fmt.Sprintf("[PUT /terminators/{id}][%d] updateTerminatorNotFound %+v", 404, o.Payload) } + +func (o *UpdateTerminatorNotFound) String() string { + return fmt.Sprintf("[PUT /terminators/{id}][%d] updateTerminatorNotFound %+v", 404, o.Payload) +} + func (o *UpdateTerminatorNotFound) GetPayload() *rest_model.APIErrorEnvelope { return o.Payload } diff --git a/rest_server/doc.go b/rest_server/doc.go index d50dba9fd..a31a57d34 100644 --- a/rest_server/doc.go +++ b/rest_server/doc.go @@ -25,18 +25,18 @@ // Package rest_server Ziti Fabric // -// Schemes: -// https -// Host: demo.ziti.dev -// BasePath: /fabric/v1 -// Version: 0.16.54 -// Contact: +// Schemes: +// https +// Host: demo.ziti.dev +// BasePath: /fabric/v1 +// Version: 0.16.54 +// Contact: // -// Consumes: -// - application/json +// Consumes: +// - application/json // -// Produces: -// - application/json +// Produces: +// - application/json // // swagger:meta package rest_server diff --git a/rest_server/operations/circuit/delete_circuit.go b/rest_server/operations/circuit/delete_circuit.go index abdde6ed6..0493f2c4a 100644 --- a/rest_server/operations/circuit/delete_circuit.go +++ b/rest_server/operations/circuit/delete_circuit.go @@ -53,12 +53,12 @@ func NewDeleteCircuit(ctx *middleware.Context, handler DeleteCircuitHandler) *De return &DeleteCircuit{Context: ctx, Handler: handler} } -/* DeleteCircuit swagger:route DELETE /circuits/{id} Circuit deleteCircuit +/* + DeleteCircuit swagger:route DELETE /circuits/{id} Circuit deleteCircuit -Delete a circuit +# Delete a circuit Delete a circuit by id. Requires admin access. - */ type DeleteCircuit struct { Context *middleware.Context diff --git a/rest_server/operations/circuit/delete_circuit_parameters.go b/rest_server/operations/circuit/delete_circuit_parameters.go index b1f68906e..5b4a4337a 100644 --- a/rest_server/operations/circuit/delete_circuit_parameters.go +++ b/rest_server/operations/circuit/delete_circuit_parameters.go @@ -30,7 +30,6 @@ package circuit // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "net/http" "github.com/go-openapi/errors" @@ -95,7 +94,7 @@ func (o *DeleteCircuitParams) BindRequest(r *http.Request, route *middleware.Mat res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/rest_server/operations/circuit/delete_circuit_responses.go b/rest_server/operations/circuit/delete_circuit_responses.go index a6591e155..2cd39a2df 100644 --- a/rest_server/operations/circuit/delete_circuit_responses.go +++ b/rest_server/operations/circuit/delete_circuit_responses.go @@ -40,7 +40,8 @@ import ( // DeleteCircuitOKCode is the HTTP code returned for type DeleteCircuitOK const DeleteCircuitOKCode int = 200 -/*DeleteCircuitOK The delete request was successful and the resource has been removed +/* +DeleteCircuitOK The delete request was successful and the resource has been removed swagger:response deleteCircuitOK */ @@ -84,7 +85,8 @@ func (o *DeleteCircuitOK) WriteResponse(rw http.ResponseWriter, producer runtime // DeleteCircuitBadRequestCode is the HTTP code returned for type DeleteCircuitBadRequest const DeleteCircuitBadRequestCode int = 400 -/*DeleteCircuitBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +DeleteCircuitBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response deleteCircuitBadRequest */ @@ -128,7 +130,8 @@ func (o *DeleteCircuitBadRequest) WriteResponse(rw http.ResponseWriter, producer // DeleteCircuitUnauthorizedCode is the HTTP code returned for type DeleteCircuitUnauthorized const DeleteCircuitUnauthorizedCode int = 401 -/*DeleteCircuitUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +DeleteCircuitUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response deleteCircuitUnauthorized */ @@ -172,7 +175,8 @@ func (o *DeleteCircuitUnauthorized) WriteResponse(rw http.ResponseWriter, produc // DeleteCircuitConflictCode is the HTTP code returned for type DeleteCircuitConflict const DeleteCircuitConflictCode int = 409 -/*DeleteCircuitConflict The resource requested to be removed/altered cannot be as it is referenced by another object. +/* +DeleteCircuitConflict The resource requested to be removed/altered cannot be as it is referenced by another object. swagger:response deleteCircuitConflict */ diff --git a/rest_server/operations/circuit/detail_circuit.go b/rest_server/operations/circuit/detail_circuit.go index 12cf786e5..c5a2423e7 100644 --- a/rest_server/operations/circuit/detail_circuit.go +++ b/rest_server/operations/circuit/detail_circuit.go @@ -53,12 +53,12 @@ func NewDetailCircuit(ctx *middleware.Context, handler DetailCircuitHandler) *De return &DetailCircuit{Context: ctx, Handler: handler} } -/* DetailCircuit swagger:route GET /circuits/{id} Circuit detailCircuit +/* + DetailCircuit swagger:route GET /circuits/{id} Circuit detailCircuit -Retrieves a single circuit +# Retrieves a single circuit Retrieves a single circuit by id. Requires admin access. - */ type DetailCircuit struct { Context *middleware.Context diff --git a/rest_server/operations/circuit/detail_circuit_responses.go b/rest_server/operations/circuit/detail_circuit_responses.go index c0bc95fa1..76617acae 100644 --- a/rest_server/operations/circuit/detail_circuit_responses.go +++ b/rest_server/operations/circuit/detail_circuit_responses.go @@ -40,7 +40,8 @@ import ( // DetailCircuitOKCode is the HTTP code returned for type DetailCircuitOK const DetailCircuitOKCode int = 200 -/*DetailCircuitOK A single circuit +/* +DetailCircuitOK A single circuit swagger:response detailCircuitOK */ @@ -84,7 +85,8 @@ func (o *DetailCircuitOK) WriteResponse(rw http.ResponseWriter, producer runtime // DetailCircuitUnauthorizedCode is the HTTP code returned for type DetailCircuitUnauthorized const DetailCircuitUnauthorizedCode int = 401 -/*DetailCircuitUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +DetailCircuitUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response detailCircuitUnauthorized */ @@ -128,7 +130,8 @@ func (o *DetailCircuitUnauthorized) WriteResponse(rw http.ResponseWriter, produc // DetailCircuitNotFoundCode is the HTTP code returned for type DetailCircuitNotFound const DetailCircuitNotFoundCode int = 404 -/*DetailCircuitNotFound The requested resource does not exist +/* +DetailCircuitNotFound The requested resource does not exist swagger:response detailCircuitNotFound */ diff --git a/rest_server/operations/circuit/list_circuits.go b/rest_server/operations/circuit/list_circuits.go index 782e26194..199dcce4e 100644 --- a/rest_server/operations/circuit/list_circuits.go +++ b/rest_server/operations/circuit/list_circuits.go @@ -53,13 +53,12 @@ func NewListCircuits(ctx *middleware.Context, handler ListCircuitsHandler) *List return &ListCircuits{Context: ctx, Handler: handler} } -/* ListCircuits swagger:route GET /circuits Circuit listCircuits +/* + ListCircuits swagger:route GET /circuits Circuit listCircuits -List circuits +# List circuits Retrieves a list of circuit resources; does not supports filtering, sorting, or pagination. Requires admin access. - - */ type ListCircuits struct { Context *middleware.Context diff --git a/rest_server/operations/circuit/list_circuits_responses.go b/rest_server/operations/circuit/list_circuits_responses.go index bd6c25f7d..ecab647d8 100644 --- a/rest_server/operations/circuit/list_circuits_responses.go +++ b/rest_server/operations/circuit/list_circuits_responses.go @@ -40,7 +40,8 @@ import ( // ListCircuitsOKCode is the HTTP code returned for type ListCircuitsOK const ListCircuitsOKCode int = 200 -/*ListCircuitsOK A list of circuits +/* +ListCircuitsOK A list of circuits swagger:response listCircuitsOK */ @@ -84,7 +85,8 @@ func (o *ListCircuitsOK) WriteResponse(rw http.ResponseWriter, producer runtime. // ListCircuitsUnauthorizedCode is the HTTP code returned for type ListCircuitsUnauthorized const ListCircuitsUnauthorizedCode int = 401 -/*ListCircuitsUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +ListCircuitsUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response listCircuitsUnauthorized */ diff --git a/rest_server/operations/database/check_data_integrity.go b/rest_server/operations/database/check_data_integrity.go index b9adacad6..80195ef26 100644 --- a/rest_server/operations/database/check_data_integrity.go +++ b/rest_server/operations/database/check_data_integrity.go @@ -53,12 +53,12 @@ func NewCheckDataIntegrity(ctx *middleware.Context, handler CheckDataIntegrityHa return &CheckDataIntegrity{Context: ctx, Handler: handler} } -/* CheckDataIntegrity swagger:route POST /database/check-data-integrity Database checkDataIntegrity +/* + CheckDataIntegrity swagger:route POST /database/check-data-integrity Database checkDataIntegrity -Starts a data integrity scan on the datastore +# Starts a data integrity scan on the datastore Starts a data integrity scan on the datastore. Requires admin access. Only once instance may run at a time, including runs of fixDataIntegrity. - */ type CheckDataIntegrity struct { Context *middleware.Context diff --git a/rest_server/operations/database/check_data_integrity_responses.go b/rest_server/operations/database/check_data_integrity_responses.go index 60c31a1ab..1318e41e0 100644 --- a/rest_server/operations/database/check_data_integrity_responses.go +++ b/rest_server/operations/database/check_data_integrity_responses.go @@ -40,7 +40,8 @@ import ( // CheckDataIntegrityAcceptedCode is the HTTP code returned for type CheckDataIntegrityAccepted const CheckDataIntegrityAcceptedCode int = 202 -/*CheckDataIntegrityAccepted Base empty response +/* +CheckDataIntegrityAccepted Base empty response swagger:response checkDataIntegrityAccepted */ @@ -84,7 +85,8 @@ func (o *CheckDataIntegrityAccepted) WriteResponse(rw http.ResponseWriter, produ // CheckDataIntegrityUnauthorizedCode is the HTTP code returned for type CheckDataIntegrityUnauthorized const CheckDataIntegrityUnauthorizedCode int = 401 -/*CheckDataIntegrityUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +CheckDataIntegrityUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response checkDataIntegrityUnauthorized */ @@ -128,7 +130,8 @@ func (o *CheckDataIntegrityUnauthorized) WriteResponse(rw http.ResponseWriter, p // CheckDataIntegrityTooManyRequestsCode is the HTTP code returned for type CheckDataIntegrityTooManyRequests const CheckDataIntegrityTooManyRequestsCode int = 429 -/*CheckDataIntegrityTooManyRequests The resource requested is rate limited and the rate limit has been exceeded +/* +CheckDataIntegrityTooManyRequests The resource requested is rate limited and the rate limit has been exceeded swagger:response checkDataIntegrityTooManyRequests */ diff --git a/rest_server/operations/database/create_database_snapshot.go b/rest_server/operations/database/create_database_snapshot.go index 8e03b399f..aa504abe0 100644 --- a/rest_server/operations/database/create_database_snapshot.go +++ b/rest_server/operations/database/create_database_snapshot.go @@ -53,12 +53,12 @@ func NewCreateDatabaseSnapshot(ctx *middleware.Context, handler CreateDatabaseSn return &CreateDatabaseSnapshot{Context: ctx, Handler: handler} } -/* CreateDatabaseSnapshot swagger:route POST /database Database createDatabaseSnapshot +/* + CreateDatabaseSnapshot swagger:route POST /database Database createDatabaseSnapshot -Create a new database snapshot +# Create a new database snapshot Create a new database snapshot. Requires admin access. - */ type CreateDatabaseSnapshot struct { Context *middleware.Context diff --git a/rest_server/operations/database/create_database_snapshot_responses.go b/rest_server/operations/database/create_database_snapshot_responses.go index f3b19caf8..3591a13fa 100644 --- a/rest_server/operations/database/create_database_snapshot_responses.go +++ b/rest_server/operations/database/create_database_snapshot_responses.go @@ -40,7 +40,8 @@ import ( // CreateDatabaseSnapshotOKCode is the HTTP code returned for type CreateDatabaseSnapshotOK const CreateDatabaseSnapshotOKCode int = 200 -/*CreateDatabaseSnapshotOK Base empty response +/* +CreateDatabaseSnapshotOK Base empty response swagger:response createDatabaseSnapshotOK */ @@ -84,7 +85,8 @@ func (o *CreateDatabaseSnapshotOK) WriteResponse(rw http.ResponseWriter, produce // CreateDatabaseSnapshotUnauthorizedCode is the HTTP code returned for type CreateDatabaseSnapshotUnauthorized const CreateDatabaseSnapshotUnauthorizedCode int = 401 -/*CreateDatabaseSnapshotUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +CreateDatabaseSnapshotUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response createDatabaseSnapshotUnauthorized */ @@ -128,7 +130,8 @@ func (o *CreateDatabaseSnapshotUnauthorized) WriteResponse(rw http.ResponseWrite // CreateDatabaseSnapshotTooManyRequestsCode is the HTTP code returned for type CreateDatabaseSnapshotTooManyRequests const CreateDatabaseSnapshotTooManyRequestsCode int = 429 -/*CreateDatabaseSnapshotTooManyRequests The resource requested is rate limited and the rate limit has been exceeded +/* +CreateDatabaseSnapshotTooManyRequests The resource requested is rate limited and the rate limit has been exceeded swagger:response createDatabaseSnapshotTooManyRequests */ diff --git a/rest_server/operations/database/data_integrity_results.go b/rest_server/operations/database/data_integrity_results.go index 648f178e8..a699acf22 100644 --- a/rest_server/operations/database/data_integrity_results.go +++ b/rest_server/operations/database/data_integrity_results.go @@ -53,12 +53,12 @@ func NewDataIntegrityResults(ctx *middleware.Context, handler DataIntegrityResul return &DataIntegrityResults{Context: ctx, Handler: handler} } -/* DataIntegrityResults swagger:route GET /database/data-integrity-results Database dataIntegrityResults +/* + DataIntegrityResults swagger:route GET /database/data-integrity-results Database dataIntegrityResults -Returns any results found from in-progress integrity checks +# Returns any results found from in-progress integrity checks Returns any results found from in-progress integrity checks. Requires admin access. - */ type DataIntegrityResults struct { Context *middleware.Context diff --git a/rest_server/operations/database/data_integrity_results_responses.go b/rest_server/operations/database/data_integrity_results_responses.go index e2b0c6b97..97e62c0f6 100644 --- a/rest_server/operations/database/data_integrity_results_responses.go +++ b/rest_server/operations/database/data_integrity_results_responses.go @@ -40,7 +40,8 @@ import ( // DataIntegrityResultsOKCode is the HTTP code returned for type DataIntegrityResultsOK const DataIntegrityResultsOKCode int = 200 -/*DataIntegrityResultsOK A list of data integrity issues found +/* +DataIntegrityResultsOK A list of data integrity issues found swagger:response dataIntegrityResultsOK */ @@ -84,7 +85,8 @@ func (o *DataIntegrityResultsOK) WriteResponse(rw http.ResponseWriter, producer // DataIntegrityResultsUnauthorizedCode is the HTTP code returned for type DataIntegrityResultsUnauthorized const DataIntegrityResultsUnauthorizedCode int = 401 -/*DataIntegrityResultsUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +DataIntegrityResultsUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response dataIntegrityResultsUnauthorized */ diff --git a/rest_server/operations/database/fix_data_integrity.go b/rest_server/operations/database/fix_data_integrity.go index 9a9d91127..b818961aa 100644 --- a/rest_server/operations/database/fix_data_integrity.go +++ b/rest_server/operations/database/fix_data_integrity.go @@ -53,12 +53,12 @@ func NewFixDataIntegrity(ctx *middleware.Context, handler FixDataIntegrityHandle return &FixDataIntegrity{Context: ctx, Handler: handler} } -/* FixDataIntegrity swagger:route POST /database/fix-data-integrity Database fixDataIntegrity +/* + FixDataIntegrity swagger:route POST /database/fix-data-integrity Database fixDataIntegrity -Runs a data integrity scan on the datastore, attempts to fix any issues it can and returns any found issues +# Runs a data integrity scan on the datastore, attempts to fix any issues it can and returns any found issues Runs a data integrity scan on the datastore, attempts to fix any issues it can, and returns any found issues. Requires admin access. Only once instance may run at a time, including runs of checkDataIntegrity. - */ type FixDataIntegrity struct { Context *middleware.Context diff --git a/rest_server/operations/database/fix_data_integrity_responses.go b/rest_server/operations/database/fix_data_integrity_responses.go index f91d209cf..02e3f4ad0 100644 --- a/rest_server/operations/database/fix_data_integrity_responses.go +++ b/rest_server/operations/database/fix_data_integrity_responses.go @@ -40,7 +40,8 @@ import ( // FixDataIntegrityAcceptedCode is the HTTP code returned for type FixDataIntegrityAccepted const FixDataIntegrityAcceptedCode int = 202 -/*FixDataIntegrityAccepted Base empty response +/* +FixDataIntegrityAccepted Base empty response swagger:response fixDataIntegrityAccepted */ @@ -84,7 +85,8 @@ func (o *FixDataIntegrityAccepted) WriteResponse(rw http.ResponseWriter, produce // FixDataIntegrityUnauthorizedCode is the HTTP code returned for type FixDataIntegrityUnauthorized const FixDataIntegrityUnauthorizedCode int = 401 -/*FixDataIntegrityUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +FixDataIntegrityUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response fixDataIntegrityUnauthorized */ @@ -128,7 +130,8 @@ func (o *FixDataIntegrityUnauthorized) WriteResponse(rw http.ResponseWriter, pro // FixDataIntegrityTooManyRequestsCode is the HTTP code returned for type FixDataIntegrityTooManyRequests const FixDataIntegrityTooManyRequestsCode int = 429 -/*FixDataIntegrityTooManyRequests The resource requested is rate limited and the rate limit has been exceeded +/* +FixDataIntegrityTooManyRequests The resource requested is rate limited and the rate limit has been exceeded swagger:response fixDataIntegrityTooManyRequests */ diff --git a/rest_server/operations/inspect/inspect.go b/rest_server/operations/inspect/inspect.go index 5217e3de8..54b294193 100644 --- a/rest_server/operations/inspect/inspect.go +++ b/rest_server/operations/inspect/inspect.go @@ -53,13 +53,12 @@ func NewInspect(ctx *middleware.Context, handler InspectHandler) *Inspect { return &Inspect{Context: ctx, Handler: handler} } -/* Inspect swagger:route POST /inspections Inspect inspect +/* + Inspect swagger:route POST /inspections Inspect inspect -Inspect system values +# Inspect system values Requests system information, such as stack dumps or information about capabilities. Requires admin access. - - */ type Inspect struct { Context *middleware.Context diff --git a/rest_server/operations/inspect/inspect_parameters.go b/rest_server/operations/inspect/inspect_parameters.go index 3206152cc..77d84fa7a 100644 --- a/rest_server/operations/inspect/inspect_parameters.go +++ b/rest_server/operations/inspect/inspect_parameters.go @@ -30,7 +30,6 @@ package inspect // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -90,7 +89,7 @@ func (o *InspectParams) BindRequest(r *http.Request, route *middleware.MatchedRo res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/rest_server/operations/inspect/inspect_responses.go b/rest_server/operations/inspect/inspect_responses.go index c9e0f774c..1d19dc570 100644 --- a/rest_server/operations/inspect/inspect_responses.go +++ b/rest_server/operations/inspect/inspect_responses.go @@ -40,7 +40,8 @@ import ( // InspectOKCode is the HTTP code returned for type InspectOK const InspectOKCode int = 200 -/*InspectOK A response to an inspect request +/* +InspectOK A response to an inspect request swagger:response inspectOK */ @@ -84,7 +85,8 @@ func (o *InspectOK) WriteResponse(rw http.ResponseWriter, producer runtime.Produ // InspectUnauthorizedCode is the HTTP code returned for type InspectUnauthorized const InspectUnauthorizedCode int = 401 -/*InspectUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +InspectUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response inspectUnauthorized */ diff --git a/rest_server/operations/link/delete_link.go b/rest_server/operations/link/delete_link.go index cbf14889d..d794aaf37 100644 --- a/rest_server/operations/link/delete_link.go +++ b/rest_server/operations/link/delete_link.go @@ -53,12 +53,12 @@ func NewDeleteLink(ctx *middleware.Context, handler DeleteLinkHandler) *DeleteLi return &DeleteLink{Context: ctx, Handler: handler} } -/* DeleteLink swagger:route DELETE /links/{id} Link deleteLink +/* + DeleteLink swagger:route DELETE /links/{id} Link deleteLink -Delete a link +# Delete a link Delete a link by id. Requires admin access. - */ type DeleteLink struct { Context *middleware.Context diff --git a/rest_server/operations/link/delete_link_responses.go b/rest_server/operations/link/delete_link_responses.go index 47496650c..baace8f38 100644 --- a/rest_server/operations/link/delete_link_responses.go +++ b/rest_server/operations/link/delete_link_responses.go @@ -40,7 +40,8 @@ import ( // DeleteLinkOKCode is the HTTP code returned for type DeleteLinkOK const DeleteLinkOKCode int = 200 -/*DeleteLinkOK The delete request was successful and the resource has been removed +/* +DeleteLinkOK The delete request was successful and the resource has been removed swagger:response deleteLinkOK */ @@ -84,7 +85,8 @@ func (o *DeleteLinkOK) WriteResponse(rw http.ResponseWriter, producer runtime.Pr // DeleteLinkBadRequestCode is the HTTP code returned for type DeleteLinkBadRequest const DeleteLinkBadRequestCode int = 400 -/*DeleteLinkBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +DeleteLinkBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response deleteLinkBadRequest */ @@ -128,7 +130,8 @@ func (o *DeleteLinkBadRequest) WriteResponse(rw http.ResponseWriter, producer ru // DeleteLinkUnauthorizedCode is the HTTP code returned for type DeleteLinkUnauthorized const DeleteLinkUnauthorizedCode int = 401 -/*DeleteLinkUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +DeleteLinkUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response deleteLinkUnauthorized */ diff --git a/rest_server/operations/link/detail_link.go b/rest_server/operations/link/detail_link.go index ce24ff6f9..2866ad7d8 100644 --- a/rest_server/operations/link/detail_link.go +++ b/rest_server/operations/link/detail_link.go @@ -53,12 +53,12 @@ func NewDetailLink(ctx *middleware.Context, handler DetailLinkHandler) *DetailLi return &DetailLink{Context: ctx, Handler: handler} } -/* DetailLink swagger:route GET /links/{id} Link detailLink +/* + DetailLink swagger:route GET /links/{id} Link detailLink -Retrieves a single link +# Retrieves a single link Retrieves a single link by id. Requires admin access. - */ type DetailLink struct { Context *middleware.Context diff --git a/rest_server/operations/link/detail_link_responses.go b/rest_server/operations/link/detail_link_responses.go index 3f908db27..4e0240a73 100644 --- a/rest_server/operations/link/detail_link_responses.go +++ b/rest_server/operations/link/detail_link_responses.go @@ -40,7 +40,8 @@ import ( // DetailLinkOKCode is the HTTP code returned for type DetailLinkOK const DetailLinkOKCode int = 200 -/*DetailLinkOK A single link +/* +DetailLinkOK A single link swagger:response detailLinkOK */ @@ -84,7 +85,8 @@ func (o *DetailLinkOK) WriteResponse(rw http.ResponseWriter, producer runtime.Pr // DetailLinkUnauthorizedCode is the HTTP code returned for type DetailLinkUnauthorized const DetailLinkUnauthorizedCode int = 401 -/*DetailLinkUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +DetailLinkUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response detailLinkUnauthorized */ @@ -128,7 +130,8 @@ func (o *DetailLinkUnauthorized) WriteResponse(rw http.ResponseWriter, producer // DetailLinkNotFoundCode is the HTTP code returned for type DetailLinkNotFound const DetailLinkNotFoundCode int = 404 -/*DetailLinkNotFound The requested resource does not exist +/* +DetailLinkNotFound The requested resource does not exist swagger:response detailLinkNotFound */ diff --git a/rest_server/operations/link/list_links.go b/rest_server/operations/link/list_links.go index 489a5d3a3..79502a10a 100644 --- a/rest_server/operations/link/list_links.go +++ b/rest_server/operations/link/list_links.go @@ -53,13 +53,12 @@ func NewListLinks(ctx *middleware.Context, handler ListLinksHandler) *ListLinks return &ListLinks{Context: ctx, Handler: handler} } -/* ListLinks swagger:route GET /links Link listLinks +/* + ListLinks swagger:route GET /links Link listLinks -List links +# List links Retrieves a list of link resources; does not supports filtering, sorting, or pagination. Requires admin access. - - */ type ListLinks struct { Context *middleware.Context diff --git a/rest_server/operations/link/list_links_responses.go b/rest_server/operations/link/list_links_responses.go index ce806d5c2..cb836e703 100644 --- a/rest_server/operations/link/list_links_responses.go +++ b/rest_server/operations/link/list_links_responses.go @@ -40,7 +40,8 @@ import ( // ListLinksOKCode is the HTTP code returned for type ListLinksOK const ListLinksOKCode int = 200 -/*ListLinksOK A list of links +/* +ListLinksOK A list of links swagger:response listLinksOK */ @@ -84,7 +85,8 @@ func (o *ListLinksOK) WriteResponse(rw http.ResponseWriter, producer runtime.Pro // ListLinksUnauthorizedCode is the HTTP code returned for type ListLinksUnauthorized const ListLinksUnauthorizedCode int = 401 -/*ListLinksUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +ListLinksUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response listLinksUnauthorized */ diff --git a/rest_server/operations/link/patch_link.go b/rest_server/operations/link/patch_link.go index 7765725b1..2087c74c5 100644 --- a/rest_server/operations/link/patch_link.go +++ b/rest_server/operations/link/patch_link.go @@ -53,12 +53,12 @@ func NewPatchLink(ctx *middleware.Context, handler PatchLinkHandler) *PatchLink return &PatchLink{Context: ctx, Handler: handler} } -/* PatchLink swagger:route PATCH /links/{id} Link patchLink +/* + PatchLink swagger:route PATCH /links/{id} Link patchLink -Update the supplied fields on a link +# Update the supplied fields on a link Update the supplied fields on a link. Requires admin access. - */ type PatchLink struct { Context *middleware.Context diff --git a/rest_server/operations/link/patch_link_parameters.go b/rest_server/operations/link/patch_link_parameters.go index ca9a812dc..171976216 100644 --- a/rest_server/operations/link/patch_link_parameters.go +++ b/rest_server/operations/link/patch_link_parameters.go @@ -30,7 +30,6 @@ package link // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -101,7 +100,7 @@ func (o *PatchLinkParams) BindRequest(r *http.Request, route *middleware.Matched res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/rest_server/operations/link/patch_link_responses.go b/rest_server/operations/link/patch_link_responses.go index 688fa961d..916693b4c 100644 --- a/rest_server/operations/link/patch_link_responses.go +++ b/rest_server/operations/link/patch_link_responses.go @@ -40,7 +40,8 @@ import ( // PatchLinkOKCode is the HTTP code returned for type PatchLinkOK const PatchLinkOKCode int = 200 -/*PatchLinkOK The patch request was successful and the resource has been altered +/* +PatchLinkOK The patch request was successful and the resource has been altered swagger:response patchLinkOK */ @@ -84,7 +85,8 @@ func (o *PatchLinkOK) WriteResponse(rw http.ResponseWriter, producer runtime.Pro // PatchLinkBadRequestCode is the HTTP code returned for type PatchLinkBadRequest const PatchLinkBadRequestCode int = 400 -/*PatchLinkBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +PatchLinkBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response patchLinkBadRequest */ @@ -128,7 +130,8 @@ func (o *PatchLinkBadRequest) WriteResponse(rw http.ResponseWriter, producer run // PatchLinkUnauthorizedCode is the HTTP code returned for type PatchLinkUnauthorized const PatchLinkUnauthorizedCode int = 401 -/*PatchLinkUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +PatchLinkUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response patchLinkUnauthorized */ @@ -172,7 +175,8 @@ func (o *PatchLinkUnauthorized) WriteResponse(rw http.ResponseWriter, producer r // PatchLinkNotFoundCode is the HTTP code returned for type PatchLinkNotFound const PatchLinkNotFoundCode int = 404 -/*PatchLinkNotFound The requested resource does not exist +/* +PatchLinkNotFound The requested resource does not exist swagger:response patchLinkNotFound */ diff --git a/rest_server/operations/router/create_router.go b/rest_server/operations/router/create_router.go index b781aa7e1..723f47ca7 100644 --- a/rest_server/operations/router/create_router.go +++ b/rest_server/operations/router/create_router.go @@ -53,12 +53,12 @@ func NewCreateRouter(ctx *middleware.Context, handler CreateRouterHandler) *Crea return &CreateRouter{Context: ctx, Handler: handler} } -/* CreateRouter swagger:route POST /routers Router createRouter +/* + CreateRouter swagger:route POST /routers Router createRouter -Create a router resource +# Create a router resource Create a router resource. Requires admin access. - */ type CreateRouter struct { Context *middleware.Context diff --git a/rest_server/operations/router/create_router_parameters.go b/rest_server/operations/router/create_router_parameters.go index 671ea8353..b58bbbaa6 100644 --- a/rest_server/operations/router/create_router_parameters.go +++ b/rest_server/operations/router/create_router_parameters.go @@ -30,7 +30,6 @@ package router // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -90,7 +89,7 @@ func (o *CreateRouterParams) BindRequest(r *http.Request, route *middleware.Matc res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/rest_server/operations/router/create_router_responses.go b/rest_server/operations/router/create_router_responses.go index 420485fd5..a272fd96d 100644 --- a/rest_server/operations/router/create_router_responses.go +++ b/rest_server/operations/router/create_router_responses.go @@ -40,7 +40,8 @@ import ( // CreateRouterCreatedCode is the HTTP code returned for type CreateRouterCreated const CreateRouterCreatedCode int = 201 -/*CreateRouterCreated The create request was successful and the resource has been added at the following location +/* +CreateRouterCreated The create request was successful and the resource has been added at the following location swagger:response createRouterCreated */ @@ -84,7 +85,8 @@ func (o *CreateRouterCreated) WriteResponse(rw http.ResponseWriter, producer run // CreateRouterBadRequestCode is the HTTP code returned for type CreateRouterBadRequest const CreateRouterBadRequestCode int = 400 -/*CreateRouterBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +CreateRouterBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response createRouterBadRequest */ @@ -128,7 +130,8 @@ func (o *CreateRouterBadRequest) WriteResponse(rw http.ResponseWriter, producer // CreateRouterUnauthorizedCode is the HTTP code returned for type CreateRouterUnauthorized const CreateRouterUnauthorizedCode int = 401 -/*CreateRouterUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +CreateRouterUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response createRouterUnauthorized */ diff --git a/rest_server/operations/router/delete_router.go b/rest_server/operations/router/delete_router.go index 6fbbc04be..7295fae08 100644 --- a/rest_server/operations/router/delete_router.go +++ b/rest_server/operations/router/delete_router.go @@ -53,12 +53,12 @@ func NewDeleteRouter(ctx *middleware.Context, handler DeleteRouterHandler) *Dele return &DeleteRouter{Context: ctx, Handler: handler} } -/* DeleteRouter swagger:route DELETE /routers/{id} Router deleteRouter +/* + DeleteRouter swagger:route DELETE /routers/{id} Router deleteRouter -Delete a router +# Delete a router Delete a router by id. Requires admin access. - */ type DeleteRouter struct { Context *middleware.Context diff --git a/rest_server/operations/router/delete_router_responses.go b/rest_server/operations/router/delete_router_responses.go index 1285e3e51..090c0dc7f 100644 --- a/rest_server/operations/router/delete_router_responses.go +++ b/rest_server/operations/router/delete_router_responses.go @@ -40,7 +40,8 @@ import ( // DeleteRouterOKCode is the HTTP code returned for type DeleteRouterOK const DeleteRouterOKCode int = 200 -/*DeleteRouterOK The delete request was successful and the resource has been removed +/* +DeleteRouterOK The delete request was successful and the resource has been removed swagger:response deleteRouterOK */ @@ -84,7 +85,8 @@ func (o *DeleteRouterOK) WriteResponse(rw http.ResponseWriter, producer runtime. // DeleteRouterBadRequestCode is the HTTP code returned for type DeleteRouterBadRequest const DeleteRouterBadRequestCode int = 400 -/*DeleteRouterBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +DeleteRouterBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response deleteRouterBadRequest */ @@ -128,7 +130,8 @@ func (o *DeleteRouterBadRequest) WriteResponse(rw http.ResponseWriter, producer // DeleteRouterUnauthorizedCode is the HTTP code returned for type DeleteRouterUnauthorized const DeleteRouterUnauthorizedCode int = 401 -/*DeleteRouterUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +DeleteRouterUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response deleteRouterUnauthorized */ @@ -172,7 +175,8 @@ func (o *DeleteRouterUnauthorized) WriteResponse(rw http.ResponseWriter, produce // DeleteRouterConflictCode is the HTTP code returned for type DeleteRouterConflict const DeleteRouterConflictCode int = 409 -/*DeleteRouterConflict The resource requested to be removed/altered cannot be as it is referenced by another object. +/* +DeleteRouterConflict The resource requested to be removed/altered cannot be as it is referenced by another object. swagger:response deleteRouterConflict */ diff --git a/rest_server/operations/router/detail_router.go b/rest_server/operations/router/detail_router.go index 395338b98..a552cce6e 100644 --- a/rest_server/operations/router/detail_router.go +++ b/rest_server/operations/router/detail_router.go @@ -53,12 +53,12 @@ func NewDetailRouter(ctx *middleware.Context, handler DetailRouterHandler) *Deta return &DetailRouter{Context: ctx, Handler: handler} } -/* DetailRouter swagger:route GET /routers/{id} Router detailRouter +/* + DetailRouter swagger:route GET /routers/{id} Router detailRouter -Retrieves a single router +# Retrieves a single router Retrieves a single router by id. Requires admin access. - */ type DetailRouter struct { Context *middleware.Context diff --git a/rest_server/operations/router/detail_router_responses.go b/rest_server/operations/router/detail_router_responses.go index 290c78741..2c3986d1e 100644 --- a/rest_server/operations/router/detail_router_responses.go +++ b/rest_server/operations/router/detail_router_responses.go @@ -40,7 +40,8 @@ import ( // DetailRouterOKCode is the HTTP code returned for type DetailRouterOK const DetailRouterOKCode int = 200 -/*DetailRouterOK A single router +/* +DetailRouterOK A single router swagger:response detailRouterOK */ @@ -84,7 +85,8 @@ func (o *DetailRouterOK) WriteResponse(rw http.ResponseWriter, producer runtime. // DetailRouterUnauthorizedCode is the HTTP code returned for type DetailRouterUnauthorized const DetailRouterUnauthorizedCode int = 401 -/*DetailRouterUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +DetailRouterUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response detailRouterUnauthorized */ @@ -128,7 +130,8 @@ func (o *DetailRouterUnauthorized) WriteResponse(rw http.ResponseWriter, produce // DetailRouterNotFoundCode is the HTTP code returned for type DetailRouterNotFound const DetailRouterNotFoundCode int = 404 -/*DetailRouterNotFound The requested resource does not exist +/* +DetailRouterNotFound The requested resource does not exist swagger:response detailRouterNotFound */ diff --git a/rest_server/operations/router/list_router_terminators.go b/rest_server/operations/router/list_router_terminators.go index 328e04929..cb85519c4 100644 --- a/rest_server/operations/router/list_router_terminators.go +++ b/rest_server/operations/router/list_router_terminators.go @@ -53,13 +53,12 @@ func NewListRouterTerminators(ctx *middleware.Context, handler ListRouterTermina return &ListRouterTerminators{Context: ctx, Handler: handler} } -/* ListRouterTerminators swagger:route GET /routers/{id}/terminators Router listRouterTerminators +/* + ListRouterTerminators swagger:route GET /routers/{id}/terminators Router listRouterTerminators -List of terminators assigned to a router +# List of terminators assigned to a router Retrieves a list of terminator resources that are assigned specific router; supports filtering, sorting, and pagination. - - */ type ListRouterTerminators struct { Context *middleware.Context diff --git a/rest_server/operations/router/list_router_terminators_responses.go b/rest_server/operations/router/list_router_terminators_responses.go index 74034e063..064abc6db 100644 --- a/rest_server/operations/router/list_router_terminators_responses.go +++ b/rest_server/operations/router/list_router_terminators_responses.go @@ -40,7 +40,8 @@ import ( // ListRouterTerminatorsOKCode is the HTTP code returned for type ListRouterTerminatorsOK const ListRouterTerminatorsOKCode int = 200 -/*ListRouterTerminatorsOK A list of terminators +/* +ListRouterTerminatorsOK A list of terminators swagger:response listRouterTerminatorsOK */ @@ -84,7 +85,8 @@ func (o *ListRouterTerminatorsOK) WriteResponse(rw http.ResponseWriter, producer // ListRouterTerminatorsBadRequestCode is the HTTP code returned for type ListRouterTerminatorsBadRequest const ListRouterTerminatorsBadRequestCode int = 400 -/*ListRouterTerminatorsBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +ListRouterTerminatorsBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response listRouterTerminatorsBadRequest */ @@ -128,7 +130,8 @@ func (o *ListRouterTerminatorsBadRequest) WriteResponse(rw http.ResponseWriter, // ListRouterTerminatorsUnauthorizedCode is the HTTP code returned for type ListRouterTerminatorsUnauthorized const ListRouterTerminatorsUnauthorizedCode int = 401 -/*ListRouterTerminatorsUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +ListRouterTerminatorsUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response listRouterTerminatorsUnauthorized */ diff --git a/rest_server/operations/router/list_routers.go b/rest_server/operations/router/list_routers.go index 4481726c9..278552864 100644 --- a/rest_server/operations/router/list_routers.go +++ b/rest_server/operations/router/list_routers.go @@ -53,13 +53,12 @@ func NewListRouters(ctx *middleware.Context, handler ListRoutersHandler) *ListRo return &ListRouters{Context: ctx, Handler: handler} } -/* ListRouters swagger:route GET /routers Router listRouters +/* + ListRouters swagger:route GET /routers Router listRouters -List routers +# List routers Retrieves a list of router resources; supports filtering, sorting, and pagination. Requires admin access. - - */ type ListRouters struct { Context *middleware.Context diff --git a/rest_server/operations/router/list_routers_responses.go b/rest_server/operations/router/list_routers_responses.go index be26d3d63..f6a9cdc22 100644 --- a/rest_server/operations/router/list_routers_responses.go +++ b/rest_server/operations/router/list_routers_responses.go @@ -40,7 +40,8 @@ import ( // ListRoutersOKCode is the HTTP code returned for type ListRoutersOK const ListRoutersOKCode int = 200 -/*ListRoutersOK A list of routers +/* +ListRoutersOK A list of routers swagger:response listRoutersOK */ @@ -84,7 +85,8 @@ func (o *ListRoutersOK) WriteResponse(rw http.ResponseWriter, producer runtime.P // ListRoutersUnauthorizedCode is the HTTP code returned for type ListRoutersUnauthorized const ListRoutersUnauthorizedCode int = 401 -/*ListRoutersUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +ListRoutersUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response listRoutersUnauthorized */ diff --git a/rest_server/operations/router/patch_router.go b/rest_server/operations/router/patch_router.go index c4cf2a63f..3e0518d4b 100644 --- a/rest_server/operations/router/patch_router.go +++ b/rest_server/operations/router/patch_router.go @@ -53,12 +53,12 @@ func NewPatchRouter(ctx *middleware.Context, handler PatchRouterHandler) *PatchR return &PatchRouter{Context: ctx, Handler: handler} } -/* PatchRouter swagger:route PATCH /routers/{id} Router patchRouter +/* + PatchRouter swagger:route PATCH /routers/{id} Router patchRouter -Update the supplied fields on a router +# Update the supplied fields on a router Update the supplied fields on a router. Requires admin access. - */ type PatchRouter struct { Context *middleware.Context diff --git a/rest_server/operations/router/patch_router_parameters.go b/rest_server/operations/router/patch_router_parameters.go index 8e63cd88a..0d7f365b0 100644 --- a/rest_server/operations/router/patch_router_parameters.go +++ b/rest_server/operations/router/patch_router_parameters.go @@ -30,7 +30,6 @@ package router // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -101,7 +100,7 @@ func (o *PatchRouterParams) BindRequest(r *http.Request, route *middleware.Match res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/rest_server/operations/router/patch_router_responses.go b/rest_server/operations/router/patch_router_responses.go index 06cd5b014..657519b4b 100644 --- a/rest_server/operations/router/patch_router_responses.go +++ b/rest_server/operations/router/patch_router_responses.go @@ -40,7 +40,8 @@ import ( // PatchRouterOKCode is the HTTP code returned for type PatchRouterOK const PatchRouterOKCode int = 200 -/*PatchRouterOK The patch request was successful and the resource has been altered +/* +PatchRouterOK The patch request was successful and the resource has been altered swagger:response patchRouterOK */ @@ -84,7 +85,8 @@ func (o *PatchRouterOK) WriteResponse(rw http.ResponseWriter, producer runtime.P // PatchRouterBadRequestCode is the HTTP code returned for type PatchRouterBadRequest const PatchRouterBadRequestCode int = 400 -/*PatchRouterBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +PatchRouterBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response patchRouterBadRequest */ @@ -128,7 +130,8 @@ func (o *PatchRouterBadRequest) WriteResponse(rw http.ResponseWriter, producer r // PatchRouterUnauthorizedCode is the HTTP code returned for type PatchRouterUnauthorized const PatchRouterUnauthorizedCode int = 401 -/*PatchRouterUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +PatchRouterUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response patchRouterUnauthorized */ @@ -172,7 +175,8 @@ func (o *PatchRouterUnauthorized) WriteResponse(rw http.ResponseWriter, producer // PatchRouterNotFoundCode is the HTTP code returned for type PatchRouterNotFound const PatchRouterNotFoundCode int = 404 -/*PatchRouterNotFound The requested resource does not exist +/* +PatchRouterNotFound The requested resource does not exist swagger:response patchRouterNotFound */ diff --git a/rest_server/operations/router/update_router.go b/rest_server/operations/router/update_router.go index 7af94c4c6..13356747d 100644 --- a/rest_server/operations/router/update_router.go +++ b/rest_server/operations/router/update_router.go @@ -53,12 +53,12 @@ func NewUpdateRouter(ctx *middleware.Context, handler UpdateRouterHandler) *Upda return &UpdateRouter{Context: ctx, Handler: handler} } -/* UpdateRouter swagger:route PUT /routers/{id} Router updateRouter +/* + UpdateRouter swagger:route PUT /routers/{id} Router updateRouter -Update all fields on a router +# Update all fields on a router Update all fields on a router by id. Requires admin access. - */ type UpdateRouter struct { Context *middleware.Context diff --git a/rest_server/operations/router/update_router_parameters.go b/rest_server/operations/router/update_router_parameters.go index 51fc04613..eb880e08c 100644 --- a/rest_server/operations/router/update_router_parameters.go +++ b/rest_server/operations/router/update_router_parameters.go @@ -30,7 +30,6 @@ package router // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -101,7 +100,7 @@ func (o *UpdateRouterParams) BindRequest(r *http.Request, route *middleware.Matc res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/rest_server/operations/router/update_router_responses.go b/rest_server/operations/router/update_router_responses.go index 4ca762e89..c8376ff1a 100644 --- a/rest_server/operations/router/update_router_responses.go +++ b/rest_server/operations/router/update_router_responses.go @@ -40,7 +40,8 @@ import ( // UpdateRouterOKCode is the HTTP code returned for type UpdateRouterOK const UpdateRouterOKCode int = 200 -/*UpdateRouterOK The update request was successful and the resource has been altered +/* +UpdateRouterOK The update request was successful and the resource has been altered swagger:response updateRouterOK */ @@ -84,7 +85,8 @@ func (o *UpdateRouterOK) WriteResponse(rw http.ResponseWriter, producer runtime. // UpdateRouterBadRequestCode is the HTTP code returned for type UpdateRouterBadRequest const UpdateRouterBadRequestCode int = 400 -/*UpdateRouterBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +UpdateRouterBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response updateRouterBadRequest */ @@ -128,7 +130,8 @@ func (o *UpdateRouterBadRequest) WriteResponse(rw http.ResponseWriter, producer // UpdateRouterUnauthorizedCode is the HTTP code returned for type UpdateRouterUnauthorized const UpdateRouterUnauthorizedCode int = 401 -/*UpdateRouterUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +UpdateRouterUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response updateRouterUnauthorized */ @@ -172,7 +175,8 @@ func (o *UpdateRouterUnauthorized) WriteResponse(rw http.ResponseWriter, produce // UpdateRouterNotFoundCode is the HTTP code returned for type UpdateRouterNotFound const UpdateRouterNotFoundCode int = 404 -/*UpdateRouterNotFound The requested resource does not exist +/* +UpdateRouterNotFound The requested resource does not exist swagger:response updateRouterNotFound */ diff --git a/rest_server/operations/service/create_service.go b/rest_server/operations/service/create_service.go index 8e976e7bb..85fb857d0 100644 --- a/rest_server/operations/service/create_service.go +++ b/rest_server/operations/service/create_service.go @@ -53,12 +53,12 @@ func NewCreateService(ctx *middleware.Context, handler CreateServiceHandler) *Cr return &CreateService{Context: ctx, Handler: handler} } -/* CreateService swagger:route POST /services Service createService +/* + CreateService swagger:route POST /services Service createService -Create a service resource +# Create a service resource Create a service resource. Requires admin access. - */ type CreateService struct { Context *middleware.Context diff --git a/rest_server/operations/service/create_service_parameters.go b/rest_server/operations/service/create_service_parameters.go index 93cc8fa94..5d8f767b9 100644 --- a/rest_server/operations/service/create_service_parameters.go +++ b/rest_server/operations/service/create_service_parameters.go @@ -30,7 +30,6 @@ package service // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -90,7 +89,7 @@ func (o *CreateServiceParams) BindRequest(r *http.Request, route *middleware.Mat res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/rest_server/operations/service/create_service_responses.go b/rest_server/operations/service/create_service_responses.go index 7ba6bf6d9..a1a7059a7 100644 --- a/rest_server/operations/service/create_service_responses.go +++ b/rest_server/operations/service/create_service_responses.go @@ -40,7 +40,8 @@ import ( // CreateServiceCreatedCode is the HTTP code returned for type CreateServiceCreated const CreateServiceCreatedCode int = 201 -/*CreateServiceCreated The create request was successful and the resource has been added at the following location +/* +CreateServiceCreated The create request was successful and the resource has been added at the following location swagger:response createServiceCreated */ @@ -84,7 +85,8 @@ func (o *CreateServiceCreated) WriteResponse(rw http.ResponseWriter, producer ru // CreateServiceBadRequestCode is the HTTP code returned for type CreateServiceBadRequest const CreateServiceBadRequestCode int = 400 -/*CreateServiceBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +CreateServiceBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response createServiceBadRequest */ @@ -128,7 +130,8 @@ func (o *CreateServiceBadRequest) WriteResponse(rw http.ResponseWriter, producer // CreateServiceUnauthorizedCode is the HTTP code returned for type CreateServiceUnauthorized const CreateServiceUnauthorizedCode int = 401 -/*CreateServiceUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +CreateServiceUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response createServiceUnauthorized */ diff --git a/rest_server/operations/service/delete_service.go b/rest_server/operations/service/delete_service.go index 20c3e95a6..34d915164 100644 --- a/rest_server/operations/service/delete_service.go +++ b/rest_server/operations/service/delete_service.go @@ -53,12 +53,12 @@ func NewDeleteService(ctx *middleware.Context, handler DeleteServiceHandler) *De return &DeleteService{Context: ctx, Handler: handler} } -/* DeleteService swagger:route DELETE /services/{id} Service deleteService +/* + DeleteService swagger:route DELETE /services/{id} Service deleteService -Delete a service +# Delete a service Delete a service by id. Requires admin access. - */ type DeleteService struct { Context *middleware.Context diff --git a/rest_server/operations/service/delete_service_responses.go b/rest_server/operations/service/delete_service_responses.go index 62c8f81d1..050eb8485 100644 --- a/rest_server/operations/service/delete_service_responses.go +++ b/rest_server/operations/service/delete_service_responses.go @@ -40,7 +40,8 @@ import ( // DeleteServiceOKCode is the HTTP code returned for type DeleteServiceOK const DeleteServiceOKCode int = 200 -/*DeleteServiceOK The delete request was successful and the resource has been removed +/* +DeleteServiceOK The delete request was successful and the resource has been removed swagger:response deleteServiceOK */ @@ -84,7 +85,8 @@ func (o *DeleteServiceOK) WriteResponse(rw http.ResponseWriter, producer runtime // DeleteServiceBadRequestCode is the HTTP code returned for type DeleteServiceBadRequest const DeleteServiceBadRequestCode int = 400 -/*DeleteServiceBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +DeleteServiceBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response deleteServiceBadRequest */ @@ -128,7 +130,8 @@ func (o *DeleteServiceBadRequest) WriteResponse(rw http.ResponseWriter, producer // DeleteServiceUnauthorizedCode is the HTTP code returned for type DeleteServiceUnauthorized const DeleteServiceUnauthorizedCode int = 401 -/*DeleteServiceUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +DeleteServiceUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response deleteServiceUnauthorized */ @@ -172,7 +175,8 @@ func (o *DeleteServiceUnauthorized) WriteResponse(rw http.ResponseWriter, produc // DeleteServiceConflictCode is the HTTP code returned for type DeleteServiceConflict const DeleteServiceConflictCode int = 409 -/*DeleteServiceConflict The resource requested to be removed/altered cannot be as it is referenced by another object. +/* +DeleteServiceConflict The resource requested to be removed/altered cannot be as it is referenced by another object. swagger:response deleteServiceConflict */ diff --git a/rest_server/operations/service/detail_service.go b/rest_server/operations/service/detail_service.go index 047ea25c0..4d65817ea 100644 --- a/rest_server/operations/service/detail_service.go +++ b/rest_server/operations/service/detail_service.go @@ -53,12 +53,12 @@ func NewDetailService(ctx *middleware.Context, handler DetailServiceHandler) *De return &DetailService{Context: ctx, Handler: handler} } -/* DetailService swagger:route GET /services/{id} Service detailService +/* + DetailService swagger:route GET /services/{id} Service detailService -Retrieves a single service +# Retrieves a single service Retrieves a single service by id. Requires admin access. - */ type DetailService struct { Context *middleware.Context diff --git a/rest_server/operations/service/detail_service_responses.go b/rest_server/operations/service/detail_service_responses.go index fd574e6df..dcba6385c 100644 --- a/rest_server/operations/service/detail_service_responses.go +++ b/rest_server/operations/service/detail_service_responses.go @@ -40,7 +40,8 @@ import ( // DetailServiceOKCode is the HTTP code returned for type DetailServiceOK const DetailServiceOKCode int = 200 -/*DetailServiceOK A single service +/* +DetailServiceOK A single service swagger:response detailServiceOK */ @@ -84,7 +85,8 @@ func (o *DetailServiceOK) WriteResponse(rw http.ResponseWriter, producer runtime // DetailServiceUnauthorizedCode is the HTTP code returned for type DetailServiceUnauthorized const DetailServiceUnauthorizedCode int = 401 -/*DetailServiceUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +DetailServiceUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response detailServiceUnauthorized */ @@ -128,7 +130,8 @@ func (o *DetailServiceUnauthorized) WriteResponse(rw http.ResponseWriter, produc // DetailServiceNotFoundCode is the HTTP code returned for type DetailServiceNotFound const DetailServiceNotFoundCode int = 404 -/*DetailServiceNotFound The requested resource does not exist +/* +DetailServiceNotFound The requested resource does not exist swagger:response detailServiceNotFound */ diff --git a/rest_server/operations/service/list_service_terminators.go b/rest_server/operations/service/list_service_terminators.go index 9c8f8e491..64edf2253 100644 --- a/rest_server/operations/service/list_service_terminators.go +++ b/rest_server/operations/service/list_service_terminators.go @@ -53,13 +53,12 @@ func NewListServiceTerminators(ctx *middleware.Context, handler ListServiceTermi return &ListServiceTerminators{Context: ctx, Handler: handler} } -/* ListServiceTerminators swagger:route GET /services/{id}/terminators Service listServiceTerminators +/* + ListServiceTerminators swagger:route GET /services/{id}/terminators Service listServiceTerminators -List of terminators assigned to a service +# List of terminators assigned to a service Retrieves a list of terminator resources that are assigned specific service; supports filtering, sorting, and pagination. - - */ type ListServiceTerminators struct { Context *middleware.Context diff --git a/rest_server/operations/service/list_service_terminators_responses.go b/rest_server/operations/service/list_service_terminators_responses.go index 7cf0974bf..18832b5f4 100644 --- a/rest_server/operations/service/list_service_terminators_responses.go +++ b/rest_server/operations/service/list_service_terminators_responses.go @@ -40,7 +40,8 @@ import ( // ListServiceTerminatorsOKCode is the HTTP code returned for type ListServiceTerminatorsOK const ListServiceTerminatorsOKCode int = 200 -/*ListServiceTerminatorsOK A list of terminators +/* +ListServiceTerminatorsOK A list of terminators swagger:response listServiceTerminatorsOK */ @@ -84,7 +85,8 @@ func (o *ListServiceTerminatorsOK) WriteResponse(rw http.ResponseWriter, produce // ListServiceTerminatorsBadRequestCode is the HTTP code returned for type ListServiceTerminatorsBadRequest const ListServiceTerminatorsBadRequestCode int = 400 -/*ListServiceTerminatorsBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +ListServiceTerminatorsBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response listServiceTerminatorsBadRequest */ @@ -128,7 +130,8 @@ func (o *ListServiceTerminatorsBadRequest) WriteResponse(rw http.ResponseWriter, // ListServiceTerminatorsUnauthorizedCode is the HTTP code returned for type ListServiceTerminatorsUnauthorized const ListServiceTerminatorsUnauthorizedCode int = 401 -/*ListServiceTerminatorsUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +ListServiceTerminatorsUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response listServiceTerminatorsUnauthorized */ diff --git a/rest_server/operations/service/list_services.go b/rest_server/operations/service/list_services.go index 997229ad6..d2e30da3f 100644 --- a/rest_server/operations/service/list_services.go +++ b/rest_server/operations/service/list_services.go @@ -53,13 +53,12 @@ func NewListServices(ctx *middleware.Context, handler ListServicesHandler) *List return &ListServices{Context: ctx, Handler: handler} } -/* ListServices swagger:route GET /services Service listServices +/* + ListServices swagger:route GET /services Service listServices -List services +# List services Retrieves a list of service resources; supports filtering, sorting, and pagination. Requires admin access. - - */ type ListServices struct { Context *middleware.Context diff --git a/rest_server/operations/service/list_services_responses.go b/rest_server/operations/service/list_services_responses.go index 2a85d190f..27848b16b 100644 --- a/rest_server/operations/service/list_services_responses.go +++ b/rest_server/operations/service/list_services_responses.go @@ -40,7 +40,8 @@ import ( // ListServicesOKCode is the HTTP code returned for type ListServicesOK const ListServicesOKCode int = 200 -/*ListServicesOK A list of services +/* +ListServicesOK A list of services swagger:response listServicesOK */ @@ -84,7 +85,8 @@ func (o *ListServicesOK) WriteResponse(rw http.ResponseWriter, producer runtime. // ListServicesUnauthorizedCode is the HTTP code returned for type ListServicesUnauthorized const ListServicesUnauthorizedCode int = 401 -/*ListServicesUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +ListServicesUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response listServicesUnauthorized */ diff --git a/rest_server/operations/service/patch_service.go b/rest_server/operations/service/patch_service.go index 7729648bd..f8582fcf8 100644 --- a/rest_server/operations/service/patch_service.go +++ b/rest_server/operations/service/patch_service.go @@ -53,12 +53,12 @@ func NewPatchService(ctx *middleware.Context, handler PatchServiceHandler) *Patc return &PatchService{Context: ctx, Handler: handler} } -/* PatchService swagger:route PATCH /services/{id} Service patchService +/* + PatchService swagger:route PATCH /services/{id} Service patchService -Update the supplied fields on a service +# Update the supplied fields on a service Update the supplied fields on a service. Requires admin access. - */ type PatchService struct { Context *middleware.Context diff --git a/rest_server/operations/service/patch_service_parameters.go b/rest_server/operations/service/patch_service_parameters.go index 7e7f7abef..97759f536 100644 --- a/rest_server/operations/service/patch_service_parameters.go +++ b/rest_server/operations/service/patch_service_parameters.go @@ -30,7 +30,6 @@ package service // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -101,7 +100,7 @@ func (o *PatchServiceParams) BindRequest(r *http.Request, route *middleware.Matc res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/rest_server/operations/service/patch_service_responses.go b/rest_server/operations/service/patch_service_responses.go index d72e4e6ea..548b5e9e5 100644 --- a/rest_server/operations/service/patch_service_responses.go +++ b/rest_server/operations/service/patch_service_responses.go @@ -40,7 +40,8 @@ import ( // PatchServiceOKCode is the HTTP code returned for type PatchServiceOK const PatchServiceOKCode int = 200 -/*PatchServiceOK The patch request was successful and the resource has been altered +/* +PatchServiceOK The patch request was successful and the resource has been altered swagger:response patchServiceOK */ @@ -84,7 +85,8 @@ func (o *PatchServiceOK) WriteResponse(rw http.ResponseWriter, producer runtime. // PatchServiceBadRequestCode is the HTTP code returned for type PatchServiceBadRequest const PatchServiceBadRequestCode int = 400 -/*PatchServiceBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +PatchServiceBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response patchServiceBadRequest */ @@ -128,7 +130,8 @@ func (o *PatchServiceBadRequest) WriteResponse(rw http.ResponseWriter, producer // PatchServiceUnauthorizedCode is the HTTP code returned for type PatchServiceUnauthorized const PatchServiceUnauthorizedCode int = 401 -/*PatchServiceUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +PatchServiceUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response patchServiceUnauthorized */ @@ -172,7 +175,8 @@ func (o *PatchServiceUnauthorized) WriteResponse(rw http.ResponseWriter, produce // PatchServiceNotFoundCode is the HTTP code returned for type PatchServiceNotFound const PatchServiceNotFoundCode int = 404 -/*PatchServiceNotFound The requested resource does not exist +/* +PatchServiceNotFound The requested resource does not exist swagger:response patchServiceNotFound */ diff --git a/rest_server/operations/service/update_service.go b/rest_server/operations/service/update_service.go index 162de1215..ccc3593a4 100644 --- a/rest_server/operations/service/update_service.go +++ b/rest_server/operations/service/update_service.go @@ -53,12 +53,12 @@ func NewUpdateService(ctx *middleware.Context, handler UpdateServiceHandler) *Up return &UpdateService{Context: ctx, Handler: handler} } -/* UpdateService swagger:route PUT /services/{id} Service updateService +/* + UpdateService swagger:route PUT /services/{id} Service updateService -Update all fields on a service +# Update all fields on a service Update all fields on a service by id. Requires admin access. - */ type UpdateService struct { Context *middleware.Context diff --git a/rest_server/operations/service/update_service_parameters.go b/rest_server/operations/service/update_service_parameters.go index 443506a61..8b7392ca1 100644 --- a/rest_server/operations/service/update_service_parameters.go +++ b/rest_server/operations/service/update_service_parameters.go @@ -30,7 +30,6 @@ package service // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -101,7 +100,7 @@ func (o *UpdateServiceParams) BindRequest(r *http.Request, route *middleware.Mat res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/rest_server/operations/service/update_service_responses.go b/rest_server/operations/service/update_service_responses.go index 87729bf53..f7dcb2dfc 100644 --- a/rest_server/operations/service/update_service_responses.go +++ b/rest_server/operations/service/update_service_responses.go @@ -40,7 +40,8 @@ import ( // UpdateServiceOKCode is the HTTP code returned for type UpdateServiceOK const UpdateServiceOKCode int = 200 -/*UpdateServiceOK The update request was successful and the resource has been altered +/* +UpdateServiceOK The update request was successful and the resource has been altered swagger:response updateServiceOK */ @@ -84,7 +85,8 @@ func (o *UpdateServiceOK) WriteResponse(rw http.ResponseWriter, producer runtime // UpdateServiceBadRequestCode is the HTTP code returned for type UpdateServiceBadRequest const UpdateServiceBadRequestCode int = 400 -/*UpdateServiceBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +UpdateServiceBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response updateServiceBadRequest */ @@ -128,7 +130,8 @@ func (o *UpdateServiceBadRequest) WriteResponse(rw http.ResponseWriter, producer // UpdateServiceUnauthorizedCode is the HTTP code returned for type UpdateServiceUnauthorized const UpdateServiceUnauthorizedCode int = 401 -/*UpdateServiceUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +UpdateServiceUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response updateServiceUnauthorized */ @@ -172,7 +175,8 @@ func (o *UpdateServiceUnauthorized) WriteResponse(rw http.ResponseWriter, produc // UpdateServiceNotFoundCode is the HTTP code returned for type UpdateServiceNotFound const UpdateServiceNotFoundCode int = 404 -/*UpdateServiceNotFound The requested resource does not exist +/* +UpdateServiceNotFound The requested resource does not exist swagger:response updateServiceNotFound */ diff --git a/rest_server/operations/terminator/create_terminator.go b/rest_server/operations/terminator/create_terminator.go index e7186eb83..84d64422c 100644 --- a/rest_server/operations/terminator/create_terminator.go +++ b/rest_server/operations/terminator/create_terminator.go @@ -53,12 +53,12 @@ func NewCreateTerminator(ctx *middleware.Context, handler CreateTerminatorHandle return &CreateTerminator{Context: ctx, Handler: handler} } -/* CreateTerminator swagger:route POST /terminators Terminator createTerminator +/* + CreateTerminator swagger:route POST /terminators Terminator createTerminator -Create a terminator resource +# Create a terminator resource Create a terminator resource. Requires admin access. - */ type CreateTerminator struct { Context *middleware.Context diff --git a/rest_server/operations/terminator/create_terminator_parameters.go b/rest_server/operations/terminator/create_terminator_parameters.go index 2077edea8..2d82de3d2 100644 --- a/rest_server/operations/terminator/create_terminator_parameters.go +++ b/rest_server/operations/terminator/create_terminator_parameters.go @@ -30,7 +30,6 @@ package terminator // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -90,7 +89,7 @@ func (o *CreateTerminatorParams) BindRequest(r *http.Request, route *middleware. res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/rest_server/operations/terminator/create_terminator_responses.go b/rest_server/operations/terminator/create_terminator_responses.go index 8748b47fc..f0b63958a 100644 --- a/rest_server/operations/terminator/create_terminator_responses.go +++ b/rest_server/operations/terminator/create_terminator_responses.go @@ -40,7 +40,8 @@ import ( // CreateTerminatorCreatedCode is the HTTP code returned for type CreateTerminatorCreated const CreateTerminatorCreatedCode int = 201 -/*CreateTerminatorCreated The create request was successful and the resource has been added at the following location +/* +CreateTerminatorCreated The create request was successful and the resource has been added at the following location swagger:response createTerminatorCreated */ @@ -84,7 +85,8 @@ func (o *CreateTerminatorCreated) WriteResponse(rw http.ResponseWriter, producer // CreateTerminatorBadRequestCode is the HTTP code returned for type CreateTerminatorBadRequest const CreateTerminatorBadRequestCode int = 400 -/*CreateTerminatorBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +CreateTerminatorBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response createTerminatorBadRequest */ @@ -128,7 +130,8 @@ func (o *CreateTerminatorBadRequest) WriteResponse(rw http.ResponseWriter, produ // CreateTerminatorUnauthorizedCode is the HTTP code returned for type CreateTerminatorUnauthorized const CreateTerminatorUnauthorizedCode int = 401 -/*CreateTerminatorUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +CreateTerminatorUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response createTerminatorUnauthorized */ diff --git a/rest_server/operations/terminator/delete_terminator.go b/rest_server/operations/terminator/delete_terminator.go index 7db563539..666b5db92 100644 --- a/rest_server/operations/terminator/delete_terminator.go +++ b/rest_server/operations/terminator/delete_terminator.go @@ -53,12 +53,12 @@ func NewDeleteTerminator(ctx *middleware.Context, handler DeleteTerminatorHandle return &DeleteTerminator{Context: ctx, Handler: handler} } -/* DeleteTerminator swagger:route DELETE /terminators/{id} Terminator deleteTerminator +/* + DeleteTerminator swagger:route DELETE /terminators/{id} Terminator deleteTerminator -Delete a terminator +# Delete a terminator Delete a terminator by id. Requires admin access. - */ type DeleteTerminator struct { Context *middleware.Context diff --git a/rest_server/operations/terminator/delete_terminator_responses.go b/rest_server/operations/terminator/delete_terminator_responses.go index b239f97a3..903771162 100644 --- a/rest_server/operations/terminator/delete_terminator_responses.go +++ b/rest_server/operations/terminator/delete_terminator_responses.go @@ -40,7 +40,8 @@ import ( // DeleteTerminatorOKCode is the HTTP code returned for type DeleteTerminatorOK const DeleteTerminatorOKCode int = 200 -/*DeleteTerminatorOK The delete request was successful and the resource has been removed +/* +DeleteTerminatorOK The delete request was successful and the resource has been removed swagger:response deleteTerminatorOK */ @@ -84,7 +85,8 @@ func (o *DeleteTerminatorOK) WriteResponse(rw http.ResponseWriter, producer runt // DeleteTerminatorBadRequestCode is the HTTP code returned for type DeleteTerminatorBadRequest const DeleteTerminatorBadRequestCode int = 400 -/*DeleteTerminatorBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +DeleteTerminatorBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response deleteTerminatorBadRequest */ @@ -128,7 +130,8 @@ func (o *DeleteTerminatorBadRequest) WriteResponse(rw http.ResponseWriter, produ // DeleteTerminatorUnauthorizedCode is the HTTP code returned for type DeleteTerminatorUnauthorized const DeleteTerminatorUnauthorizedCode int = 401 -/*DeleteTerminatorUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +DeleteTerminatorUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response deleteTerminatorUnauthorized */ @@ -172,7 +175,8 @@ func (o *DeleteTerminatorUnauthorized) WriteResponse(rw http.ResponseWriter, pro // DeleteTerminatorConflictCode is the HTTP code returned for type DeleteTerminatorConflict const DeleteTerminatorConflictCode int = 409 -/*DeleteTerminatorConflict The resource requested to be removed/altered cannot be as it is referenced by another object. +/* +DeleteTerminatorConflict The resource requested to be removed/altered cannot be as it is referenced by another object. swagger:response deleteTerminatorConflict */ diff --git a/rest_server/operations/terminator/detail_terminator.go b/rest_server/operations/terminator/detail_terminator.go index a6ac2ba1a..f83cf4943 100644 --- a/rest_server/operations/terminator/detail_terminator.go +++ b/rest_server/operations/terminator/detail_terminator.go @@ -53,12 +53,12 @@ func NewDetailTerminator(ctx *middleware.Context, handler DetailTerminatorHandle return &DetailTerminator{Context: ctx, Handler: handler} } -/* DetailTerminator swagger:route GET /terminators/{id} Terminator detailTerminator +/* + DetailTerminator swagger:route GET /terminators/{id} Terminator detailTerminator -Retrieves a single terminator +# Retrieves a single terminator Retrieves a single terminator by id. Requires admin access. - */ type DetailTerminator struct { Context *middleware.Context diff --git a/rest_server/operations/terminator/detail_terminator_responses.go b/rest_server/operations/terminator/detail_terminator_responses.go index bf1d78e9a..9552fdb1f 100644 --- a/rest_server/operations/terminator/detail_terminator_responses.go +++ b/rest_server/operations/terminator/detail_terminator_responses.go @@ -40,7 +40,8 @@ import ( // DetailTerminatorOKCode is the HTTP code returned for type DetailTerminatorOK const DetailTerminatorOKCode int = 200 -/*DetailTerminatorOK A single terminator +/* +DetailTerminatorOK A single terminator swagger:response detailTerminatorOK */ @@ -84,7 +85,8 @@ func (o *DetailTerminatorOK) WriteResponse(rw http.ResponseWriter, producer runt // DetailTerminatorUnauthorizedCode is the HTTP code returned for type DetailTerminatorUnauthorized const DetailTerminatorUnauthorizedCode int = 401 -/*DetailTerminatorUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +DetailTerminatorUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response detailTerminatorUnauthorized */ @@ -128,7 +130,8 @@ func (o *DetailTerminatorUnauthorized) WriteResponse(rw http.ResponseWriter, pro // DetailTerminatorNotFoundCode is the HTTP code returned for type DetailTerminatorNotFound const DetailTerminatorNotFoundCode int = 404 -/*DetailTerminatorNotFound The requested resource does not exist +/* +DetailTerminatorNotFound The requested resource does not exist swagger:response detailTerminatorNotFound */ diff --git a/rest_server/operations/terminator/list_terminators.go b/rest_server/operations/terminator/list_terminators.go index 2bfc4e7c0..ce04cb7e7 100644 --- a/rest_server/operations/terminator/list_terminators.go +++ b/rest_server/operations/terminator/list_terminators.go @@ -53,13 +53,12 @@ func NewListTerminators(ctx *middleware.Context, handler ListTerminatorsHandler) return &ListTerminators{Context: ctx, Handler: handler} } -/* ListTerminators swagger:route GET /terminators Terminator listTerminators +/* + ListTerminators swagger:route GET /terminators Terminator listTerminators -List terminators +# List terminators Retrieves a list of terminator resources; supports filtering, sorting, and pagination. Requires admin access. - - */ type ListTerminators struct { Context *middleware.Context diff --git a/rest_server/operations/terminator/list_terminators_responses.go b/rest_server/operations/terminator/list_terminators_responses.go index e0d5f786a..9d64008ce 100644 --- a/rest_server/operations/terminator/list_terminators_responses.go +++ b/rest_server/operations/terminator/list_terminators_responses.go @@ -40,7 +40,8 @@ import ( // ListTerminatorsOKCode is the HTTP code returned for type ListTerminatorsOK const ListTerminatorsOKCode int = 200 -/*ListTerminatorsOK A list of terminators +/* +ListTerminatorsOK A list of terminators swagger:response listTerminatorsOK */ @@ -84,7 +85,8 @@ func (o *ListTerminatorsOK) WriteResponse(rw http.ResponseWriter, producer runti // ListTerminatorsBadRequestCode is the HTTP code returned for type ListTerminatorsBadRequest const ListTerminatorsBadRequestCode int = 400 -/*ListTerminatorsBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +ListTerminatorsBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response listTerminatorsBadRequest */ @@ -128,7 +130,8 @@ func (o *ListTerminatorsBadRequest) WriteResponse(rw http.ResponseWriter, produc // ListTerminatorsUnauthorizedCode is the HTTP code returned for type ListTerminatorsUnauthorized const ListTerminatorsUnauthorizedCode int = 401 -/*ListTerminatorsUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +ListTerminatorsUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response listTerminatorsUnauthorized */ diff --git a/rest_server/operations/terminator/patch_terminator.go b/rest_server/operations/terminator/patch_terminator.go index 40be1791d..95c525dda 100644 --- a/rest_server/operations/terminator/patch_terminator.go +++ b/rest_server/operations/terminator/patch_terminator.go @@ -53,12 +53,12 @@ func NewPatchTerminator(ctx *middleware.Context, handler PatchTerminatorHandler) return &PatchTerminator{Context: ctx, Handler: handler} } -/* PatchTerminator swagger:route PATCH /terminators/{id} Terminator patchTerminator +/* + PatchTerminator swagger:route PATCH /terminators/{id} Terminator patchTerminator -Update the supplied fields on a terminator +# Update the supplied fields on a terminator Update the supplied fields on a terminator. Requires admin access. - */ type PatchTerminator struct { Context *middleware.Context diff --git a/rest_server/operations/terminator/patch_terminator_parameters.go b/rest_server/operations/terminator/patch_terminator_parameters.go index 11b437faf..156477d4f 100644 --- a/rest_server/operations/terminator/patch_terminator_parameters.go +++ b/rest_server/operations/terminator/patch_terminator_parameters.go @@ -30,7 +30,6 @@ package terminator // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -101,7 +100,7 @@ func (o *PatchTerminatorParams) BindRequest(r *http.Request, route *middleware.M res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/rest_server/operations/terminator/patch_terminator_responses.go b/rest_server/operations/terminator/patch_terminator_responses.go index 00214bb17..e4839d876 100644 --- a/rest_server/operations/terminator/patch_terminator_responses.go +++ b/rest_server/operations/terminator/patch_terminator_responses.go @@ -40,7 +40,8 @@ import ( // PatchTerminatorOKCode is the HTTP code returned for type PatchTerminatorOK const PatchTerminatorOKCode int = 200 -/*PatchTerminatorOK The patch request was successful and the resource has been altered +/* +PatchTerminatorOK The patch request was successful and the resource has been altered swagger:response patchTerminatorOK */ @@ -84,7 +85,8 @@ func (o *PatchTerminatorOK) WriteResponse(rw http.ResponseWriter, producer runti // PatchTerminatorBadRequestCode is the HTTP code returned for type PatchTerminatorBadRequest const PatchTerminatorBadRequestCode int = 400 -/*PatchTerminatorBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +PatchTerminatorBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response patchTerminatorBadRequest */ @@ -128,7 +130,8 @@ func (o *PatchTerminatorBadRequest) WriteResponse(rw http.ResponseWriter, produc // PatchTerminatorUnauthorizedCode is the HTTP code returned for type PatchTerminatorUnauthorized const PatchTerminatorUnauthorizedCode int = 401 -/*PatchTerminatorUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +PatchTerminatorUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response patchTerminatorUnauthorized */ @@ -172,7 +175,8 @@ func (o *PatchTerminatorUnauthorized) WriteResponse(rw http.ResponseWriter, prod // PatchTerminatorNotFoundCode is the HTTP code returned for type PatchTerminatorNotFound const PatchTerminatorNotFoundCode int = 404 -/*PatchTerminatorNotFound The requested resource does not exist +/* +PatchTerminatorNotFound The requested resource does not exist swagger:response patchTerminatorNotFound */ diff --git a/rest_server/operations/terminator/update_terminator.go b/rest_server/operations/terminator/update_terminator.go index 8fa9f6ec1..506fe3bf5 100644 --- a/rest_server/operations/terminator/update_terminator.go +++ b/rest_server/operations/terminator/update_terminator.go @@ -53,12 +53,12 @@ func NewUpdateTerminator(ctx *middleware.Context, handler UpdateTerminatorHandle return &UpdateTerminator{Context: ctx, Handler: handler} } -/* UpdateTerminator swagger:route PUT /terminators/{id} Terminator updateTerminator +/* + UpdateTerminator swagger:route PUT /terminators/{id} Terminator updateTerminator -Update all fields on a terminator +# Update all fields on a terminator Update all fields on a terminator by id. Requires admin access. - */ type UpdateTerminator struct { Context *middleware.Context diff --git a/rest_server/operations/terminator/update_terminator_parameters.go b/rest_server/operations/terminator/update_terminator_parameters.go index 6cb8bb74c..0a2e8096f 100644 --- a/rest_server/operations/terminator/update_terminator_parameters.go +++ b/rest_server/operations/terminator/update_terminator_parameters.go @@ -30,7 +30,6 @@ package terminator // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -101,7 +100,7 @@ func (o *UpdateTerminatorParams) BindRequest(r *http.Request, route *middleware. res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/rest_server/operations/terminator/update_terminator_responses.go b/rest_server/operations/terminator/update_terminator_responses.go index bfecd5ab1..56bf83f2e 100644 --- a/rest_server/operations/terminator/update_terminator_responses.go +++ b/rest_server/operations/terminator/update_terminator_responses.go @@ -40,7 +40,8 @@ import ( // UpdateTerminatorOKCode is the HTTP code returned for type UpdateTerminatorOK const UpdateTerminatorOKCode int = 200 -/*UpdateTerminatorOK The update request was successful and the resource has been altered +/* +UpdateTerminatorOK The update request was successful and the resource has been altered swagger:response updateTerminatorOK */ @@ -84,7 +85,8 @@ func (o *UpdateTerminatorOK) WriteResponse(rw http.ResponseWriter, producer runt // UpdateTerminatorBadRequestCode is the HTTP code returned for type UpdateTerminatorBadRequest const UpdateTerminatorBadRequestCode int = 400 -/*UpdateTerminatorBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information +/* +UpdateTerminatorBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response updateTerminatorBadRequest */ @@ -128,7 +130,8 @@ func (o *UpdateTerminatorBadRequest) WriteResponse(rw http.ResponseWriter, produ // UpdateTerminatorUnauthorizedCode is the HTTP code returned for type UpdateTerminatorUnauthorized const UpdateTerminatorUnauthorizedCode int = 401 -/*UpdateTerminatorUnauthorized The currently supplied session does not have the correct access rights to request this resource +/* +UpdateTerminatorUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response updateTerminatorUnauthorized */ @@ -172,7 +175,8 @@ func (o *UpdateTerminatorUnauthorized) WriteResponse(rw http.ResponseWriter, pro // UpdateTerminatorNotFoundCode is the HTTP code returned for type UpdateTerminatorNotFound const UpdateTerminatorNotFoundCode int = 404 -/*UpdateTerminatorNotFound The requested resource does not exist +/* +UpdateTerminatorNotFound The requested resource does not exist swagger:response updateTerminatorNotFound */ diff --git a/rest_server/server.go b/rest_server/server.go index 106905620..bb5fb05d7 100644 --- a/rest_server/server.go +++ b/rest_server/server.go @@ -32,7 +32,6 @@ import ( "crypto/x509" "errors" "fmt" - "io/ioutil" "log" "net" "net/http" @@ -298,7 +297,7 @@ func (s *Server) Serve() (err error) { if s.TLSCACertificate != "" { // include specified CA certificate - caCert, caCertErr := ioutil.ReadFile(string(s.TLSCACertificate)) + caCert, caCertErr := os.ReadFile(string(s.TLSCACertificate)) if caCertErr != nil { return caCertErr }