From a656462fe24117c1bb9856eabf374d1ec730e12b Mon Sep 17 00:00:00 2001 From: Stewart Jingga Date: Thu, 12 Oct 2023 14:56:22 +0700 Subject: [PATCH] chore: update swagger generated models --- .../operations/create_firehose_responses.go | 150 +---------- .../delete_alert_subscription_responses.go | 76 +----- .../get_alert_subscription_responses.go | 122 +-------- .../get_firehose_alert_policy_responses.go | 113 +-------- .../get_firehose_alerts_responses.go | 113 +-------- .../get_firehose_history_responses.go | 113 +-------- .../operations/get_firehose_logs_responses.go | 150 +---------- .../operations/get_firehose_responses.go | 113 +-------- .../get_group_alert_channels_responses.go | 122 +-------- .../operations/get_optimus_job_responses.go | 76 +----- .../get_project_by_slug_responses.go | 113 +-------- .../get_subscription_list_responses.go | 122 +-------- .../list_alert_templates_responses.go | 76 +----- .../operations/list_firehoses_responses.go | 76 +----- .../operations/list_kubernetes_responses.go | 76 +----- .../operations/list_projects_responses.go | 76 +----- .../new_alert_subscription_responses.go | 196 +-------------- .../partial_update_firehose_responses.go | 159 +----------- .../operations/reset_offset_responses.go | 150 +---------- .../operations/scale_firehose_responses.go | 150 +---------- .../set_group_alert_channels_responses.go | 131 +--------- .../operations/start_firehose_responses.go | 150 +---------- .../operations/stop_firehose_responses.go | 150 +---------- .../update_alert_subscription_responses.go | 233 +----------------- .../operations/update_firehose_responses.go | 150 +---------- .../operations/upgrade_firehose_responses.go | 113 +-------- .../upsert_firehose_alert_policy_responses.go | 113 +-------- generated/models/alert_array.go | 9 - generated/models/alert_channel.go | 18 -- generated/models/alert_channel_form.go | 10 - generated/models/alert_channel_type.go | 8 +- generated/models/alert_policy.go | 9 - generated/models/alert_template.go | 9 - generated/models/alert_templates_array.go | 9 - generated/models/channel_criticality.go | 8 +- generated/models/firehose.go | 14 -- generated/models/firehose_array.go | 9 - generated/models/firehose_update_request.go | 9 - generated/models/history_response.go | 9 - generated/models/kubernetes_array.go | 9 - generated/models/logs.go | 9 - generated/models/project_array.go | 9 - generated/models/rule.go | 9 - generated/models/subscription.go | 9 - generated/models/subscription_form.go | 5 - internal/server/v1/dlq/errors.go | 8 + internal/server/v1/dlq/mapper.go | 38 ++- internal/server/v1/dlq/service.go | 11 - 48 files changed, 142 insertions(+), 3468 deletions(-) create mode 100644 internal/server/v1/dlq/errors.go diff --git a/generated/client/operations/create_firehose_responses.go b/generated/client/operations/create_firehose_responses.go index 082df6a6..a2f15d41 100644 --- a/generated/client/operations/create_firehose_responses.go +++ b/generated/client/operations/create_firehose_responses.go @@ -48,7 +48,7 @@ func (o *CreateFirehoseReader) ReadResponse(response runtime.ClientResponse, con } return nil, result default: - return nil, runtime.NewAPIError("[POST /dex/firehoses] createFirehose", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -58,7 +58,7 @@ func NewCreateFirehoseCreated() *CreateFirehoseCreated { } /* -CreateFirehoseCreated describes a response with status code 201, with default header values. + CreateFirehoseCreated describes a response with status code 201, with default header values. Successfully created */ @@ -66,44 +66,9 @@ type CreateFirehoseCreated struct { Payload *models.Firehose } -// IsSuccess returns true when this create firehose created response has a 2xx status code -func (o *CreateFirehoseCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create firehose created response has a 3xx status code -func (o *CreateFirehoseCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create firehose created response has a 4xx status code -func (o *CreateFirehoseCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create firehose created response has a 5xx status code -func (o *CreateFirehoseCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create firehose created response a status code equal to that given -func (o *CreateFirehoseCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create firehose created response -func (o *CreateFirehoseCreated) Code() int { - return 201 -} - func (o *CreateFirehoseCreated) Error() string { return fmt.Sprintf("[POST /dex/firehoses][%d] createFirehoseCreated %+v", 201, o.Payload) } - -func (o *CreateFirehoseCreated) String() string { - return fmt.Sprintf("[POST /dex/firehoses][%d] createFirehoseCreated %+v", 201, o.Payload) -} - func (o *CreateFirehoseCreated) GetPayload() *models.Firehose { return o.Payload } @@ -126,7 +91,7 @@ func NewCreateFirehoseBadRequest() *CreateFirehoseBadRequest { } /* -CreateFirehoseBadRequest describes a response with status code 400, with default header values. + CreateFirehoseBadRequest describes a response with status code 400, with default header values. Request was invalid. */ @@ -134,44 +99,9 @@ type CreateFirehoseBadRequest struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this create firehose bad request response has a 2xx status code -func (o *CreateFirehoseBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create firehose bad request response has a 3xx status code -func (o *CreateFirehoseBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create firehose bad request response has a 4xx status code -func (o *CreateFirehoseBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create firehose bad request response has a 5xx status code -func (o *CreateFirehoseBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create firehose bad request response a status code equal to that given -func (o *CreateFirehoseBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create firehose bad request response -func (o *CreateFirehoseBadRequest) Code() int { - return 400 -} - func (o *CreateFirehoseBadRequest) Error() string { return fmt.Sprintf("[POST /dex/firehoses][%d] createFirehoseBadRequest %+v", 400, o.Payload) } - -func (o *CreateFirehoseBadRequest) String() string { - return fmt.Sprintf("[POST /dex/firehoses][%d] createFirehoseBadRequest %+v", 400, o.Payload) -} - func (o *CreateFirehoseBadRequest) GetPayload() *models.ErrorResponse { return o.Payload } @@ -194,7 +124,7 @@ func NewCreateFirehoseConflict() *CreateFirehoseConflict { } /* -CreateFirehoseConflict describes a response with status code 409, with default header values. + CreateFirehoseConflict describes a response with status code 409, with default header values. A firehose with same unique identifier already exists. */ @@ -202,44 +132,9 @@ type CreateFirehoseConflict struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this create firehose conflict response has a 2xx status code -func (o *CreateFirehoseConflict) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create firehose conflict response has a 3xx status code -func (o *CreateFirehoseConflict) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create firehose conflict response has a 4xx status code -func (o *CreateFirehoseConflict) IsClientError() bool { - return true -} - -// IsServerError returns true when this create firehose conflict response has a 5xx status code -func (o *CreateFirehoseConflict) IsServerError() bool { - return false -} - -// IsCode returns true when this create firehose conflict response a status code equal to that given -func (o *CreateFirehoseConflict) IsCode(code int) bool { - return code == 409 -} - -// Code gets the status code for the create firehose conflict response -func (o *CreateFirehoseConflict) Code() int { - return 409 -} - func (o *CreateFirehoseConflict) Error() string { return fmt.Sprintf("[POST /dex/firehoses][%d] createFirehoseConflict %+v", 409, o.Payload) } - -func (o *CreateFirehoseConflict) String() string { - return fmt.Sprintf("[POST /dex/firehoses][%d] createFirehoseConflict %+v", 409, o.Payload) -} - func (o *CreateFirehoseConflict) GetPayload() *models.ErrorResponse { return o.Payload } @@ -262,7 +157,7 @@ func NewCreateFirehoseInternalServerError() *CreateFirehoseInternalServerError { } /* -CreateFirehoseInternalServerError describes a response with status code 500, with default header values. + CreateFirehoseInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -270,44 +165,9 @@ type CreateFirehoseInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this create firehose internal server error response has a 2xx status code -func (o *CreateFirehoseInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create firehose internal server error response has a 3xx status code -func (o *CreateFirehoseInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create firehose internal server error response has a 4xx status code -func (o *CreateFirehoseInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create firehose internal server error response has a 5xx status code -func (o *CreateFirehoseInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create firehose internal server error response a status code equal to that given -func (o *CreateFirehoseInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create firehose internal server error response -func (o *CreateFirehoseInternalServerError) Code() int { - return 500 -} - func (o *CreateFirehoseInternalServerError) Error() string { return fmt.Sprintf("[POST /dex/firehoses][%d] createFirehoseInternalServerError %+v", 500, o.Payload) } - -func (o *CreateFirehoseInternalServerError) String() string { - return fmt.Sprintf("[POST /dex/firehoses][%d] createFirehoseInternalServerError %+v", 500, o.Payload) -} - func (o *CreateFirehoseInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/delete_alert_subscription_responses.go b/generated/client/operations/delete_alert_subscription_responses.go index 5deb3f2b..1a15acbb 100644 --- a/generated/client/operations/delete_alert_subscription_responses.go +++ b/generated/client/operations/delete_alert_subscription_responses.go @@ -36,7 +36,7 @@ func (o *DeleteAlertSubscriptionReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("[DELETE /dex/subscriptions/{id}] deleteAlertSubscription", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -46,7 +46,7 @@ func NewDeleteAlertSubscriptionOK() *DeleteAlertSubscriptionOK { } /* -DeleteAlertSubscriptionOK describes a response with status code 200, with default header values. + DeleteAlertSubscriptionOK describes a response with status code 200, with default header values. Successful Operation. */ @@ -54,44 +54,9 @@ type DeleteAlertSubscriptionOK struct { Payload *models.Response } -// IsSuccess returns true when this delete alert subscription o k response has a 2xx status code -func (o *DeleteAlertSubscriptionOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete alert subscription o k response has a 3xx status code -func (o *DeleteAlertSubscriptionOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete alert subscription o k response has a 4xx status code -func (o *DeleteAlertSubscriptionOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete alert subscription o k response has a 5xx status code -func (o *DeleteAlertSubscriptionOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete alert subscription o k response a status code equal to that given -func (o *DeleteAlertSubscriptionOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete alert subscription o k response -func (o *DeleteAlertSubscriptionOK) Code() int { - return 200 -} - func (o *DeleteAlertSubscriptionOK) Error() string { return fmt.Sprintf("[DELETE /dex/subscriptions/{id}][%d] deleteAlertSubscriptionOK %+v", 200, o.Payload) } - -func (o *DeleteAlertSubscriptionOK) String() string { - return fmt.Sprintf("[DELETE /dex/subscriptions/{id}][%d] deleteAlertSubscriptionOK %+v", 200, o.Payload) -} - func (o *DeleteAlertSubscriptionOK) GetPayload() *models.Response { return o.Payload } @@ -114,7 +79,7 @@ func NewDeleteAlertSubscriptionNotFound() *DeleteAlertSubscriptionNotFound { } /* -DeleteAlertSubscriptionNotFound describes a response with status code 404, with default header values. + DeleteAlertSubscriptionNotFound describes a response with status code 404, with default header values. Not Found Error */ @@ -122,44 +87,9 @@ type DeleteAlertSubscriptionNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this delete alert subscription not found response has a 2xx status code -func (o *DeleteAlertSubscriptionNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete alert subscription not found response has a 3xx status code -func (o *DeleteAlertSubscriptionNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete alert subscription not found response has a 4xx status code -func (o *DeleteAlertSubscriptionNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete alert subscription not found response has a 5xx status code -func (o *DeleteAlertSubscriptionNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete alert subscription not found response a status code equal to that given -func (o *DeleteAlertSubscriptionNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the delete alert subscription not found response -func (o *DeleteAlertSubscriptionNotFound) Code() int { - return 404 -} - func (o *DeleteAlertSubscriptionNotFound) Error() string { return fmt.Sprintf("[DELETE /dex/subscriptions/{id}][%d] deleteAlertSubscriptionNotFound %+v", 404, o.Payload) } - -func (o *DeleteAlertSubscriptionNotFound) String() string { - return fmt.Sprintf("[DELETE /dex/subscriptions/{id}][%d] deleteAlertSubscriptionNotFound %+v", 404, o.Payload) -} - func (o *DeleteAlertSubscriptionNotFound) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/get_alert_subscription_responses.go b/generated/client/operations/get_alert_subscription_responses.go index 54b8c78a..13ae130a 100644 --- a/generated/client/operations/get_alert_subscription_responses.go +++ b/generated/client/operations/get_alert_subscription_responses.go @@ -45,7 +45,7 @@ func (o *GetAlertSubscriptionReader) ReadResponse(response runtime.ClientRespons } return nil, result default: - return nil, runtime.NewAPIError("[GET /dex/subscriptions/{id}] getAlertSubscription", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -55,7 +55,7 @@ func NewGetAlertSubscriptionOK() *GetAlertSubscriptionOK { } /* -GetAlertSubscriptionOK describes a response with status code 200, with default header values. + GetAlertSubscriptionOK describes a response with status code 200, with default header values. Successful Operation. */ @@ -63,44 +63,9 @@ type GetAlertSubscriptionOK struct { Payload *GetAlertSubscriptionOKBody } -// IsSuccess returns true when this get alert subscription o k response has a 2xx status code -func (o *GetAlertSubscriptionOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get alert subscription o k response has a 3xx status code -func (o *GetAlertSubscriptionOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get alert subscription o k response has a 4xx status code -func (o *GetAlertSubscriptionOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get alert subscription o k response has a 5xx status code -func (o *GetAlertSubscriptionOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get alert subscription o k response a status code equal to that given -func (o *GetAlertSubscriptionOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get alert subscription o k response -func (o *GetAlertSubscriptionOK) Code() int { - return 200 -} - func (o *GetAlertSubscriptionOK) Error() string { return fmt.Sprintf("[GET /dex/subscriptions/{id}][%d] getAlertSubscriptionOK %+v", 200, o.Payload) } - -func (o *GetAlertSubscriptionOK) String() string { - return fmt.Sprintf("[GET /dex/subscriptions/{id}][%d] getAlertSubscriptionOK %+v", 200, o.Payload) -} - func (o *GetAlertSubscriptionOK) GetPayload() *GetAlertSubscriptionOKBody { return o.Payload } @@ -123,7 +88,7 @@ func NewGetAlertSubscriptionNotFound() *GetAlertSubscriptionNotFound { } /* -GetAlertSubscriptionNotFound describes a response with status code 404, with default header values. + GetAlertSubscriptionNotFound describes a response with status code 404, with default header values. Not Found Error */ @@ -131,44 +96,9 @@ type GetAlertSubscriptionNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get alert subscription not found response has a 2xx status code -func (o *GetAlertSubscriptionNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get alert subscription not found response has a 3xx status code -func (o *GetAlertSubscriptionNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get alert subscription not found response has a 4xx status code -func (o *GetAlertSubscriptionNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get alert subscription not found response has a 5xx status code -func (o *GetAlertSubscriptionNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get alert subscription not found response a status code equal to that given -func (o *GetAlertSubscriptionNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get alert subscription not found response -func (o *GetAlertSubscriptionNotFound) Code() int { - return 404 -} - func (o *GetAlertSubscriptionNotFound) Error() string { return fmt.Sprintf("[GET /dex/subscriptions/{id}][%d] getAlertSubscriptionNotFound %+v", 404, o.Payload) } - -func (o *GetAlertSubscriptionNotFound) String() string { - return fmt.Sprintf("[GET /dex/subscriptions/{id}][%d] getAlertSubscriptionNotFound %+v", 404, o.Payload) -} - func (o *GetAlertSubscriptionNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -191,7 +121,7 @@ func NewGetAlertSubscriptionInternalServerError() *GetAlertSubscriptionInternalS } /* -GetAlertSubscriptionInternalServerError describes a response with status code 500, with default header values. + GetAlertSubscriptionInternalServerError describes a response with status code 500, with default header values. Internal Error */ @@ -199,44 +129,9 @@ type GetAlertSubscriptionInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get alert subscription internal server error response has a 2xx status code -func (o *GetAlertSubscriptionInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get alert subscription internal server error response has a 3xx status code -func (o *GetAlertSubscriptionInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get alert subscription internal server error response has a 4xx status code -func (o *GetAlertSubscriptionInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get alert subscription internal server error response has a 5xx status code -func (o *GetAlertSubscriptionInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get alert subscription internal server error response a status code equal to that given -func (o *GetAlertSubscriptionInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get alert subscription internal server error response -func (o *GetAlertSubscriptionInternalServerError) Code() int { - return 500 -} - func (o *GetAlertSubscriptionInternalServerError) Error() string { return fmt.Sprintf("[GET /dex/subscriptions/{id}][%d] getAlertSubscriptionInternalServerError %+v", 500, o.Payload) } - -func (o *GetAlertSubscriptionInternalServerError) String() string { - return fmt.Sprintf("[GET /dex/subscriptions/{id}][%d] getAlertSubscriptionInternalServerError %+v", 500, o.Payload) -} - func (o *GetAlertSubscriptionInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } @@ -286,8 +181,6 @@ func (o *GetAlertSubscriptionOKBody) validateSubscription(formats strfmt.Registr if err := o.Subscription.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("getAlertSubscriptionOK" + "." + "subscription") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getAlertSubscriptionOK" + "." + "subscription") } return err } @@ -313,16 +206,9 @@ func (o *GetAlertSubscriptionOKBody) ContextValidate(ctx context.Context, format func (o *GetAlertSubscriptionOKBody) contextValidateSubscription(ctx context.Context, formats strfmt.Registry) error { if o.Subscription != nil { - - if swag.IsZero(o.Subscription) { // not required - return nil - } - if err := o.Subscription.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("getAlertSubscriptionOK" + "." + "subscription") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getAlertSubscriptionOK" + "." + "subscription") } return err } diff --git a/generated/client/operations/get_firehose_alert_policy_responses.go b/generated/client/operations/get_firehose_alert_policy_responses.go index 280cc451..802cfbe0 100644 --- a/generated/client/operations/get_firehose_alert_policy_responses.go +++ b/generated/client/operations/get_firehose_alert_policy_responses.go @@ -42,7 +42,7 @@ func (o *GetFirehoseAlertPolicyReader) ReadResponse(response runtime.ClientRespo } return nil, result default: - return nil, runtime.NewAPIError("[GET /dex/firehoses/{firehoseUrn}/alertPolicy] getFirehoseAlertPolicy", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -52,7 +52,7 @@ func NewGetFirehoseAlertPolicyOK() *GetFirehoseAlertPolicyOK { } /* -GetFirehoseAlertPolicyOK describes a response with status code 200, with default header values. + GetFirehoseAlertPolicyOK describes a response with status code 200, with default header values. Found alert policy for given firehose URN. */ @@ -60,44 +60,9 @@ type GetFirehoseAlertPolicyOK struct { Payload *models.AlertPolicy } -// IsSuccess returns true when this get firehose alert policy o k response has a 2xx status code -func (o *GetFirehoseAlertPolicyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get firehose alert policy o k response has a 3xx status code -func (o *GetFirehoseAlertPolicyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose alert policy o k response has a 4xx status code -func (o *GetFirehoseAlertPolicyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get firehose alert policy o k response has a 5xx status code -func (o *GetFirehoseAlertPolicyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get firehose alert policy o k response a status code equal to that given -func (o *GetFirehoseAlertPolicyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get firehose alert policy o k response -func (o *GetFirehoseAlertPolicyOK) Code() int { - return 200 -} - func (o *GetFirehoseAlertPolicyOK) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/alertPolicy][%d] getFirehoseAlertPolicyOK %+v", 200, o.Payload) } - -func (o *GetFirehoseAlertPolicyOK) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/alertPolicy][%d] getFirehoseAlertPolicyOK %+v", 200, o.Payload) -} - func (o *GetFirehoseAlertPolicyOK) GetPayload() *models.AlertPolicy { return o.Payload } @@ -120,7 +85,7 @@ func NewGetFirehoseAlertPolicyNotFound() *GetFirehoseAlertPolicyNotFound { } /* -GetFirehoseAlertPolicyNotFound describes a response with status code 404, with default header values. + GetFirehoseAlertPolicyNotFound describes a response with status code 404, with default header values. Firehose with given URN was not found */ @@ -128,44 +93,9 @@ type GetFirehoseAlertPolicyNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get firehose alert policy not found response has a 2xx status code -func (o *GetFirehoseAlertPolicyNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get firehose alert policy not found response has a 3xx status code -func (o *GetFirehoseAlertPolicyNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose alert policy not found response has a 4xx status code -func (o *GetFirehoseAlertPolicyNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get firehose alert policy not found response has a 5xx status code -func (o *GetFirehoseAlertPolicyNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get firehose alert policy not found response a status code equal to that given -func (o *GetFirehoseAlertPolicyNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get firehose alert policy not found response -func (o *GetFirehoseAlertPolicyNotFound) Code() int { - return 404 -} - func (o *GetFirehoseAlertPolicyNotFound) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/alertPolicy][%d] getFirehoseAlertPolicyNotFound %+v", 404, o.Payload) } - -func (o *GetFirehoseAlertPolicyNotFound) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/alertPolicy][%d] getFirehoseAlertPolicyNotFound %+v", 404, o.Payload) -} - func (o *GetFirehoseAlertPolicyNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -188,7 +118,7 @@ func NewGetFirehoseAlertPolicyInternalServerError() *GetFirehoseAlertPolicyInter } /* -GetFirehoseAlertPolicyInternalServerError describes a response with status code 500, with default header values. + GetFirehoseAlertPolicyInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -196,44 +126,9 @@ type GetFirehoseAlertPolicyInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get firehose alert policy internal server error response has a 2xx status code -func (o *GetFirehoseAlertPolicyInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get firehose alert policy internal server error response has a 3xx status code -func (o *GetFirehoseAlertPolicyInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose alert policy internal server error response has a 4xx status code -func (o *GetFirehoseAlertPolicyInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get firehose alert policy internal server error response has a 5xx status code -func (o *GetFirehoseAlertPolicyInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get firehose alert policy internal server error response a status code equal to that given -func (o *GetFirehoseAlertPolicyInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get firehose alert policy internal server error response -func (o *GetFirehoseAlertPolicyInternalServerError) Code() int { - return 500 -} - func (o *GetFirehoseAlertPolicyInternalServerError) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/alertPolicy][%d] getFirehoseAlertPolicyInternalServerError %+v", 500, o.Payload) } - -func (o *GetFirehoseAlertPolicyInternalServerError) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/alertPolicy][%d] getFirehoseAlertPolicyInternalServerError %+v", 500, o.Payload) -} - func (o *GetFirehoseAlertPolicyInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/get_firehose_alerts_responses.go b/generated/client/operations/get_firehose_alerts_responses.go index 833db0d7..06455270 100644 --- a/generated/client/operations/get_firehose_alerts_responses.go +++ b/generated/client/operations/get_firehose_alerts_responses.go @@ -42,7 +42,7 @@ func (o *GetFirehoseAlertsReader) ReadResponse(response runtime.ClientResponse, } return nil, result default: - return nil, runtime.NewAPIError("[GET /dex/firehoses/{firehoseUrn}/alerts] getFirehoseAlerts", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -52,7 +52,7 @@ func NewGetFirehoseAlertsOK() *GetFirehoseAlertsOK { } /* -GetFirehoseAlertsOK describes a response with status code 200, with default header values. + GetFirehoseAlertsOK describes a response with status code 200, with default header values. alerts for given firehose URN. */ @@ -60,44 +60,9 @@ type GetFirehoseAlertsOK struct { Payload *models.AlertArray } -// IsSuccess returns true when this get firehose alerts o k response has a 2xx status code -func (o *GetFirehoseAlertsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get firehose alerts o k response has a 3xx status code -func (o *GetFirehoseAlertsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose alerts o k response has a 4xx status code -func (o *GetFirehoseAlertsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get firehose alerts o k response has a 5xx status code -func (o *GetFirehoseAlertsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get firehose alerts o k response a status code equal to that given -func (o *GetFirehoseAlertsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get firehose alerts o k response -func (o *GetFirehoseAlertsOK) Code() int { - return 200 -} - func (o *GetFirehoseAlertsOK) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/alerts][%d] getFirehoseAlertsOK %+v", 200, o.Payload) } - -func (o *GetFirehoseAlertsOK) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/alerts][%d] getFirehoseAlertsOK %+v", 200, o.Payload) -} - func (o *GetFirehoseAlertsOK) GetPayload() *models.AlertArray { return o.Payload } @@ -120,7 +85,7 @@ func NewGetFirehoseAlertsNotFound() *GetFirehoseAlertsNotFound { } /* -GetFirehoseAlertsNotFound describes a response with status code 404, with default header values. + GetFirehoseAlertsNotFound describes a response with status code 404, with default header values. Firehose with given URN was not found */ @@ -128,44 +93,9 @@ type GetFirehoseAlertsNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get firehose alerts not found response has a 2xx status code -func (o *GetFirehoseAlertsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get firehose alerts not found response has a 3xx status code -func (o *GetFirehoseAlertsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose alerts not found response has a 4xx status code -func (o *GetFirehoseAlertsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get firehose alerts not found response has a 5xx status code -func (o *GetFirehoseAlertsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get firehose alerts not found response a status code equal to that given -func (o *GetFirehoseAlertsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get firehose alerts not found response -func (o *GetFirehoseAlertsNotFound) Code() int { - return 404 -} - func (o *GetFirehoseAlertsNotFound) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/alerts][%d] getFirehoseAlertsNotFound %+v", 404, o.Payload) } - -func (o *GetFirehoseAlertsNotFound) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/alerts][%d] getFirehoseAlertsNotFound %+v", 404, o.Payload) -} - func (o *GetFirehoseAlertsNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -188,7 +118,7 @@ func NewGetFirehoseAlertsInternalServerError() *GetFirehoseAlertsInternalServerE } /* -GetFirehoseAlertsInternalServerError describes a response with status code 500, with default header values. + GetFirehoseAlertsInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -196,44 +126,9 @@ type GetFirehoseAlertsInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get firehose alerts internal server error response has a 2xx status code -func (o *GetFirehoseAlertsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get firehose alerts internal server error response has a 3xx status code -func (o *GetFirehoseAlertsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose alerts internal server error response has a 4xx status code -func (o *GetFirehoseAlertsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get firehose alerts internal server error response has a 5xx status code -func (o *GetFirehoseAlertsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get firehose alerts internal server error response a status code equal to that given -func (o *GetFirehoseAlertsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get firehose alerts internal server error response -func (o *GetFirehoseAlertsInternalServerError) Code() int { - return 500 -} - func (o *GetFirehoseAlertsInternalServerError) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/alerts][%d] getFirehoseAlertsInternalServerError %+v", 500, o.Payload) } - -func (o *GetFirehoseAlertsInternalServerError) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/alerts][%d] getFirehoseAlertsInternalServerError %+v", 500, o.Payload) -} - func (o *GetFirehoseAlertsInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/get_firehose_history_responses.go b/generated/client/operations/get_firehose_history_responses.go index 392b8bb9..0a62d029 100644 --- a/generated/client/operations/get_firehose_history_responses.go +++ b/generated/client/operations/get_firehose_history_responses.go @@ -42,7 +42,7 @@ func (o *GetFirehoseHistoryReader) ReadResponse(response runtime.ClientResponse, } return nil, result default: - return nil, runtime.NewAPIError("[GET /dex/firehoses/{firehoseUrn}/history] getFirehoseHistory", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -52,7 +52,7 @@ func NewGetFirehoseHistoryOK() *GetFirehoseHistoryOK { } /* -GetFirehoseHistoryOK describes a response with status code 200, with default header values. + GetFirehoseHistoryOK describes a response with status code 200, with default header values. History for given firehose URN. */ @@ -60,44 +60,9 @@ type GetFirehoseHistoryOK struct { Payload *models.HistoryResponse } -// IsSuccess returns true when this get firehose history o k response has a 2xx status code -func (o *GetFirehoseHistoryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get firehose history o k response has a 3xx status code -func (o *GetFirehoseHistoryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose history o k response has a 4xx status code -func (o *GetFirehoseHistoryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get firehose history o k response has a 5xx status code -func (o *GetFirehoseHistoryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get firehose history o k response a status code equal to that given -func (o *GetFirehoseHistoryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get firehose history o k response -func (o *GetFirehoseHistoryOK) Code() int { - return 200 -} - func (o *GetFirehoseHistoryOK) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/history][%d] getFirehoseHistoryOK %+v", 200, o.Payload) } - -func (o *GetFirehoseHistoryOK) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/history][%d] getFirehoseHistoryOK %+v", 200, o.Payload) -} - func (o *GetFirehoseHistoryOK) GetPayload() *models.HistoryResponse { return o.Payload } @@ -120,7 +85,7 @@ func NewGetFirehoseHistoryNotFound() *GetFirehoseHistoryNotFound { } /* -GetFirehoseHistoryNotFound describes a response with status code 404, with default header values. + GetFirehoseHistoryNotFound describes a response with status code 404, with default header values. Firehose with given URN was not found */ @@ -128,44 +93,9 @@ type GetFirehoseHistoryNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get firehose history not found response has a 2xx status code -func (o *GetFirehoseHistoryNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get firehose history not found response has a 3xx status code -func (o *GetFirehoseHistoryNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose history not found response has a 4xx status code -func (o *GetFirehoseHistoryNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get firehose history not found response has a 5xx status code -func (o *GetFirehoseHistoryNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get firehose history not found response a status code equal to that given -func (o *GetFirehoseHistoryNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get firehose history not found response -func (o *GetFirehoseHistoryNotFound) Code() int { - return 404 -} - func (o *GetFirehoseHistoryNotFound) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/history][%d] getFirehoseHistoryNotFound %+v", 404, o.Payload) } - -func (o *GetFirehoseHistoryNotFound) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/history][%d] getFirehoseHistoryNotFound %+v", 404, o.Payload) -} - func (o *GetFirehoseHistoryNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -188,7 +118,7 @@ func NewGetFirehoseHistoryInternalServerError() *GetFirehoseHistoryInternalServe } /* -GetFirehoseHistoryInternalServerError describes a response with status code 500, with default header values. + GetFirehoseHistoryInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -196,44 +126,9 @@ type GetFirehoseHistoryInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get firehose history internal server error response has a 2xx status code -func (o *GetFirehoseHistoryInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get firehose history internal server error response has a 3xx status code -func (o *GetFirehoseHistoryInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose history internal server error response has a 4xx status code -func (o *GetFirehoseHistoryInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get firehose history internal server error response has a 5xx status code -func (o *GetFirehoseHistoryInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get firehose history internal server error response a status code equal to that given -func (o *GetFirehoseHistoryInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get firehose history internal server error response -func (o *GetFirehoseHistoryInternalServerError) Code() int { - return 500 -} - func (o *GetFirehoseHistoryInternalServerError) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/history][%d] getFirehoseHistoryInternalServerError %+v", 500, o.Payload) } - -func (o *GetFirehoseHistoryInternalServerError) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/history][%d] getFirehoseHistoryInternalServerError %+v", 500, o.Payload) -} - func (o *GetFirehoseHistoryInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/get_firehose_logs_responses.go b/generated/client/operations/get_firehose_logs_responses.go index 56dbe5bc..714e1531 100644 --- a/generated/client/operations/get_firehose_logs_responses.go +++ b/generated/client/operations/get_firehose_logs_responses.go @@ -49,7 +49,7 @@ func (o *GetFirehoseLogsReader) ReadResponse(response runtime.ClientResponse, co } return nil, result default: - return nil, runtime.NewAPIError("[GET /dex/firehoses/{firehoseUrn}/logs] getFirehoseLogs", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -62,7 +62,7 @@ func NewGetFirehoseLogsOK(writer io.Writer) *GetFirehoseLogsOK { } /* -GetFirehoseLogsOK describes a response with status code 200, with default header values. + GetFirehoseLogsOK describes a response with status code 200, with default header values. Found logs for given firehose URN. */ @@ -70,44 +70,9 @@ type GetFirehoseLogsOK struct { Payload io.Writer } -// IsSuccess returns true when this get firehose logs o k response has a 2xx status code -func (o *GetFirehoseLogsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get firehose logs o k response has a 3xx status code -func (o *GetFirehoseLogsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose logs o k response has a 4xx status code -func (o *GetFirehoseLogsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get firehose logs o k response has a 5xx status code -func (o *GetFirehoseLogsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get firehose logs o k response a status code equal to that given -func (o *GetFirehoseLogsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get firehose logs o k response -func (o *GetFirehoseLogsOK) Code() int { - return 200 -} - func (o *GetFirehoseLogsOK) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/logs][%d] getFirehoseLogsOK %+v", 200, o.Payload) } - -func (o *GetFirehoseLogsOK) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/logs][%d] getFirehoseLogsOK %+v", 200, o.Payload) -} - func (o *GetFirehoseLogsOK) GetPayload() io.Writer { return o.Payload } @@ -128,7 +93,7 @@ func NewGetFirehoseLogsBadRequest() *GetFirehoseLogsBadRequest { } /* -GetFirehoseLogsBadRequest describes a response with status code 400, with default header values. + GetFirehoseLogsBadRequest describes a response with status code 400, with default header values. Get logs request is not valid. */ @@ -136,44 +101,9 @@ type GetFirehoseLogsBadRequest struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get firehose logs bad request response has a 2xx status code -func (o *GetFirehoseLogsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get firehose logs bad request response has a 3xx status code -func (o *GetFirehoseLogsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose logs bad request response has a 4xx status code -func (o *GetFirehoseLogsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get firehose logs bad request response has a 5xx status code -func (o *GetFirehoseLogsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get firehose logs bad request response a status code equal to that given -func (o *GetFirehoseLogsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get firehose logs bad request response -func (o *GetFirehoseLogsBadRequest) Code() int { - return 400 -} - func (o *GetFirehoseLogsBadRequest) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/logs][%d] getFirehoseLogsBadRequest %+v", 400, o.Payload) } - -func (o *GetFirehoseLogsBadRequest) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/logs][%d] getFirehoseLogsBadRequest %+v", 400, o.Payload) -} - func (o *GetFirehoseLogsBadRequest) GetPayload() *models.ErrorResponse { return o.Payload } @@ -196,7 +126,7 @@ func NewGetFirehoseLogsNotFound() *GetFirehoseLogsNotFound { } /* -GetFirehoseLogsNotFound describes a response with status code 404, with default header values. + GetFirehoseLogsNotFound describes a response with status code 404, with default header values. Firehose with given URN was not found */ @@ -204,44 +134,9 @@ type GetFirehoseLogsNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get firehose logs not found response has a 2xx status code -func (o *GetFirehoseLogsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get firehose logs not found response has a 3xx status code -func (o *GetFirehoseLogsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose logs not found response has a 4xx status code -func (o *GetFirehoseLogsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get firehose logs not found response has a 5xx status code -func (o *GetFirehoseLogsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get firehose logs not found response a status code equal to that given -func (o *GetFirehoseLogsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get firehose logs not found response -func (o *GetFirehoseLogsNotFound) Code() int { - return 404 -} - func (o *GetFirehoseLogsNotFound) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/logs][%d] getFirehoseLogsNotFound %+v", 404, o.Payload) } - -func (o *GetFirehoseLogsNotFound) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/logs][%d] getFirehoseLogsNotFound %+v", 404, o.Payload) -} - func (o *GetFirehoseLogsNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -264,7 +159,7 @@ func NewGetFirehoseLogsInternalServerError() *GetFirehoseLogsInternalServerError } /* -GetFirehoseLogsInternalServerError describes a response with status code 500, with default header values. + GetFirehoseLogsInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -272,44 +167,9 @@ type GetFirehoseLogsInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get firehose logs internal server error response has a 2xx status code -func (o *GetFirehoseLogsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get firehose logs internal server error response has a 3xx status code -func (o *GetFirehoseLogsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose logs internal server error response has a 4xx status code -func (o *GetFirehoseLogsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get firehose logs internal server error response has a 5xx status code -func (o *GetFirehoseLogsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get firehose logs internal server error response a status code equal to that given -func (o *GetFirehoseLogsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get firehose logs internal server error response -func (o *GetFirehoseLogsInternalServerError) Code() int { - return 500 -} - func (o *GetFirehoseLogsInternalServerError) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/logs][%d] getFirehoseLogsInternalServerError %+v", 500, o.Payload) } - -func (o *GetFirehoseLogsInternalServerError) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}/logs][%d] getFirehoseLogsInternalServerError %+v", 500, o.Payload) -} - func (o *GetFirehoseLogsInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/get_firehose_responses.go b/generated/client/operations/get_firehose_responses.go index 77479b01..879c5535 100644 --- a/generated/client/operations/get_firehose_responses.go +++ b/generated/client/operations/get_firehose_responses.go @@ -42,7 +42,7 @@ func (o *GetFirehoseReader) ReadResponse(response runtime.ClientResponse, consum } return nil, result default: - return nil, runtime.NewAPIError("[GET /dex/firehoses/{firehoseUrn}] getFirehose", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -52,7 +52,7 @@ func NewGetFirehoseOK() *GetFirehoseOK { } /* -GetFirehoseOK describes a response with status code 200, with default header values. + GetFirehoseOK describes a response with status code 200, with default header values. Found firehose with given URN */ @@ -60,44 +60,9 @@ type GetFirehoseOK struct { Payload *models.Firehose } -// IsSuccess returns true when this get firehose o k response has a 2xx status code -func (o *GetFirehoseOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get firehose o k response has a 3xx status code -func (o *GetFirehoseOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose o k response has a 4xx status code -func (o *GetFirehoseOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get firehose o k response has a 5xx status code -func (o *GetFirehoseOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get firehose o k response a status code equal to that given -func (o *GetFirehoseOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get firehose o k response -func (o *GetFirehoseOK) Code() int { - return 200 -} - func (o *GetFirehoseOK) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}][%d] getFirehoseOK %+v", 200, o.Payload) } - -func (o *GetFirehoseOK) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}][%d] getFirehoseOK %+v", 200, o.Payload) -} - func (o *GetFirehoseOK) GetPayload() *models.Firehose { return o.Payload } @@ -120,7 +85,7 @@ func NewGetFirehoseNotFound() *GetFirehoseNotFound { } /* -GetFirehoseNotFound describes a response with status code 404, with default header values. + GetFirehoseNotFound describes a response with status code 404, with default header values. Firehose with given URN was not found */ @@ -128,44 +93,9 @@ type GetFirehoseNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get firehose not found response has a 2xx status code -func (o *GetFirehoseNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get firehose not found response has a 3xx status code -func (o *GetFirehoseNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose not found response has a 4xx status code -func (o *GetFirehoseNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get firehose not found response has a 5xx status code -func (o *GetFirehoseNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get firehose not found response a status code equal to that given -func (o *GetFirehoseNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get firehose not found response -func (o *GetFirehoseNotFound) Code() int { - return 404 -} - func (o *GetFirehoseNotFound) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}][%d] getFirehoseNotFound %+v", 404, o.Payload) } - -func (o *GetFirehoseNotFound) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}][%d] getFirehoseNotFound %+v", 404, o.Payload) -} - func (o *GetFirehoseNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -188,7 +118,7 @@ func NewGetFirehoseInternalServerError() *GetFirehoseInternalServerError { } /* -GetFirehoseInternalServerError describes a response with status code 500, with default header values. + GetFirehoseInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -196,44 +126,9 @@ type GetFirehoseInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get firehose internal server error response has a 2xx status code -func (o *GetFirehoseInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get firehose internal server error response has a 3xx status code -func (o *GetFirehoseInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get firehose internal server error response has a 4xx status code -func (o *GetFirehoseInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get firehose internal server error response has a 5xx status code -func (o *GetFirehoseInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get firehose internal server error response a status code equal to that given -func (o *GetFirehoseInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get firehose internal server error response -func (o *GetFirehoseInternalServerError) Code() int { - return 500 -} - func (o *GetFirehoseInternalServerError) Error() string { return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}][%d] getFirehoseInternalServerError %+v", 500, o.Payload) } - -func (o *GetFirehoseInternalServerError) String() string { - return fmt.Sprintf("[GET /dex/firehoses/{firehoseUrn}][%d] getFirehoseInternalServerError %+v", 500, o.Payload) -} - func (o *GetFirehoseInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/get_group_alert_channels_responses.go b/generated/client/operations/get_group_alert_channels_responses.go index 6cf4180f..bb85e9b2 100644 --- a/generated/client/operations/get_group_alert_channels_responses.go +++ b/generated/client/operations/get_group_alert_channels_responses.go @@ -46,7 +46,7 @@ func (o *GetGroupAlertChannelsReader) ReadResponse(response runtime.ClientRespon } return nil, result default: - return nil, runtime.NewAPIError("[GET /dex/subscriptions/groups/{id}/alert_channels] getGroupAlertChannels", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -56,7 +56,7 @@ func NewGetGroupAlertChannelsOK() *GetGroupAlertChannelsOK { } /* -GetGroupAlertChannelsOK describes a response with status code 200, with default header values. + GetGroupAlertChannelsOK describes a response with status code 200, with default header values. Successful Operation. */ @@ -64,44 +64,9 @@ type GetGroupAlertChannelsOK struct { Payload *GetGroupAlertChannelsOKBody } -// IsSuccess returns true when this get group alert channels o k response has a 2xx status code -func (o *GetGroupAlertChannelsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get group alert channels o k response has a 3xx status code -func (o *GetGroupAlertChannelsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get group alert channels o k response has a 4xx status code -func (o *GetGroupAlertChannelsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get group alert channels o k response has a 5xx status code -func (o *GetGroupAlertChannelsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get group alert channels o k response a status code equal to that given -func (o *GetGroupAlertChannelsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get group alert channels o k response -func (o *GetGroupAlertChannelsOK) Code() int { - return 200 -} - func (o *GetGroupAlertChannelsOK) Error() string { return fmt.Sprintf("[GET /dex/subscriptions/groups/{id}/alert_channels][%d] getGroupAlertChannelsOK %+v", 200, o.Payload) } - -func (o *GetGroupAlertChannelsOK) String() string { - return fmt.Sprintf("[GET /dex/subscriptions/groups/{id}/alert_channels][%d] getGroupAlertChannelsOK %+v", 200, o.Payload) -} - func (o *GetGroupAlertChannelsOK) GetPayload() *GetGroupAlertChannelsOKBody { return o.Payload } @@ -124,7 +89,7 @@ func NewGetGroupAlertChannelsNotFound() *GetGroupAlertChannelsNotFound { } /* -GetGroupAlertChannelsNotFound describes a response with status code 404, with default header values. + GetGroupAlertChannelsNotFound describes a response with status code 404, with default header values. Group Not Found Error */ @@ -132,44 +97,9 @@ type GetGroupAlertChannelsNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get group alert channels not found response has a 2xx status code -func (o *GetGroupAlertChannelsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get group alert channels not found response has a 3xx status code -func (o *GetGroupAlertChannelsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get group alert channels not found response has a 4xx status code -func (o *GetGroupAlertChannelsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get group alert channels not found response has a 5xx status code -func (o *GetGroupAlertChannelsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get group alert channels not found response a status code equal to that given -func (o *GetGroupAlertChannelsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get group alert channels not found response -func (o *GetGroupAlertChannelsNotFound) Code() int { - return 404 -} - func (o *GetGroupAlertChannelsNotFound) Error() string { return fmt.Sprintf("[GET /dex/subscriptions/groups/{id}/alert_channels][%d] getGroupAlertChannelsNotFound %+v", 404, o.Payload) } - -func (o *GetGroupAlertChannelsNotFound) String() string { - return fmt.Sprintf("[GET /dex/subscriptions/groups/{id}/alert_channels][%d] getGroupAlertChannelsNotFound %+v", 404, o.Payload) -} - func (o *GetGroupAlertChannelsNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -192,7 +122,7 @@ func NewGetGroupAlertChannelsInternalServerError() *GetGroupAlertChannelsInterna } /* -GetGroupAlertChannelsInternalServerError describes a response with status code 500, with default header values. + GetGroupAlertChannelsInternalServerError describes a response with status code 500, with default header values. Internal Error */ @@ -200,44 +130,9 @@ type GetGroupAlertChannelsInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get group alert channels internal server error response has a 2xx status code -func (o *GetGroupAlertChannelsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get group alert channels internal server error response has a 3xx status code -func (o *GetGroupAlertChannelsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get group alert channels internal server error response has a 4xx status code -func (o *GetGroupAlertChannelsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get group alert channels internal server error response has a 5xx status code -func (o *GetGroupAlertChannelsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get group alert channels internal server error response a status code equal to that given -func (o *GetGroupAlertChannelsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get group alert channels internal server error response -func (o *GetGroupAlertChannelsInternalServerError) Code() int { - return 500 -} - func (o *GetGroupAlertChannelsInternalServerError) Error() string { return fmt.Sprintf("[GET /dex/subscriptions/groups/{id}/alert_channels][%d] getGroupAlertChannelsInternalServerError %+v", 500, o.Payload) } - -func (o *GetGroupAlertChannelsInternalServerError) String() string { - return fmt.Sprintf("[GET /dex/subscriptions/groups/{id}/alert_channels][%d] getGroupAlertChannelsInternalServerError %+v", 500, o.Payload) -} - func (o *GetGroupAlertChannelsInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } @@ -292,8 +187,6 @@ func (o *GetGroupAlertChannelsOKBody) validateAlertChannels(formats strfmt.Regis if err := o.AlertChannels[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("getGroupAlertChannelsOK" + "." + "alert_channels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getGroupAlertChannelsOK" + "." + "alert_channels" + "." + strconv.Itoa(i)) } return err } @@ -323,16 +216,9 @@ func (o *GetGroupAlertChannelsOKBody) contextValidateAlertChannels(ctx context.C for i := 0; i < len(o.AlertChannels); i++ { if o.AlertChannels[i] != nil { - - if swag.IsZero(o.AlertChannels[i]) { // not required - return nil - } - if err := o.AlertChannels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("getGroupAlertChannelsOK" + "." + "alert_channels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getGroupAlertChannelsOK" + "." + "alert_channels" + "." + strconv.Itoa(i)) } return err } diff --git a/generated/client/operations/get_optimus_job_responses.go b/generated/client/operations/get_optimus_job_responses.go index bec53e79..a256d604 100644 --- a/generated/client/operations/get_optimus_job_responses.go +++ b/generated/client/operations/get_optimus_job_responses.go @@ -36,7 +36,7 @@ func (o *GetOptimusJobReader) ReadResponse(response runtime.ClientResponse, cons } return nil, result default: - return nil, runtime.NewAPIError("[GET /dex/optimus/projects/{project}/jobs/{job}] getOptimusJob", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -46,7 +46,7 @@ func NewGetOptimusJobOK() *GetOptimusJobOK { } /* -GetOptimusJobOK describes a response with status code 200, with default header values. + GetOptimusJobOK describes a response with status code 200, with default header values. Success */ @@ -54,44 +54,9 @@ type GetOptimusJobOK struct { Payload interface{} } -// IsSuccess returns true when this get optimus job o k response has a 2xx status code -func (o *GetOptimusJobOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get optimus job o k response has a 3xx status code -func (o *GetOptimusJobOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get optimus job o k response has a 4xx status code -func (o *GetOptimusJobOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get optimus job o k response has a 5xx status code -func (o *GetOptimusJobOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get optimus job o k response a status code equal to that given -func (o *GetOptimusJobOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get optimus job o k response -func (o *GetOptimusJobOK) Code() int { - return 200 -} - func (o *GetOptimusJobOK) Error() string { return fmt.Sprintf("[GET /dex/optimus/projects/{project}/jobs/{job}][%d] getOptimusJobOK %+v", 200, o.Payload) } - -func (o *GetOptimusJobOK) String() string { - return fmt.Sprintf("[GET /dex/optimus/projects/{project}/jobs/{job}][%d] getOptimusJobOK %+v", 200, o.Payload) -} - func (o *GetOptimusJobOK) GetPayload() interface{} { return o.Payload } @@ -112,7 +77,7 @@ func NewGetOptimusJobInternalServerError() *GetOptimusJobInternalServerError { } /* -GetOptimusJobInternalServerError describes a response with status code 500, with default header values. + GetOptimusJobInternalServerError describes a response with status code 500, with default header values. Internal Error */ @@ -120,44 +85,9 @@ type GetOptimusJobInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get optimus job internal server error response has a 2xx status code -func (o *GetOptimusJobInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get optimus job internal server error response has a 3xx status code -func (o *GetOptimusJobInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get optimus job internal server error response has a 4xx status code -func (o *GetOptimusJobInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get optimus job internal server error response has a 5xx status code -func (o *GetOptimusJobInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get optimus job internal server error response a status code equal to that given -func (o *GetOptimusJobInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get optimus job internal server error response -func (o *GetOptimusJobInternalServerError) Code() int { - return 500 -} - func (o *GetOptimusJobInternalServerError) Error() string { return fmt.Sprintf("[GET /dex/optimus/projects/{project}/jobs/{job}][%d] getOptimusJobInternalServerError %+v", 500, o.Payload) } - -func (o *GetOptimusJobInternalServerError) String() string { - return fmt.Sprintf("[GET /dex/optimus/projects/{project}/jobs/{job}][%d] getOptimusJobInternalServerError %+v", 500, o.Payload) -} - func (o *GetOptimusJobInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/get_project_by_slug_responses.go b/generated/client/operations/get_project_by_slug_responses.go index e421faa0..e2540a32 100644 --- a/generated/client/operations/get_project_by_slug_responses.go +++ b/generated/client/operations/get_project_by_slug_responses.go @@ -42,7 +42,7 @@ func (o *GetProjectBySlugReader) ReadResponse(response runtime.ClientResponse, c } return nil, result default: - return nil, runtime.NewAPIError("[GET /dex/projects/{slug}] getProjectBySlug", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -52,7 +52,7 @@ func NewGetProjectBySlugOK() *GetProjectBySlugOK { } /* -GetProjectBySlugOK describes a response with status code 200, with default header values. + GetProjectBySlugOK describes a response with status code 200, with default header values. successful operation */ @@ -60,44 +60,9 @@ type GetProjectBySlugOK struct { Payload *models.Project } -// IsSuccess returns true when this get project by slug o k response has a 2xx status code -func (o *GetProjectBySlugOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get project by slug o k response has a 3xx status code -func (o *GetProjectBySlugOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get project by slug o k response has a 4xx status code -func (o *GetProjectBySlugOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get project by slug o k response has a 5xx status code -func (o *GetProjectBySlugOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get project by slug o k response a status code equal to that given -func (o *GetProjectBySlugOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get project by slug o k response -func (o *GetProjectBySlugOK) Code() int { - return 200 -} - func (o *GetProjectBySlugOK) Error() string { return fmt.Sprintf("[GET /dex/projects/{slug}][%d] getProjectBySlugOK %+v", 200, o.Payload) } - -func (o *GetProjectBySlugOK) String() string { - return fmt.Sprintf("[GET /dex/projects/{slug}][%d] getProjectBySlugOK %+v", 200, o.Payload) -} - func (o *GetProjectBySlugOK) GetPayload() *models.Project { return o.Payload } @@ -120,7 +85,7 @@ func NewGetProjectBySlugNotFound() *GetProjectBySlugNotFound { } /* -GetProjectBySlugNotFound describes a response with status code 404, with default header values. + GetProjectBySlugNotFound describes a response with status code 404, with default header values. project not found */ @@ -128,44 +93,9 @@ type GetProjectBySlugNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get project by slug not found response has a 2xx status code -func (o *GetProjectBySlugNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get project by slug not found response has a 3xx status code -func (o *GetProjectBySlugNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get project by slug not found response has a 4xx status code -func (o *GetProjectBySlugNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get project by slug not found response has a 5xx status code -func (o *GetProjectBySlugNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get project by slug not found response a status code equal to that given -func (o *GetProjectBySlugNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get project by slug not found response -func (o *GetProjectBySlugNotFound) Code() int { - return 404 -} - func (o *GetProjectBySlugNotFound) Error() string { return fmt.Sprintf("[GET /dex/projects/{slug}][%d] getProjectBySlugNotFound %+v", 404, o.Payload) } - -func (o *GetProjectBySlugNotFound) String() string { - return fmt.Sprintf("[GET /dex/projects/{slug}][%d] getProjectBySlugNotFound %+v", 404, o.Payload) -} - func (o *GetProjectBySlugNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -188,7 +118,7 @@ func NewGetProjectBySlugInternalServerError() *GetProjectBySlugInternalServerErr } /* -GetProjectBySlugInternalServerError describes a response with status code 500, with default header values. + GetProjectBySlugInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -196,44 +126,9 @@ type GetProjectBySlugInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get project by slug internal server error response has a 2xx status code -func (o *GetProjectBySlugInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get project by slug internal server error response has a 3xx status code -func (o *GetProjectBySlugInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get project by slug internal server error response has a 4xx status code -func (o *GetProjectBySlugInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get project by slug internal server error response has a 5xx status code -func (o *GetProjectBySlugInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get project by slug internal server error response a status code equal to that given -func (o *GetProjectBySlugInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get project by slug internal server error response -func (o *GetProjectBySlugInternalServerError) Code() int { - return 500 -} - func (o *GetProjectBySlugInternalServerError) Error() string { return fmt.Sprintf("[GET /dex/projects/{slug}][%d] getProjectBySlugInternalServerError %+v", 500, o.Payload) } - -func (o *GetProjectBySlugInternalServerError) String() string { - return fmt.Sprintf("[GET /dex/projects/{slug}][%d] getProjectBySlugInternalServerError %+v", 500, o.Payload) -} - func (o *GetProjectBySlugInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/get_subscription_list_responses.go b/generated/client/operations/get_subscription_list_responses.go index 487e057e..18dfd2f8 100644 --- a/generated/client/operations/get_subscription_list_responses.go +++ b/generated/client/operations/get_subscription_list_responses.go @@ -46,7 +46,7 @@ func (o *GetSubscriptionListReader) ReadResponse(response runtime.ClientResponse } return nil, result default: - return nil, runtime.NewAPIError("[GET /dex/subscriptions] getSubscriptionList", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -56,7 +56,7 @@ func NewGetSubscriptionListOK() *GetSubscriptionListOK { } /* -GetSubscriptionListOK describes a response with status code 200, with default header values. + GetSubscriptionListOK describes a response with status code 200, with default header values. Successful Operation. */ @@ -64,44 +64,9 @@ type GetSubscriptionListOK struct { Payload *GetSubscriptionListOKBody } -// IsSuccess returns true when this get subscription list o k response has a 2xx status code -func (o *GetSubscriptionListOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get subscription list o k response has a 3xx status code -func (o *GetSubscriptionListOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get subscription list o k response has a 4xx status code -func (o *GetSubscriptionListOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get subscription list o k response has a 5xx status code -func (o *GetSubscriptionListOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get subscription list o k response a status code equal to that given -func (o *GetSubscriptionListOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get subscription list o k response -func (o *GetSubscriptionListOK) Code() int { - return 200 -} - func (o *GetSubscriptionListOK) Error() string { return fmt.Sprintf("[GET /dex/subscriptions][%d] getSubscriptionListOK %+v", 200, o.Payload) } - -func (o *GetSubscriptionListOK) String() string { - return fmt.Sprintf("[GET /dex/subscriptions][%d] getSubscriptionListOK %+v", 200, o.Payload) -} - func (o *GetSubscriptionListOK) GetPayload() *GetSubscriptionListOKBody { return o.Payload } @@ -124,7 +89,7 @@ func NewGetSubscriptionListBadRequest() *GetSubscriptionListBadRequest { } /* -GetSubscriptionListBadRequest describes a response with status code 400, with default header values. + GetSubscriptionListBadRequest describes a response with status code 400, with default header values. Validation Error */ @@ -132,44 +97,9 @@ type GetSubscriptionListBadRequest struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get subscription list bad request response has a 2xx status code -func (o *GetSubscriptionListBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get subscription list bad request response has a 3xx status code -func (o *GetSubscriptionListBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get subscription list bad request response has a 4xx status code -func (o *GetSubscriptionListBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get subscription list bad request response has a 5xx status code -func (o *GetSubscriptionListBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get subscription list bad request response a status code equal to that given -func (o *GetSubscriptionListBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get subscription list bad request response -func (o *GetSubscriptionListBadRequest) Code() int { - return 400 -} - func (o *GetSubscriptionListBadRequest) Error() string { return fmt.Sprintf("[GET /dex/subscriptions][%d] getSubscriptionListBadRequest %+v", 400, o.Payload) } - -func (o *GetSubscriptionListBadRequest) String() string { - return fmt.Sprintf("[GET /dex/subscriptions][%d] getSubscriptionListBadRequest %+v", 400, o.Payload) -} - func (o *GetSubscriptionListBadRequest) GetPayload() *models.ErrorResponse { return o.Payload } @@ -192,7 +122,7 @@ func NewGetSubscriptionListInternalServerError() *GetSubscriptionListInternalSer } /* -GetSubscriptionListInternalServerError describes a response with status code 500, with default header values. + GetSubscriptionListInternalServerError describes a response with status code 500, with default header values. Internal Error */ @@ -200,44 +130,9 @@ type GetSubscriptionListInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this get subscription list internal server error response has a 2xx status code -func (o *GetSubscriptionListInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get subscription list internal server error response has a 3xx status code -func (o *GetSubscriptionListInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get subscription list internal server error response has a 4xx status code -func (o *GetSubscriptionListInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get subscription list internal server error response has a 5xx status code -func (o *GetSubscriptionListInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get subscription list internal server error response a status code equal to that given -func (o *GetSubscriptionListInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get subscription list internal server error response -func (o *GetSubscriptionListInternalServerError) Code() int { - return 500 -} - func (o *GetSubscriptionListInternalServerError) Error() string { return fmt.Sprintf("[GET /dex/subscriptions][%d] getSubscriptionListInternalServerError %+v", 500, o.Payload) } - -func (o *GetSubscriptionListInternalServerError) String() string { - return fmt.Sprintf("[GET /dex/subscriptions][%d] getSubscriptionListInternalServerError %+v", 500, o.Payload) -} - func (o *GetSubscriptionListInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } @@ -292,8 +187,6 @@ func (o *GetSubscriptionListOKBody) validateSubscriptions(formats strfmt.Registr if err := o.Subscriptions[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("getSubscriptionListOK" + "." + "subscriptions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getSubscriptionListOK" + "." + "subscriptions" + "." + strconv.Itoa(i)) } return err } @@ -323,16 +216,9 @@ func (o *GetSubscriptionListOKBody) contextValidateSubscriptions(ctx context.Con for i := 0; i < len(o.Subscriptions); i++ { if o.Subscriptions[i] != nil { - - if swag.IsZero(o.Subscriptions[i]) { // not required - return nil - } - if err := o.Subscriptions[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("getSubscriptionListOK" + "." + "subscriptions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getSubscriptionListOK" + "." + "subscriptions" + "." + strconv.Itoa(i)) } return err } diff --git a/generated/client/operations/list_alert_templates_responses.go b/generated/client/operations/list_alert_templates_responses.go index b5d62027..6b0fc5d1 100644 --- a/generated/client/operations/list_alert_templates_responses.go +++ b/generated/client/operations/list_alert_templates_responses.go @@ -36,7 +36,7 @@ func (o *ListAlertTemplatesReader) ReadResponse(response runtime.ClientResponse, } return nil, result default: - return nil, runtime.NewAPIError("[GET /dex/alertTemplates] listAlertTemplates", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -46,7 +46,7 @@ func NewListAlertTemplatesOK() *ListAlertTemplatesOK { } /* -ListAlertTemplatesOK describes a response with status code 200, with default header values. + ListAlertTemplatesOK describes a response with status code 200, with default header values. successful operation */ @@ -54,44 +54,9 @@ type ListAlertTemplatesOK struct { Payload *models.AlertTemplatesArray } -// IsSuccess returns true when this list alert templates o k response has a 2xx status code -func (o *ListAlertTemplatesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list alert templates o k response has a 3xx status code -func (o *ListAlertTemplatesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list alert templates o k response has a 4xx status code -func (o *ListAlertTemplatesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list alert templates o k response has a 5xx status code -func (o *ListAlertTemplatesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list alert templates o k response a status code equal to that given -func (o *ListAlertTemplatesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list alert templates o k response -func (o *ListAlertTemplatesOK) Code() int { - return 200 -} - func (o *ListAlertTemplatesOK) Error() string { return fmt.Sprintf("[GET /dex/alertTemplates][%d] listAlertTemplatesOK %+v", 200, o.Payload) } - -func (o *ListAlertTemplatesOK) String() string { - return fmt.Sprintf("[GET /dex/alertTemplates][%d] listAlertTemplatesOK %+v", 200, o.Payload) -} - func (o *ListAlertTemplatesOK) GetPayload() *models.AlertTemplatesArray { return o.Payload } @@ -114,7 +79,7 @@ func NewListAlertTemplatesInternalServerError() *ListAlertTemplatesInternalServe } /* -ListAlertTemplatesInternalServerError describes a response with status code 500, with default header values. + ListAlertTemplatesInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -122,44 +87,9 @@ type ListAlertTemplatesInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this list alert templates internal server error response has a 2xx status code -func (o *ListAlertTemplatesInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this list alert templates internal server error response has a 3xx status code -func (o *ListAlertTemplatesInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list alert templates internal server error response has a 4xx status code -func (o *ListAlertTemplatesInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this list alert templates internal server error response has a 5xx status code -func (o *ListAlertTemplatesInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this list alert templates internal server error response a status code equal to that given -func (o *ListAlertTemplatesInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the list alert templates internal server error response -func (o *ListAlertTemplatesInternalServerError) Code() int { - return 500 -} - func (o *ListAlertTemplatesInternalServerError) Error() string { return fmt.Sprintf("[GET /dex/alertTemplates][%d] listAlertTemplatesInternalServerError %+v", 500, o.Payload) } - -func (o *ListAlertTemplatesInternalServerError) String() string { - return fmt.Sprintf("[GET /dex/alertTemplates][%d] listAlertTemplatesInternalServerError %+v", 500, o.Payload) -} - func (o *ListAlertTemplatesInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/list_firehoses_responses.go b/generated/client/operations/list_firehoses_responses.go index bb41f1e5..665a9624 100644 --- a/generated/client/operations/list_firehoses_responses.go +++ b/generated/client/operations/list_firehoses_responses.go @@ -36,7 +36,7 @@ func (o *ListFirehosesReader) ReadResponse(response runtime.ClientResponse, cons } return nil, result default: - return nil, runtime.NewAPIError("[GET /dex/firehoses] listFirehoses", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -46,7 +46,7 @@ func NewListFirehosesOK() *ListFirehosesOK { } /* -ListFirehosesOK describes a response with status code 200, with default header values. + ListFirehosesOK describes a response with status code 200, with default header values. successful operation */ @@ -54,44 +54,9 @@ type ListFirehosesOK struct { Payload *models.FirehoseArray } -// IsSuccess returns true when this list firehoses o k response has a 2xx status code -func (o *ListFirehosesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list firehoses o k response has a 3xx status code -func (o *ListFirehosesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list firehoses o k response has a 4xx status code -func (o *ListFirehosesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list firehoses o k response has a 5xx status code -func (o *ListFirehosesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list firehoses o k response a status code equal to that given -func (o *ListFirehosesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list firehoses o k response -func (o *ListFirehosesOK) Code() int { - return 200 -} - func (o *ListFirehosesOK) Error() string { return fmt.Sprintf("[GET /dex/firehoses][%d] listFirehosesOK %+v", 200, o.Payload) } - -func (o *ListFirehosesOK) String() string { - return fmt.Sprintf("[GET /dex/firehoses][%d] listFirehosesOK %+v", 200, o.Payload) -} - func (o *ListFirehosesOK) GetPayload() *models.FirehoseArray { return o.Payload } @@ -114,7 +79,7 @@ func NewListFirehosesInternalServerError() *ListFirehosesInternalServerError { } /* -ListFirehosesInternalServerError describes a response with status code 500, with default header values. + ListFirehosesInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -122,44 +87,9 @@ type ListFirehosesInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this list firehoses internal server error response has a 2xx status code -func (o *ListFirehosesInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this list firehoses internal server error response has a 3xx status code -func (o *ListFirehosesInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list firehoses internal server error response has a 4xx status code -func (o *ListFirehosesInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this list firehoses internal server error response has a 5xx status code -func (o *ListFirehosesInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this list firehoses internal server error response a status code equal to that given -func (o *ListFirehosesInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the list firehoses internal server error response -func (o *ListFirehosesInternalServerError) Code() int { - return 500 -} - func (o *ListFirehosesInternalServerError) Error() string { return fmt.Sprintf("[GET /dex/firehoses][%d] listFirehosesInternalServerError %+v", 500, o.Payload) } - -func (o *ListFirehosesInternalServerError) String() string { - return fmt.Sprintf("[GET /dex/firehoses][%d] listFirehosesInternalServerError %+v", 500, o.Payload) -} - func (o *ListFirehosesInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/list_kubernetes_responses.go b/generated/client/operations/list_kubernetes_responses.go index 274a9f11..88b2fec1 100644 --- a/generated/client/operations/list_kubernetes_responses.go +++ b/generated/client/operations/list_kubernetes_responses.go @@ -36,7 +36,7 @@ func (o *ListKubernetesReader) ReadResponse(response runtime.ClientResponse, con } return nil, result default: - return nil, runtime.NewAPIError("[GET /dex/kubernetes] listKubernetes", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -46,7 +46,7 @@ func NewListKubernetesOK() *ListKubernetesOK { } /* -ListKubernetesOK describes a response with status code 200, with default header values. + ListKubernetesOK describes a response with status code 200, with default header values. Successful Operation. */ @@ -54,44 +54,9 @@ type ListKubernetesOK struct { Payload *models.KubernetesArray } -// IsSuccess returns true when this list kubernetes o k response has a 2xx status code -func (o *ListKubernetesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list kubernetes o k response has a 3xx status code -func (o *ListKubernetesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list kubernetes o k response has a 4xx status code -func (o *ListKubernetesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list kubernetes o k response has a 5xx status code -func (o *ListKubernetesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list kubernetes o k response a status code equal to that given -func (o *ListKubernetesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list kubernetes o k response -func (o *ListKubernetesOK) Code() int { - return 200 -} - func (o *ListKubernetesOK) Error() string { return fmt.Sprintf("[GET /dex/kubernetes][%d] listKubernetesOK %+v", 200, o.Payload) } - -func (o *ListKubernetesOK) String() string { - return fmt.Sprintf("[GET /dex/kubernetes][%d] listKubernetesOK %+v", 200, o.Payload) -} - func (o *ListKubernetesOK) GetPayload() *models.KubernetesArray { return o.Payload } @@ -114,7 +79,7 @@ func NewListKubernetesInternalServerError() *ListKubernetesInternalServerError { } /* -ListKubernetesInternalServerError describes a response with status code 500, with default header values. + ListKubernetesInternalServerError describes a response with status code 500, with default header values. Internal Error */ @@ -122,44 +87,9 @@ type ListKubernetesInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this list kubernetes internal server error response has a 2xx status code -func (o *ListKubernetesInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this list kubernetes internal server error response has a 3xx status code -func (o *ListKubernetesInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list kubernetes internal server error response has a 4xx status code -func (o *ListKubernetesInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this list kubernetes internal server error response has a 5xx status code -func (o *ListKubernetesInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this list kubernetes internal server error response a status code equal to that given -func (o *ListKubernetesInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the list kubernetes internal server error response -func (o *ListKubernetesInternalServerError) Code() int { - return 500 -} - func (o *ListKubernetesInternalServerError) Error() string { return fmt.Sprintf("[GET /dex/kubernetes][%d] listKubernetesInternalServerError %+v", 500, o.Payload) } - -func (o *ListKubernetesInternalServerError) String() string { - return fmt.Sprintf("[GET /dex/kubernetes][%d] listKubernetesInternalServerError %+v", 500, o.Payload) -} - func (o *ListKubernetesInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/list_projects_responses.go b/generated/client/operations/list_projects_responses.go index 855972af..5d9ef6ed 100644 --- a/generated/client/operations/list_projects_responses.go +++ b/generated/client/operations/list_projects_responses.go @@ -36,7 +36,7 @@ func (o *ListProjectsReader) ReadResponse(response runtime.ClientResponse, consu } return nil, result default: - return nil, runtime.NewAPIError("[GET /dex/projects] listProjects", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -46,7 +46,7 @@ func NewListProjectsOK() *ListProjectsOK { } /* -ListProjectsOK describes a response with status code 200, with default header values. + ListProjectsOK describes a response with status code 200, with default header values. successful operation */ @@ -54,44 +54,9 @@ type ListProjectsOK struct { Payload *models.ProjectArray } -// IsSuccess returns true when this list projects o k response has a 2xx status code -func (o *ListProjectsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list projects o k response has a 3xx status code -func (o *ListProjectsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list projects o k response has a 4xx status code -func (o *ListProjectsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list projects o k response has a 5xx status code -func (o *ListProjectsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list projects o k response a status code equal to that given -func (o *ListProjectsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list projects o k response -func (o *ListProjectsOK) Code() int { - return 200 -} - func (o *ListProjectsOK) Error() string { return fmt.Sprintf("[GET /dex/projects][%d] listProjectsOK %+v", 200, o.Payload) } - -func (o *ListProjectsOK) String() string { - return fmt.Sprintf("[GET /dex/projects][%d] listProjectsOK %+v", 200, o.Payload) -} - func (o *ListProjectsOK) GetPayload() *models.ProjectArray { return o.Payload } @@ -114,7 +79,7 @@ func NewListProjectsInternalServerError() *ListProjectsInternalServerError { } /* -ListProjectsInternalServerError describes a response with status code 500, with default header values. + ListProjectsInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -122,44 +87,9 @@ type ListProjectsInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this list projects internal server error response has a 2xx status code -func (o *ListProjectsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this list projects internal server error response has a 3xx status code -func (o *ListProjectsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list projects internal server error response has a 4xx status code -func (o *ListProjectsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this list projects internal server error response has a 5xx status code -func (o *ListProjectsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this list projects internal server error response a status code equal to that given -func (o *ListProjectsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the list projects internal server error response -func (o *ListProjectsInternalServerError) Code() int { - return 500 -} - func (o *ListProjectsInternalServerError) Error() string { return fmt.Sprintf("[GET /dex/projects][%d] listProjectsInternalServerError %+v", 500, o.Payload) } - -func (o *ListProjectsInternalServerError) String() string { - return fmt.Sprintf("[GET /dex/projects][%d] listProjectsInternalServerError %+v", 500, o.Payload) -} - func (o *ListProjectsInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/new_alert_subscription_responses.go b/generated/client/operations/new_alert_subscription_responses.go index 6b034630..3500abb4 100644 --- a/generated/client/operations/new_alert_subscription_responses.go +++ b/generated/client/operations/new_alert_subscription_responses.go @@ -57,7 +57,7 @@ func (o *NewAlertSubscriptionReader) ReadResponse(response runtime.ClientRespons } return nil, result default: - return nil, runtime.NewAPIError("[POST /dex/subscriptions] newAlertSubscription", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -67,7 +67,7 @@ func NewNewAlertSubscriptionCreated() *NewAlertSubscriptionCreated { } /* -NewAlertSubscriptionCreated describes a response with status code 201, with default header values. + NewAlertSubscriptionCreated describes a response with status code 201, with default header values. Successful Operation. */ @@ -75,44 +75,9 @@ type NewAlertSubscriptionCreated struct { Payload *NewAlertSubscriptionCreatedBody } -// IsSuccess returns true when this new alert subscription created response has a 2xx status code -func (o *NewAlertSubscriptionCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this new alert subscription created response has a 3xx status code -func (o *NewAlertSubscriptionCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this new alert subscription created response has a 4xx status code -func (o *NewAlertSubscriptionCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this new alert subscription created response has a 5xx status code -func (o *NewAlertSubscriptionCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this new alert subscription created response a status code equal to that given -func (o *NewAlertSubscriptionCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the new alert subscription created response -func (o *NewAlertSubscriptionCreated) Code() int { - return 201 -} - func (o *NewAlertSubscriptionCreated) Error() string { return fmt.Sprintf("[POST /dex/subscriptions][%d] newAlertSubscriptionCreated %+v", 201, o.Payload) } - -func (o *NewAlertSubscriptionCreated) String() string { - return fmt.Sprintf("[POST /dex/subscriptions][%d] newAlertSubscriptionCreated %+v", 201, o.Payload) -} - func (o *NewAlertSubscriptionCreated) GetPayload() *NewAlertSubscriptionCreatedBody { return o.Payload } @@ -135,7 +100,7 @@ func NewNewAlertSubscriptionBadRequest() *NewAlertSubscriptionBadRequest { } /* -NewAlertSubscriptionBadRequest describes a response with status code 400, with default header values. + NewAlertSubscriptionBadRequest describes a response with status code 400, with default header values. Validation Error */ @@ -143,44 +108,9 @@ type NewAlertSubscriptionBadRequest struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this new alert subscription bad request response has a 2xx status code -func (o *NewAlertSubscriptionBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this new alert subscription bad request response has a 3xx status code -func (o *NewAlertSubscriptionBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this new alert subscription bad request response has a 4xx status code -func (o *NewAlertSubscriptionBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this new alert subscription bad request response has a 5xx status code -func (o *NewAlertSubscriptionBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this new alert subscription bad request response a status code equal to that given -func (o *NewAlertSubscriptionBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the new alert subscription bad request response -func (o *NewAlertSubscriptionBadRequest) Code() int { - return 400 -} - func (o *NewAlertSubscriptionBadRequest) Error() string { return fmt.Sprintf("[POST /dex/subscriptions][%d] newAlertSubscriptionBadRequest %+v", 400, o.Payload) } - -func (o *NewAlertSubscriptionBadRequest) String() string { - return fmt.Sprintf("[POST /dex/subscriptions][%d] newAlertSubscriptionBadRequest %+v", 400, o.Payload) -} - func (o *NewAlertSubscriptionBadRequest) GetPayload() *models.ErrorResponse { return o.Payload } @@ -203,7 +133,7 @@ func NewNewAlertSubscriptionConflict() *NewAlertSubscriptionConflict { } /* -NewAlertSubscriptionConflict describes a response with status code 409, with default header values. + NewAlertSubscriptionConflict describes a response with status code 409, with default header values. Duplicate subscription */ @@ -211,44 +141,9 @@ type NewAlertSubscriptionConflict struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this new alert subscription conflict response has a 2xx status code -func (o *NewAlertSubscriptionConflict) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this new alert subscription conflict response has a 3xx status code -func (o *NewAlertSubscriptionConflict) IsRedirect() bool { - return false -} - -// IsClientError returns true when this new alert subscription conflict response has a 4xx status code -func (o *NewAlertSubscriptionConflict) IsClientError() bool { - return true -} - -// IsServerError returns true when this new alert subscription conflict response has a 5xx status code -func (o *NewAlertSubscriptionConflict) IsServerError() bool { - return false -} - -// IsCode returns true when this new alert subscription conflict response a status code equal to that given -func (o *NewAlertSubscriptionConflict) IsCode(code int) bool { - return code == 409 -} - -// Code gets the status code for the new alert subscription conflict response -func (o *NewAlertSubscriptionConflict) Code() int { - return 409 -} - func (o *NewAlertSubscriptionConflict) Error() string { return fmt.Sprintf("[POST /dex/subscriptions][%d] newAlertSubscriptionConflict %+v", 409, o.Payload) } - -func (o *NewAlertSubscriptionConflict) String() string { - return fmt.Sprintf("[POST /dex/subscriptions][%d] newAlertSubscriptionConflict %+v", 409, o.Payload) -} - func (o *NewAlertSubscriptionConflict) GetPayload() *models.ErrorResponse { return o.Payload } @@ -271,7 +166,7 @@ func NewNewAlertSubscriptionUnprocessableEntity() *NewAlertSubscriptionUnprocess } /* -NewAlertSubscriptionUnprocessableEntity describes a response with status code 422, with default header values. + NewAlertSubscriptionUnprocessableEntity describes a response with status code 422, with default header values. Missing namespace and slack channel in shield */ @@ -279,44 +174,9 @@ type NewAlertSubscriptionUnprocessableEntity struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this new alert subscription unprocessable entity response has a 2xx status code -func (o *NewAlertSubscriptionUnprocessableEntity) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this new alert subscription unprocessable entity response has a 3xx status code -func (o *NewAlertSubscriptionUnprocessableEntity) IsRedirect() bool { - return false -} - -// IsClientError returns true when this new alert subscription unprocessable entity response has a 4xx status code -func (o *NewAlertSubscriptionUnprocessableEntity) IsClientError() bool { - return true -} - -// IsServerError returns true when this new alert subscription unprocessable entity response has a 5xx status code -func (o *NewAlertSubscriptionUnprocessableEntity) IsServerError() bool { - return false -} - -// IsCode returns true when this new alert subscription unprocessable entity response a status code equal to that given -func (o *NewAlertSubscriptionUnprocessableEntity) IsCode(code int) bool { - return code == 422 -} - -// Code gets the status code for the new alert subscription unprocessable entity response -func (o *NewAlertSubscriptionUnprocessableEntity) Code() int { - return 422 -} - func (o *NewAlertSubscriptionUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /dex/subscriptions][%d] newAlertSubscriptionUnprocessableEntity %+v", 422, o.Payload) } - -func (o *NewAlertSubscriptionUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /dex/subscriptions][%d] newAlertSubscriptionUnprocessableEntity %+v", 422, o.Payload) -} - func (o *NewAlertSubscriptionUnprocessableEntity) GetPayload() *models.ErrorResponse { return o.Payload } @@ -339,7 +199,7 @@ func NewNewAlertSubscriptionInternalServerError() *NewAlertSubscriptionInternalS } /* -NewAlertSubscriptionInternalServerError describes a response with status code 500, with default header values. + NewAlertSubscriptionInternalServerError describes a response with status code 500, with default header values. Internal Error */ @@ -347,44 +207,9 @@ type NewAlertSubscriptionInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this new alert subscription internal server error response has a 2xx status code -func (o *NewAlertSubscriptionInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this new alert subscription internal server error response has a 3xx status code -func (o *NewAlertSubscriptionInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this new alert subscription internal server error response has a 4xx status code -func (o *NewAlertSubscriptionInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this new alert subscription internal server error response has a 5xx status code -func (o *NewAlertSubscriptionInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this new alert subscription internal server error response a status code equal to that given -func (o *NewAlertSubscriptionInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the new alert subscription internal server error response -func (o *NewAlertSubscriptionInternalServerError) Code() int { - return 500 -} - func (o *NewAlertSubscriptionInternalServerError) Error() string { return fmt.Sprintf("[POST /dex/subscriptions][%d] newAlertSubscriptionInternalServerError %+v", 500, o.Payload) } - -func (o *NewAlertSubscriptionInternalServerError) String() string { - return fmt.Sprintf("[POST /dex/subscriptions][%d] newAlertSubscriptionInternalServerError %+v", 500, o.Payload) -} - func (o *NewAlertSubscriptionInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } @@ -434,8 +259,6 @@ func (o *NewAlertSubscriptionCreatedBody) validateSubscription(formats strfmt.Re if err := o.Subscription.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("newAlertSubscriptionCreated" + "." + "subscription") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newAlertSubscriptionCreated" + "." + "subscription") } return err } @@ -461,16 +284,9 @@ func (o *NewAlertSubscriptionCreatedBody) ContextValidate(ctx context.Context, f func (o *NewAlertSubscriptionCreatedBody) contextValidateSubscription(ctx context.Context, formats strfmt.Registry) error { if o.Subscription != nil { - - if swag.IsZero(o.Subscription) { // not required - return nil - } - if err := o.Subscription.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("newAlertSubscriptionCreated" + "." + "subscription") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newAlertSubscriptionCreated" + "." + "subscription") } return err } diff --git a/generated/client/operations/partial_update_firehose_responses.go b/generated/client/operations/partial_update_firehose_responses.go index 2bc97f43..24232a1f 100644 --- a/generated/client/operations/partial_update_firehose_responses.go +++ b/generated/client/operations/partial_update_firehose_responses.go @@ -51,7 +51,7 @@ func (o *PartialUpdateFirehoseReader) ReadResponse(response runtime.ClientRespon } return nil, result default: - return nil, runtime.NewAPIError("[PATCH /dex/firehoses/{firehoseUrn}] partialUpdateFirehose", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -61,7 +61,7 @@ func NewPartialUpdateFirehoseOK() *PartialUpdateFirehoseOK { } /* -PartialUpdateFirehoseOK describes a response with status code 200, with default header values. + PartialUpdateFirehoseOK describes a response with status code 200, with default header values. Found firehose with given URN */ @@ -69,44 +69,9 @@ type PartialUpdateFirehoseOK struct { Payload *models.Firehose } -// IsSuccess returns true when this partial update firehose o k response has a 2xx status code -func (o *PartialUpdateFirehoseOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this partial update firehose o k response has a 3xx status code -func (o *PartialUpdateFirehoseOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this partial update firehose o k response has a 4xx status code -func (o *PartialUpdateFirehoseOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this partial update firehose o k response has a 5xx status code -func (o *PartialUpdateFirehoseOK) IsServerError() bool { - return false -} - -// IsCode returns true when this partial update firehose o k response a status code equal to that given -func (o *PartialUpdateFirehoseOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the partial update firehose o k response -func (o *PartialUpdateFirehoseOK) Code() int { - return 200 -} - func (o *PartialUpdateFirehoseOK) Error() string { return fmt.Sprintf("[PATCH /dex/firehoses/{firehoseUrn}][%d] partialUpdateFirehoseOK %+v", 200, o.Payload) } - -func (o *PartialUpdateFirehoseOK) String() string { - return fmt.Sprintf("[PATCH /dex/firehoses/{firehoseUrn}][%d] partialUpdateFirehoseOK %+v", 200, o.Payload) -} - func (o *PartialUpdateFirehoseOK) GetPayload() *models.Firehose { return o.Payload } @@ -129,7 +94,7 @@ func NewPartialUpdateFirehoseBadRequest() *PartialUpdateFirehoseBadRequest { } /* -PartialUpdateFirehoseBadRequest describes a response with status code 400, with default header values. + PartialUpdateFirehoseBadRequest describes a response with status code 400, with default header values. Update request is not valid. */ @@ -137,44 +102,9 @@ type PartialUpdateFirehoseBadRequest struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this partial update firehose bad request response has a 2xx status code -func (o *PartialUpdateFirehoseBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this partial update firehose bad request response has a 3xx status code -func (o *PartialUpdateFirehoseBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this partial update firehose bad request response has a 4xx status code -func (o *PartialUpdateFirehoseBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this partial update firehose bad request response has a 5xx status code -func (o *PartialUpdateFirehoseBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this partial update firehose bad request response a status code equal to that given -func (o *PartialUpdateFirehoseBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the partial update firehose bad request response -func (o *PartialUpdateFirehoseBadRequest) Code() int { - return 400 -} - func (o *PartialUpdateFirehoseBadRequest) Error() string { return fmt.Sprintf("[PATCH /dex/firehoses/{firehoseUrn}][%d] partialUpdateFirehoseBadRequest %+v", 400, o.Payload) } - -func (o *PartialUpdateFirehoseBadRequest) String() string { - return fmt.Sprintf("[PATCH /dex/firehoses/{firehoseUrn}][%d] partialUpdateFirehoseBadRequest %+v", 400, o.Payload) -} - func (o *PartialUpdateFirehoseBadRequest) GetPayload() *models.ErrorResponse { return o.Payload } @@ -197,7 +127,7 @@ func NewPartialUpdateFirehoseNotFound() *PartialUpdateFirehoseNotFound { } /* -PartialUpdateFirehoseNotFound describes a response with status code 404, with default header values. + PartialUpdateFirehoseNotFound describes a response with status code 404, with default header values. Firehose with given URN was not found */ @@ -205,44 +135,9 @@ type PartialUpdateFirehoseNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this partial update firehose not found response has a 2xx status code -func (o *PartialUpdateFirehoseNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this partial update firehose not found response has a 3xx status code -func (o *PartialUpdateFirehoseNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this partial update firehose not found response has a 4xx status code -func (o *PartialUpdateFirehoseNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this partial update firehose not found response has a 5xx status code -func (o *PartialUpdateFirehoseNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this partial update firehose not found response a status code equal to that given -func (o *PartialUpdateFirehoseNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the partial update firehose not found response -func (o *PartialUpdateFirehoseNotFound) Code() int { - return 404 -} - func (o *PartialUpdateFirehoseNotFound) Error() string { return fmt.Sprintf("[PATCH /dex/firehoses/{firehoseUrn}][%d] partialUpdateFirehoseNotFound %+v", 404, o.Payload) } - -func (o *PartialUpdateFirehoseNotFound) String() string { - return fmt.Sprintf("[PATCH /dex/firehoses/{firehoseUrn}][%d] partialUpdateFirehoseNotFound %+v", 404, o.Payload) -} - func (o *PartialUpdateFirehoseNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -265,7 +160,7 @@ func NewPartialUpdateFirehoseInternalServerError() *PartialUpdateFirehoseInterna } /* -PartialUpdateFirehoseInternalServerError describes a response with status code 500, with default header values. + PartialUpdateFirehoseInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -273,44 +168,9 @@ type PartialUpdateFirehoseInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this partial update firehose internal server error response has a 2xx status code -func (o *PartialUpdateFirehoseInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this partial update firehose internal server error response has a 3xx status code -func (o *PartialUpdateFirehoseInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this partial update firehose internal server error response has a 4xx status code -func (o *PartialUpdateFirehoseInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this partial update firehose internal server error response has a 5xx status code -func (o *PartialUpdateFirehoseInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this partial update firehose internal server error response a status code equal to that given -func (o *PartialUpdateFirehoseInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the partial update firehose internal server error response -func (o *PartialUpdateFirehoseInternalServerError) Code() int { - return 500 -} - func (o *PartialUpdateFirehoseInternalServerError) Error() string { return fmt.Sprintf("[PATCH /dex/firehoses/{firehoseUrn}][%d] partialUpdateFirehoseInternalServerError %+v", 500, o.Payload) } - -func (o *PartialUpdateFirehoseInternalServerError) String() string { - return fmt.Sprintf("[PATCH /dex/firehoses/{firehoseUrn}][%d] partialUpdateFirehoseInternalServerError %+v", 500, o.Payload) -} - func (o *PartialUpdateFirehoseInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } @@ -364,8 +224,6 @@ func (o *PartialUpdateFirehoseBody) validateConfigs(formats strfmt.Registry) err if err := o.Configs.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("body" + "." + "configs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "configs") } return err } @@ -391,16 +249,9 @@ func (o *PartialUpdateFirehoseBody) ContextValidate(ctx context.Context, formats func (o *PartialUpdateFirehoseBody) contextValidateConfigs(ctx context.Context, formats strfmt.Registry) error { if o.Configs != nil { - - if swag.IsZero(o.Configs) { // not required - return nil - } - if err := o.Configs.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("body" + "." + "configs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "configs") } return err } diff --git a/generated/client/operations/reset_offset_responses.go b/generated/client/operations/reset_offset_responses.go index f85a2999..7c276f1b 100644 --- a/generated/client/operations/reset_offset_responses.go +++ b/generated/client/operations/reset_offset_responses.go @@ -53,7 +53,7 @@ func (o *ResetOffsetReader) ReadResponse(response runtime.ClientResponse, consum } return nil, result default: - return nil, runtime.NewAPIError("[PUT /dex/firehoses/{firehoseUrn}/reset] resetOffset", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -63,7 +63,7 @@ func NewResetOffsetOK() *ResetOffsetOK { } /* -ResetOffsetOK describes a response with status code 200, with default header values. + ResetOffsetOK describes a response with status code 200, with default header values. Found firehose with given URN */ @@ -71,44 +71,9 @@ type ResetOffsetOK struct { Payload *models.Firehose } -// IsSuccess returns true when this reset offset o k response has a 2xx status code -func (o *ResetOffsetOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this reset offset o k response has a 3xx status code -func (o *ResetOffsetOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this reset offset o k response has a 4xx status code -func (o *ResetOffsetOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this reset offset o k response has a 5xx status code -func (o *ResetOffsetOK) IsServerError() bool { - return false -} - -// IsCode returns true when this reset offset o k response a status code equal to that given -func (o *ResetOffsetOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the reset offset o k response -func (o *ResetOffsetOK) Code() int { - return 200 -} - func (o *ResetOffsetOK) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/reset][%d] resetOffsetOK %+v", 200, o.Payload) } - -func (o *ResetOffsetOK) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/reset][%d] resetOffsetOK %+v", 200, o.Payload) -} - func (o *ResetOffsetOK) GetPayload() *models.Firehose { return o.Payload } @@ -131,7 +96,7 @@ func NewResetOffsetBadRequest() *ResetOffsetBadRequest { } /* -ResetOffsetBadRequest describes a response with status code 400, with default header values. + ResetOffsetBadRequest describes a response with status code 400, with default header values. Update request is not valid. */ @@ -139,44 +104,9 @@ type ResetOffsetBadRequest struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this reset offset bad request response has a 2xx status code -func (o *ResetOffsetBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this reset offset bad request response has a 3xx status code -func (o *ResetOffsetBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this reset offset bad request response has a 4xx status code -func (o *ResetOffsetBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this reset offset bad request response has a 5xx status code -func (o *ResetOffsetBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this reset offset bad request response a status code equal to that given -func (o *ResetOffsetBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the reset offset bad request response -func (o *ResetOffsetBadRequest) Code() int { - return 400 -} - func (o *ResetOffsetBadRequest) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/reset][%d] resetOffsetBadRequest %+v", 400, o.Payload) } - -func (o *ResetOffsetBadRequest) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/reset][%d] resetOffsetBadRequest %+v", 400, o.Payload) -} - func (o *ResetOffsetBadRequest) GetPayload() *models.ErrorResponse { return o.Payload } @@ -199,7 +129,7 @@ func NewResetOffsetNotFound() *ResetOffsetNotFound { } /* -ResetOffsetNotFound describes a response with status code 404, with default header values. + ResetOffsetNotFound describes a response with status code 404, with default header values. Firehose with given URN was not found */ @@ -207,44 +137,9 @@ type ResetOffsetNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this reset offset not found response has a 2xx status code -func (o *ResetOffsetNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this reset offset not found response has a 3xx status code -func (o *ResetOffsetNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this reset offset not found response has a 4xx status code -func (o *ResetOffsetNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this reset offset not found response has a 5xx status code -func (o *ResetOffsetNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this reset offset not found response a status code equal to that given -func (o *ResetOffsetNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the reset offset not found response -func (o *ResetOffsetNotFound) Code() int { - return 404 -} - func (o *ResetOffsetNotFound) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/reset][%d] resetOffsetNotFound %+v", 404, o.Payload) } - -func (o *ResetOffsetNotFound) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/reset][%d] resetOffsetNotFound %+v", 404, o.Payload) -} - func (o *ResetOffsetNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -267,7 +162,7 @@ func NewResetOffsetInternalServerError() *ResetOffsetInternalServerError { } /* -ResetOffsetInternalServerError describes a response with status code 500, with default header values. + ResetOffsetInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -275,44 +170,9 @@ type ResetOffsetInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this reset offset internal server error response has a 2xx status code -func (o *ResetOffsetInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this reset offset internal server error response has a 3xx status code -func (o *ResetOffsetInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this reset offset internal server error response has a 4xx status code -func (o *ResetOffsetInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this reset offset internal server error response has a 5xx status code -func (o *ResetOffsetInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this reset offset internal server error response a status code equal to that given -func (o *ResetOffsetInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the reset offset internal server error response -func (o *ResetOffsetInternalServerError) Code() int { - return 500 -} - func (o *ResetOffsetInternalServerError) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/reset][%d] resetOffsetInternalServerError %+v", 500, o.Payload) } - -func (o *ResetOffsetInternalServerError) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/reset][%d] resetOffsetInternalServerError %+v", 500, o.Payload) -} - func (o *ResetOffsetInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/scale_firehose_responses.go b/generated/client/operations/scale_firehose_responses.go index 63a381fb..84c6494e 100644 --- a/generated/client/operations/scale_firehose_responses.go +++ b/generated/client/operations/scale_firehose_responses.go @@ -52,7 +52,7 @@ func (o *ScaleFirehoseReader) ReadResponse(response runtime.ClientResponse, cons } return nil, result default: - return nil, runtime.NewAPIError("[PUT /dex/firehoses/{firehoseUrn}/scale] scaleFirehose", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -62,7 +62,7 @@ func NewScaleFirehoseOK() *ScaleFirehoseOK { } /* -ScaleFirehoseOK describes a response with status code 200, with default header values. + ScaleFirehoseOK describes a response with status code 200, with default header values. Successfully applied update. */ @@ -70,44 +70,9 @@ type ScaleFirehoseOK struct { Payload *models.Firehose } -// IsSuccess returns true when this scale firehose o k response has a 2xx status code -func (o *ScaleFirehoseOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this scale firehose o k response has a 3xx status code -func (o *ScaleFirehoseOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this scale firehose o k response has a 4xx status code -func (o *ScaleFirehoseOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this scale firehose o k response has a 5xx status code -func (o *ScaleFirehoseOK) IsServerError() bool { - return false -} - -// IsCode returns true when this scale firehose o k response a status code equal to that given -func (o *ScaleFirehoseOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the scale firehose o k response -func (o *ScaleFirehoseOK) Code() int { - return 200 -} - func (o *ScaleFirehoseOK) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/scale][%d] scaleFirehoseOK %+v", 200, o.Payload) } - -func (o *ScaleFirehoseOK) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/scale][%d] scaleFirehoseOK %+v", 200, o.Payload) -} - func (o *ScaleFirehoseOK) GetPayload() *models.Firehose { return o.Payload } @@ -130,7 +95,7 @@ func NewScaleFirehoseBadRequest() *ScaleFirehoseBadRequest { } /* -ScaleFirehoseBadRequest describes a response with status code 400, with default header values. + ScaleFirehoseBadRequest describes a response with status code 400, with default header values. Update request is not valid. */ @@ -138,44 +103,9 @@ type ScaleFirehoseBadRequest struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this scale firehose bad request response has a 2xx status code -func (o *ScaleFirehoseBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this scale firehose bad request response has a 3xx status code -func (o *ScaleFirehoseBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this scale firehose bad request response has a 4xx status code -func (o *ScaleFirehoseBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this scale firehose bad request response has a 5xx status code -func (o *ScaleFirehoseBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this scale firehose bad request response a status code equal to that given -func (o *ScaleFirehoseBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the scale firehose bad request response -func (o *ScaleFirehoseBadRequest) Code() int { - return 400 -} - func (o *ScaleFirehoseBadRequest) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/scale][%d] scaleFirehoseBadRequest %+v", 400, o.Payload) } - -func (o *ScaleFirehoseBadRequest) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/scale][%d] scaleFirehoseBadRequest %+v", 400, o.Payload) -} - func (o *ScaleFirehoseBadRequest) GetPayload() *models.ErrorResponse { return o.Payload } @@ -198,7 +128,7 @@ func NewScaleFirehoseNotFound() *ScaleFirehoseNotFound { } /* -ScaleFirehoseNotFound describes a response with status code 404, with default header values. + ScaleFirehoseNotFound describes a response with status code 404, with default header values. Firehose with given URN was not found */ @@ -206,44 +136,9 @@ type ScaleFirehoseNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this scale firehose not found response has a 2xx status code -func (o *ScaleFirehoseNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this scale firehose not found response has a 3xx status code -func (o *ScaleFirehoseNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this scale firehose not found response has a 4xx status code -func (o *ScaleFirehoseNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this scale firehose not found response has a 5xx status code -func (o *ScaleFirehoseNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this scale firehose not found response a status code equal to that given -func (o *ScaleFirehoseNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the scale firehose not found response -func (o *ScaleFirehoseNotFound) Code() int { - return 404 -} - func (o *ScaleFirehoseNotFound) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/scale][%d] scaleFirehoseNotFound %+v", 404, o.Payload) } - -func (o *ScaleFirehoseNotFound) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/scale][%d] scaleFirehoseNotFound %+v", 404, o.Payload) -} - func (o *ScaleFirehoseNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -266,7 +161,7 @@ func NewScaleFirehoseInternalServerError() *ScaleFirehoseInternalServerError { } /* -ScaleFirehoseInternalServerError describes a response with status code 500, with default header values. + ScaleFirehoseInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -274,44 +169,9 @@ type ScaleFirehoseInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this scale firehose internal server error response has a 2xx status code -func (o *ScaleFirehoseInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this scale firehose internal server error response has a 3xx status code -func (o *ScaleFirehoseInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this scale firehose internal server error response has a 4xx status code -func (o *ScaleFirehoseInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this scale firehose internal server error response has a 5xx status code -func (o *ScaleFirehoseInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this scale firehose internal server error response a status code equal to that given -func (o *ScaleFirehoseInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the scale firehose internal server error response -func (o *ScaleFirehoseInternalServerError) Code() int { - return 500 -} - func (o *ScaleFirehoseInternalServerError) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/scale][%d] scaleFirehoseInternalServerError %+v", 500, o.Payload) } - -func (o *ScaleFirehoseInternalServerError) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/scale][%d] scaleFirehoseInternalServerError %+v", 500, o.Payload) -} - func (o *ScaleFirehoseInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/set_group_alert_channels_responses.go b/generated/client/operations/set_group_alert_channels_responses.go index 99cc9221..c027dd7e 100644 --- a/generated/client/operations/set_group_alert_channels_responses.go +++ b/generated/client/operations/set_group_alert_channels_responses.go @@ -47,7 +47,7 @@ func (o *SetGroupAlertChannelsReader) ReadResponse(response runtime.ClientRespon } return nil, result default: - return nil, runtime.NewAPIError("[PUT /dex/subscriptions/groups/{id}/alert_channels] setGroupAlertChannels", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -57,7 +57,7 @@ func NewSetGroupAlertChannelsOK() *SetGroupAlertChannelsOK { } /* -SetGroupAlertChannelsOK describes a response with status code 200, with default header values. + SetGroupAlertChannelsOK describes a response with status code 200, with default header values. Successful Operation. */ @@ -65,44 +65,9 @@ type SetGroupAlertChannelsOK struct { Payload *SetGroupAlertChannelsOKBody } -// IsSuccess returns true when this set group alert channels o k response has a 2xx status code -func (o *SetGroupAlertChannelsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this set group alert channels o k response has a 3xx status code -func (o *SetGroupAlertChannelsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this set group alert channels o k response has a 4xx status code -func (o *SetGroupAlertChannelsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this set group alert channels o k response has a 5xx status code -func (o *SetGroupAlertChannelsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this set group alert channels o k response a status code equal to that given -func (o *SetGroupAlertChannelsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the set group alert channels o k response -func (o *SetGroupAlertChannelsOK) Code() int { - return 200 -} - func (o *SetGroupAlertChannelsOK) Error() string { return fmt.Sprintf("[PUT /dex/subscriptions/groups/{id}/alert_channels][%d] setGroupAlertChannelsOK %+v", 200, o.Payload) } - -func (o *SetGroupAlertChannelsOK) String() string { - return fmt.Sprintf("[PUT /dex/subscriptions/groups/{id}/alert_channels][%d] setGroupAlertChannelsOK %+v", 200, o.Payload) -} - func (o *SetGroupAlertChannelsOK) GetPayload() *SetGroupAlertChannelsOKBody { return o.Payload } @@ -125,7 +90,7 @@ func NewSetGroupAlertChannelsNotFound() *SetGroupAlertChannelsNotFound { } /* -SetGroupAlertChannelsNotFound describes a response with status code 404, with default header values. + SetGroupAlertChannelsNotFound describes a response with status code 404, with default header values. Group Not Found Error */ @@ -133,44 +98,9 @@ type SetGroupAlertChannelsNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this set group alert channels not found response has a 2xx status code -func (o *SetGroupAlertChannelsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this set group alert channels not found response has a 3xx status code -func (o *SetGroupAlertChannelsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this set group alert channels not found response has a 4xx status code -func (o *SetGroupAlertChannelsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this set group alert channels not found response has a 5xx status code -func (o *SetGroupAlertChannelsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this set group alert channels not found response a status code equal to that given -func (o *SetGroupAlertChannelsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the set group alert channels not found response -func (o *SetGroupAlertChannelsNotFound) Code() int { - return 404 -} - func (o *SetGroupAlertChannelsNotFound) Error() string { return fmt.Sprintf("[PUT /dex/subscriptions/groups/{id}/alert_channels][%d] setGroupAlertChannelsNotFound %+v", 404, o.Payload) } - -func (o *SetGroupAlertChannelsNotFound) String() string { - return fmt.Sprintf("[PUT /dex/subscriptions/groups/{id}/alert_channels][%d] setGroupAlertChannelsNotFound %+v", 404, o.Payload) -} - func (o *SetGroupAlertChannelsNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -193,7 +123,7 @@ func NewSetGroupAlertChannelsInternalServerError() *SetGroupAlertChannelsInterna } /* -SetGroupAlertChannelsInternalServerError describes a response with status code 500, with default header values. + SetGroupAlertChannelsInternalServerError describes a response with status code 500, with default header values. Internal Error */ @@ -201,44 +131,9 @@ type SetGroupAlertChannelsInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this set group alert channels internal server error response has a 2xx status code -func (o *SetGroupAlertChannelsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this set group alert channels internal server error response has a 3xx status code -func (o *SetGroupAlertChannelsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this set group alert channels internal server error response has a 4xx status code -func (o *SetGroupAlertChannelsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this set group alert channels internal server error response has a 5xx status code -func (o *SetGroupAlertChannelsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this set group alert channels internal server error response a status code equal to that given -func (o *SetGroupAlertChannelsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the set group alert channels internal server error response -func (o *SetGroupAlertChannelsInternalServerError) Code() int { - return 500 -} - func (o *SetGroupAlertChannelsInternalServerError) Error() string { return fmt.Sprintf("[PUT /dex/subscriptions/groups/{id}/alert_channels][%d] setGroupAlertChannelsInternalServerError %+v", 500, o.Payload) } - -func (o *SetGroupAlertChannelsInternalServerError) String() string { - return fmt.Sprintf("[PUT /dex/subscriptions/groups/{id}/alert_channels][%d] setGroupAlertChannelsInternalServerError %+v", 500, o.Payload) -} - func (o *SetGroupAlertChannelsInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } @@ -302,8 +197,6 @@ func (o *SetGroupAlertChannelsBody) validateAlertChannels(formats strfmt.Registr if err := o.AlertChannels[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("body" + "." + "alert_channels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "alert_channels" + "." + strconv.Itoa(i)) } return err } @@ -333,16 +226,9 @@ func (o *SetGroupAlertChannelsBody) contextValidateAlertChannels(ctx context.Con for i := 0; i < len(o.AlertChannels); i++ { if o.AlertChannels[i] != nil { - - if swag.IsZero(o.AlertChannels[i]) { // not required - return nil - } - if err := o.AlertChannels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("body" + "." + "alert_channels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "alert_channels" + "." + strconv.Itoa(i)) } return err } @@ -409,8 +295,6 @@ func (o *SetGroupAlertChannelsOKBody) validateAlertChannels(formats strfmt.Regis if err := o.AlertChannels[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("setGroupAlertChannelsOK" + "." + "alert_channels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("setGroupAlertChannelsOK" + "." + "alert_channels" + "." + strconv.Itoa(i)) } return err } @@ -440,16 +324,9 @@ func (o *SetGroupAlertChannelsOKBody) contextValidateAlertChannels(ctx context.C for i := 0; i < len(o.AlertChannels); i++ { if o.AlertChannels[i] != nil { - - if swag.IsZero(o.AlertChannels[i]) { // not required - return nil - } - if err := o.AlertChannels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("setGroupAlertChannelsOK" + "." + "alert_channels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("setGroupAlertChannelsOK" + "." + "alert_channels" + "." + strconv.Itoa(i)) } return err } diff --git a/generated/client/operations/start_firehose_responses.go b/generated/client/operations/start_firehose_responses.go index efc2408f..8065c43f 100644 --- a/generated/client/operations/start_firehose_responses.go +++ b/generated/client/operations/start_firehose_responses.go @@ -48,7 +48,7 @@ func (o *StartFirehoseReader) ReadResponse(response runtime.ClientResponse, cons } return nil, result default: - return nil, runtime.NewAPIError("[PUT /dex/firehoses/{firehoseUrn}/start] startFirehose", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -58,7 +58,7 @@ func NewStartFirehoseOK() *StartFirehoseOK { } /* -StartFirehoseOK describes a response with status code 200, with default header values. + StartFirehoseOK describes a response with status code 200, with default header values. Successfully applied update. */ @@ -66,44 +66,9 @@ type StartFirehoseOK struct { Payload *models.Firehose } -// IsSuccess returns true when this start firehose o k response has a 2xx status code -func (o *StartFirehoseOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this start firehose o k response has a 3xx status code -func (o *StartFirehoseOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this start firehose o k response has a 4xx status code -func (o *StartFirehoseOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this start firehose o k response has a 5xx status code -func (o *StartFirehoseOK) IsServerError() bool { - return false -} - -// IsCode returns true when this start firehose o k response a status code equal to that given -func (o *StartFirehoseOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the start firehose o k response -func (o *StartFirehoseOK) Code() int { - return 200 -} - func (o *StartFirehoseOK) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/start][%d] startFirehoseOK %+v", 200, o.Payload) } - -func (o *StartFirehoseOK) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/start][%d] startFirehoseOK %+v", 200, o.Payload) -} - func (o *StartFirehoseOK) GetPayload() *models.Firehose { return o.Payload } @@ -126,7 +91,7 @@ func NewStartFirehoseBadRequest() *StartFirehoseBadRequest { } /* -StartFirehoseBadRequest describes a response with status code 400, with default header values. + StartFirehoseBadRequest describes a response with status code 400, with default header values. Update request is not valid. */ @@ -134,44 +99,9 @@ type StartFirehoseBadRequest struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this start firehose bad request response has a 2xx status code -func (o *StartFirehoseBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this start firehose bad request response has a 3xx status code -func (o *StartFirehoseBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this start firehose bad request response has a 4xx status code -func (o *StartFirehoseBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this start firehose bad request response has a 5xx status code -func (o *StartFirehoseBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this start firehose bad request response a status code equal to that given -func (o *StartFirehoseBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the start firehose bad request response -func (o *StartFirehoseBadRequest) Code() int { - return 400 -} - func (o *StartFirehoseBadRequest) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/start][%d] startFirehoseBadRequest %+v", 400, o.Payload) } - -func (o *StartFirehoseBadRequest) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/start][%d] startFirehoseBadRequest %+v", 400, o.Payload) -} - func (o *StartFirehoseBadRequest) GetPayload() *models.ErrorResponse { return o.Payload } @@ -194,7 +124,7 @@ func NewStartFirehoseNotFound() *StartFirehoseNotFound { } /* -StartFirehoseNotFound describes a response with status code 404, with default header values. + StartFirehoseNotFound describes a response with status code 404, with default header values. Firehose with given URN was not found */ @@ -202,44 +132,9 @@ type StartFirehoseNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this start firehose not found response has a 2xx status code -func (o *StartFirehoseNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this start firehose not found response has a 3xx status code -func (o *StartFirehoseNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this start firehose not found response has a 4xx status code -func (o *StartFirehoseNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this start firehose not found response has a 5xx status code -func (o *StartFirehoseNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this start firehose not found response a status code equal to that given -func (o *StartFirehoseNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the start firehose not found response -func (o *StartFirehoseNotFound) Code() int { - return 404 -} - func (o *StartFirehoseNotFound) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/start][%d] startFirehoseNotFound %+v", 404, o.Payload) } - -func (o *StartFirehoseNotFound) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/start][%d] startFirehoseNotFound %+v", 404, o.Payload) -} - func (o *StartFirehoseNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -262,7 +157,7 @@ func NewStartFirehoseInternalServerError() *StartFirehoseInternalServerError { } /* -StartFirehoseInternalServerError describes a response with status code 500, with default header values. + StartFirehoseInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -270,44 +165,9 @@ type StartFirehoseInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this start firehose internal server error response has a 2xx status code -func (o *StartFirehoseInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this start firehose internal server error response has a 3xx status code -func (o *StartFirehoseInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this start firehose internal server error response has a 4xx status code -func (o *StartFirehoseInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this start firehose internal server error response has a 5xx status code -func (o *StartFirehoseInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this start firehose internal server error response a status code equal to that given -func (o *StartFirehoseInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the start firehose internal server error response -func (o *StartFirehoseInternalServerError) Code() int { - return 500 -} - func (o *StartFirehoseInternalServerError) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/start][%d] startFirehoseInternalServerError %+v", 500, o.Payload) } - -func (o *StartFirehoseInternalServerError) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/start][%d] startFirehoseInternalServerError %+v", 500, o.Payload) -} - func (o *StartFirehoseInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/stop_firehose_responses.go b/generated/client/operations/stop_firehose_responses.go index 902f1a5e..4e56c979 100644 --- a/generated/client/operations/stop_firehose_responses.go +++ b/generated/client/operations/stop_firehose_responses.go @@ -48,7 +48,7 @@ func (o *StopFirehoseReader) ReadResponse(response runtime.ClientResponse, consu } return nil, result default: - return nil, runtime.NewAPIError("[PUT /dex/firehoses/{firehoseUrn}/stop] stopFirehose", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -58,7 +58,7 @@ func NewStopFirehoseOK() *StopFirehoseOK { } /* -StopFirehoseOK describes a response with status code 200, with default header values. + StopFirehoseOK describes a response with status code 200, with default header values. Successfully applied update. */ @@ -66,44 +66,9 @@ type StopFirehoseOK struct { Payload *models.Firehose } -// IsSuccess returns true when this stop firehose o k response has a 2xx status code -func (o *StopFirehoseOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this stop firehose o k response has a 3xx status code -func (o *StopFirehoseOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this stop firehose o k response has a 4xx status code -func (o *StopFirehoseOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this stop firehose o k response has a 5xx status code -func (o *StopFirehoseOK) IsServerError() bool { - return false -} - -// IsCode returns true when this stop firehose o k response a status code equal to that given -func (o *StopFirehoseOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the stop firehose o k response -func (o *StopFirehoseOK) Code() int { - return 200 -} - func (o *StopFirehoseOK) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/stop][%d] stopFirehoseOK %+v", 200, o.Payload) } - -func (o *StopFirehoseOK) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/stop][%d] stopFirehoseOK %+v", 200, o.Payload) -} - func (o *StopFirehoseOK) GetPayload() *models.Firehose { return o.Payload } @@ -126,7 +91,7 @@ func NewStopFirehoseBadRequest() *StopFirehoseBadRequest { } /* -StopFirehoseBadRequest describes a response with status code 400, with default header values. + StopFirehoseBadRequest describes a response with status code 400, with default header values. Update request is not valid. */ @@ -134,44 +99,9 @@ type StopFirehoseBadRequest struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this stop firehose bad request response has a 2xx status code -func (o *StopFirehoseBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this stop firehose bad request response has a 3xx status code -func (o *StopFirehoseBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this stop firehose bad request response has a 4xx status code -func (o *StopFirehoseBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this stop firehose bad request response has a 5xx status code -func (o *StopFirehoseBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this stop firehose bad request response a status code equal to that given -func (o *StopFirehoseBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the stop firehose bad request response -func (o *StopFirehoseBadRequest) Code() int { - return 400 -} - func (o *StopFirehoseBadRequest) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/stop][%d] stopFirehoseBadRequest %+v", 400, o.Payload) } - -func (o *StopFirehoseBadRequest) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/stop][%d] stopFirehoseBadRequest %+v", 400, o.Payload) -} - func (o *StopFirehoseBadRequest) GetPayload() *models.ErrorResponse { return o.Payload } @@ -194,7 +124,7 @@ func NewStopFirehoseNotFound() *StopFirehoseNotFound { } /* -StopFirehoseNotFound describes a response with status code 404, with default header values. + StopFirehoseNotFound describes a response with status code 404, with default header values. Firehose with given URN was not found */ @@ -202,44 +132,9 @@ type StopFirehoseNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this stop firehose not found response has a 2xx status code -func (o *StopFirehoseNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this stop firehose not found response has a 3xx status code -func (o *StopFirehoseNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this stop firehose not found response has a 4xx status code -func (o *StopFirehoseNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this stop firehose not found response has a 5xx status code -func (o *StopFirehoseNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this stop firehose not found response a status code equal to that given -func (o *StopFirehoseNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the stop firehose not found response -func (o *StopFirehoseNotFound) Code() int { - return 404 -} - func (o *StopFirehoseNotFound) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/stop][%d] stopFirehoseNotFound %+v", 404, o.Payload) } - -func (o *StopFirehoseNotFound) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/stop][%d] stopFirehoseNotFound %+v", 404, o.Payload) -} - func (o *StopFirehoseNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -262,7 +157,7 @@ func NewStopFirehoseInternalServerError() *StopFirehoseInternalServerError { } /* -StopFirehoseInternalServerError describes a response with status code 500, with default header values. + StopFirehoseInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -270,44 +165,9 @@ type StopFirehoseInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this stop firehose internal server error response has a 2xx status code -func (o *StopFirehoseInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this stop firehose internal server error response has a 3xx status code -func (o *StopFirehoseInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this stop firehose internal server error response has a 4xx status code -func (o *StopFirehoseInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this stop firehose internal server error response has a 5xx status code -func (o *StopFirehoseInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this stop firehose internal server error response a status code equal to that given -func (o *StopFirehoseInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the stop firehose internal server error response -func (o *StopFirehoseInternalServerError) Code() int { - return 500 -} - func (o *StopFirehoseInternalServerError) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/stop][%d] stopFirehoseInternalServerError %+v", 500, o.Payload) } - -func (o *StopFirehoseInternalServerError) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/stop][%d] stopFirehoseInternalServerError %+v", 500, o.Payload) -} - func (o *StopFirehoseInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/update_alert_subscription_responses.go b/generated/client/operations/update_alert_subscription_responses.go index eee13fa7..b0b4dfe0 100644 --- a/generated/client/operations/update_alert_subscription_responses.go +++ b/generated/client/operations/update_alert_subscription_responses.go @@ -63,7 +63,7 @@ func (o *UpdateAlertSubscriptionReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("[PUT /dex/subscriptions/{id}] updateAlertSubscription", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -73,7 +73,7 @@ func NewUpdateAlertSubscriptionOK() *UpdateAlertSubscriptionOK { } /* -UpdateAlertSubscriptionOK describes a response with status code 200, with default header values. + UpdateAlertSubscriptionOK describes a response with status code 200, with default header values. Successful Operation. */ @@ -81,44 +81,9 @@ type UpdateAlertSubscriptionOK struct { Payload *UpdateAlertSubscriptionOKBody } -// IsSuccess returns true when this update alert subscription o k response has a 2xx status code -func (o *UpdateAlertSubscriptionOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update alert subscription o k response has a 3xx status code -func (o *UpdateAlertSubscriptionOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update alert subscription o k response has a 4xx status code -func (o *UpdateAlertSubscriptionOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update alert subscription o k response has a 5xx status code -func (o *UpdateAlertSubscriptionOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update alert subscription o k response a status code equal to that given -func (o *UpdateAlertSubscriptionOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update alert subscription o k response -func (o *UpdateAlertSubscriptionOK) Code() int { - return 200 -} - func (o *UpdateAlertSubscriptionOK) Error() string { return fmt.Sprintf("[PUT /dex/subscriptions/{id}][%d] updateAlertSubscriptionOK %+v", 200, o.Payload) } - -func (o *UpdateAlertSubscriptionOK) String() string { - return fmt.Sprintf("[PUT /dex/subscriptions/{id}][%d] updateAlertSubscriptionOK %+v", 200, o.Payload) -} - func (o *UpdateAlertSubscriptionOK) GetPayload() *UpdateAlertSubscriptionOKBody { return o.Payload } @@ -141,7 +106,7 @@ func NewUpdateAlertSubscriptionBadRequest() *UpdateAlertSubscriptionBadRequest { } /* -UpdateAlertSubscriptionBadRequest describes a response with status code 400, with default header values. + UpdateAlertSubscriptionBadRequest describes a response with status code 400, with default header values. Validation Error */ @@ -149,44 +114,9 @@ type UpdateAlertSubscriptionBadRequest struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this update alert subscription bad request response has a 2xx status code -func (o *UpdateAlertSubscriptionBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update alert subscription bad request response has a 3xx status code -func (o *UpdateAlertSubscriptionBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update alert subscription bad request response has a 4xx status code -func (o *UpdateAlertSubscriptionBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this update alert subscription bad request response has a 5xx status code -func (o *UpdateAlertSubscriptionBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this update alert subscription bad request response a status code equal to that given -func (o *UpdateAlertSubscriptionBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the update alert subscription bad request response -func (o *UpdateAlertSubscriptionBadRequest) Code() int { - return 400 -} - func (o *UpdateAlertSubscriptionBadRequest) Error() string { return fmt.Sprintf("[PUT /dex/subscriptions/{id}][%d] updateAlertSubscriptionBadRequest %+v", 400, o.Payload) } - -func (o *UpdateAlertSubscriptionBadRequest) String() string { - return fmt.Sprintf("[PUT /dex/subscriptions/{id}][%d] updateAlertSubscriptionBadRequest %+v", 400, o.Payload) -} - func (o *UpdateAlertSubscriptionBadRequest) GetPayload() *models.ErrorResponse { return o.Payload } @@ -209,7 +139,7 @@ func NewUpdateAlertSubscriptionNotFound() *UpdateAlertSubscriptionNotFound { } /* -UpdateAlertSubscriptionNotFound describes a response with status code 404, with default header values. + UpdateAlertSubscriptionNotFound describes a response with status code 404, with default header values. Not Found Error */ @@ -217,44 +147,9 @@ type UpdateAlertSubscriptionNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this update alert subscription not found response has a 2xx status code -func (o *UpdateAlertSubscriptionNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update alert subscription not found response has a 3xx status code -func (o *UpdateAlertSubscriptionNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update alert subscription not found response has a 4xx status code -func (o *UpdateAlertSubscriptionNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this update alert subscription not found response has a 5xx status code -func (o *UpdateAlertSubscriptionNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this update alert subscription not found response a status code equal to that given -func (o *UpdateAlertSubscriptionNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the update alert subscription not found response -func (o *UpdateAlertSubscriptionNotFound) Code() int { - return 404 -} - func (o *UpdateAlertSubscriptionNotFound) Error() string { return fmt.Sprintf("[PUT /dex/subscriptions/{id}][%d] updateAlertSubscriptionNotFound %+v", 404, o.Payload) } - -func (o *UpdateAlertSubscriptionNotFound) String() string { - return fmt.Sprintf("[PUT /dex/subscriptions/{id}][%d] updateAlertSubscriptionNotFound %+v", 404, o.Payload) -} - func (o *UpdateAlertSubscriptionNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -277,7 +172,7 @@ func NewUpdateAlertSubscriptionConflict() *UpdateAlertSubscriptionConflict { } /* -UpdateAlertSubscriptionConflict describes a response with status code 409, with default header values. + UpdateAlertSubscriptionConflict describes a response with status code 409, with default header values. Duplicate subscription */ @@ -285,44 +180,9 @@ type UpdateAlertSubscriptionConflict struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this update alert subscription conflict response has a 2xx status code -func (o *UpdateAlertSubscriptionConflict) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update alert subscription conflict response has a 3xx status code -func (o *UpdateAlertSubscriptionConflict) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update alert subscription conflict response has a 4xx status code -func (o *UpdateAlertSubscriptionConflict) IsClientError() bool { - return true -} - -// IsServerError returns true when this update alert subscription conflict response has a 5xx status code -func (o *UpdateAlertSubscriptionConflict) IsServerError() bool { - return false -} - -// IsCode returns true when this update alert subscription conflict response a status code equal to that given -func (o *UpdateAlertSubscriptionConflict) IsCode(code int) bool { - return code == 409 -} - -// Code gets the status code for the update alert subscription conflict response -func (o *UpdateAlertSubscriptionConflict) Code() int { - return 409 -} - func (o *UpdateAlertSubscriptionConflict) Error() string { return fmt.Sprintf("[PUT /dex/subscriptions/{id}][%d] updateAlertSubscriptionConflict %+v", 409, o.Payload) } - -func (o *UpdateAlertSubscriptionConflict) String() string { - return fmt.Sprintf("[PUT /dex/subscriptions/{id}][%d] updateAlertSubscriptionConflict %+v", 409, o.Payload) -} - func (o *UpdateAlertSubscriptionConflict) GetPayload() *models.ErrorResponse { return o.Payload } @@ -345,7 +205,7 @@ func NewUpdateAlertSubscriptionUnprocessableEntity() *UpdateAlertSubscriptionUnp } /* -UpdateAlertSubscriptionUnprocessableEntity describes a response with status code 422, with default header values. + UpdateAlertSubscriptionUnprocessableEntity describes a response with status code 422, with default header values. Missing namespace and slack channel in shield */ @@ -353,44 +213,9 @@ type UpdateAlertSubscriptionUnprocessableEntity struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this update alert subscription unprocessable entity response has a 2xx status code -func (o *UpdateAlertSubscriptionUnprocessableEntity) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update alert subscription unprocessable entity response has a 3xx status code -func (o *UpdateAlertSubscriptionUnprocessableEntity) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update alert subscription unprocessable entity response has a 4xx status code -func (o *UpdateAlertSubscriptionUnprocessableEntity) IsClientError() bool { - return true -} - -// IsServerError returns true when this update alert subscription unprocessable entity response has a 5xx status code -func (o *UpdateAlertSubscriptionUnprocessableEntity) IsServerError() bool { - return false -} - -// IsCode returns true when this update alert subscription unprocessable entity response a status code equal to that given -func (o *UpdateAlertSubscriptionUnprocessableEntity) IsCode(code int) bool { - return code == 422 -} - -// Code gets the status code for the update alert subscription unprocessable entity response -func (o *UpdateAlertSubscriptionUnprocessableEntity) Code() int { - return 422 -} - func (o *UpdateAlertSubscriptionUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /dex/subscriptions/{id}][%d] updateAlertSubscriptionUnprocessableEntity %+v", 422, o.Payload) } - -func (o *UpdateAlertSubscriptionUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /dex/subscriptions/{id}][%d] updateAlertSubscriptionUnprocessableEntity %+v", 422, o.Payload) -} - func (o *UpdateAlertSubscriptionUnprocessableEntity) GetPayload() *models.ErrorResponse { return o.Payload } @@ -413,7 +238,7 @@ func NewUpdateAlertSubscriptionInternalServerError() *UpdateAlertSubscriptionInt } /* -UpdateAlertSubscriptionInternalServerError describes a response with status code 500, with default header values. + UpdateAlertSubscriptionInternalServerError describes a response with status code 500, with default header values. Internal Error */ @@ -421,44 +246,9 @@ type UpdateAlertSubscriptionInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this update alert subscription internal server error response has a 2xx status code -func (o *UpdateAlertSubscriptionInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update alert subscription internal server error response has a 3xx status code -func (o *UpdateAlertSubscriptionInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update alert subscription internal server error response has a 4xx status code -func (o *UpdateAlertSubscriptionInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this update alert subscription internal server error response has a 5xx status code -func (o *UpdateAlertSubscriptionInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this update alert subscription internal server error response a status code equal to that given -func (o *UpdateAlertSubscriptionInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the update alert subscription internal server error response -func (o *UpdateAlertSubscriptionInternalServerError) Code() int { - return 500 -} - func (o *UpdateAlertSubscriptionInternalServerError) Error() string { return fmt.Sprintf("[PUT /dex/subscriptions/{id}][%d] updateAlertSubscriptionInternalServerError %+v", 500, o.Payload) } - -func (o *UpdateAlertSubscriptionInternalServerError) String() string { - return fmt.Sprintf("[PUT /dex/subscriptions/{id}][%d] updateAlertSubscriptionInternalServerError %+v", 500, o.Payload) -} - func (o *UpdateAlertSubscriptionInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } @@ -508,8 +298,6 @@ func (o *UpdateAlertSubscriptionOKBody) validateSubscription(formats strfmt.Regi if err := o.Subscription.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("updateAlertSubscriptionOK" + "." + "subscription") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateAlertSubscriptionOK" + "." + "subscription") } return err } @@ -535,16 +323,9 @@ func (o *UpdateAlertSubscriptionOKBody) ContextValidate(ctx context.Context, for func (o *UpdateAlertSubscriptionOKBody) contextValidateSubscription(ctx context.Context, formats strfmt.Registry) error { if o.Subscription != nil { - - if swag.IsZero(o.Subscription) { // not required - return nil - } - if err := o.Subscription.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("updateAlertSubscriptionOK" + "." + "subscription") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateAlertSubscriptionOK" + "." + "subscription") } return err } diff --git a/generated/client/operations/update_firehose_responses.go b/generated/client/operations/update_firehose_responses.go index 7f9d8b58..99847f2c 100644 --- a/generated/client/operations/update_firehose_responses.go +++ b/generated/client/operations/update_firehose_responses.go @@ -48,7 +48,7 @@ func (o *UpdateFirehoseReader) ReadResponse(response runtime.ClientResponse, con } return nil, result default: - return nil, runtime.NewAPIError("[PUT /dex/firehoses/{firehoseUrn}] updateFirehose", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -58,7 +58,7 @@ func NewUpdateFirehoseOK() *UpdateFirehoseOK { } /* -UpdateFirehoseOK describes a response with status code 200, with default header values. + UpdateFirehoseOK describes a response with status code 200, with default header values. Found firehose with given URN */ @@ -66,44 +66,9 @@ type UpdateFirehoseOK struct { Payload *models.Firehose } -// IsSuccess returns true when this update firehose o k response has a 2xx status code -func (o *UpdateFirehoseOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update firehose o k response has a 3xx status code -func (o *UpdateFirehoseOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update firehose o k response has a 4xx status code -func (o *UpdateFirehoseOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update firehose o k response has a 5xx status code -func (o *UpdateFirehoseOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update firehose o k response a status code equal to that given -func (o *UpdateFirehoseOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update firehose o k response -func (o *UpdateFirehoseOK) Code() int { - return 200 -} - func (o *UpdateFirehoseOK) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}][%d] updateFirehoseOK %+v", 200, o.Payload) } - -func (o *UpdateFirehoseOK) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}][%d] updateFirehoseOK %+v", 200, o.Payload) -} - func (o *UpdateFirehoseOK) GetPayload() *models.Firehose { return o.Payload } @@ -126,7 +91,7 @@ func NewUpdateFirehoseBadRequest() *UpdateFirehoseBadRequest { } /* -UpdateFirehoseBadRequest describes a response with status code 400, with default header values. + UpdateFirehoseBadRequest describes a response with status code 400, with default header values. Update request is not valid. */ @@ -134,44 +99,9 @@ type UpdateFirehoseBadRequest struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this update firehose bad request response has a 2xx status code -func (o *UpdateFirehoseBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update firehose bad request response has a 3xx status code -func (o *UpdateFirehoseBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update firehose bad request response has a 4xx status code -func (o *UpdateFirehoseBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this update firehose bad request response has a 5xx status code -func (o *UpdateFirehoseBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this update firehose bad request response a status code equal to that given -func (o *UpdateFirehoseBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the update firehose bad request response -func (o *UpdateFirehoseBadRequest) Code() int { - return 400 -} - func (o *UpdateFirehoseBadRequest) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}][%d] updateFirehoseBadRequest %+v", 400, o.Payload) } - -func (o *UpdateFirehoseBadRequest) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}][%d] updateFirehoseBadRequest %+v", 400, o.Payload) -} - func (o *UpdateFirehoseBadRequest) GetPayload() *models.ErrorResponse { return o.Payload } @@ -194,7 +124,7 @@ func NewUpdateFirehoseNotFound() *UpdateFirehoseNotFound { } /* -UpdateFirehoseNotFound describes a response with status code 404, with default header values. + UpdateFirehoseNotFound describes a response with status code 404, with default header values. Firehose with given URN was not found */ @@ -202,44 +132,9 @@ type UpdateFirehoseNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this update firehose not found response has a 2xx status code -func (o *UpdateFirehoseNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update firehose not found response has a 3xx status code -func (o *UpdateFirehoseNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update firehose not found response has a 4xx status code -func (o *UpdateFirehoseNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this update firehose not found response has a 5xx status code -func (o *UpdateFirehoseNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this update firehose not found response a status code equal to that given -func (o *UpdateFirehoseNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the update firehose not found response -func (o *UpdateFirehoseNotFound) Code() int { - return 404 -} - func (o *UpdateFirehoseNotFound) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}][%d] updateFirehoseNotFound %+v", 404, o.Payload) } - -func (o *UpdateFirehoseNotFound) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}][%d] updateFirehoseNotFound %+v", 404, o.Payload) -} - func (o *UpdateFirehoseNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -262,7 +157,7 @@ func NewUpdateFirehoseInternalServerError() *UpdateFirehoseInternalServerError { } /* -UpdateFirehoseInternalServerError describes a response with status code 500, with default header values. + UpdateFirehoseInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -270,44 +165,9 @@ type UpdateFirehoseInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this update firehose internal server error response has a 2xx status code -func (o *UpdateFirehoseInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update firehose internal server error response has a 3xx status code -func (o *UpdateFirehoseInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update firehose internal server error response has a 4xx status code -func (o *UpdateFirehoseInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this update firehose internal server error response has a 5xx status code -func (o *UpdateFirehoseInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this update firehose internal server error response a status code equal to that given -func (o *UpdateFirehoseInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the update firehose internal server error response -func (o *UpdateFirehoseInternalServerError) Code() int { - return 500 -} - func (o *UpdateFirehoseInternalServerError) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}][%d] updateFirehoseInternalServerError %+v", 500, o.Payload) } - -func (o *UpdateFirehoseInternalServerError) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}][%d] updateFirehoseInternalServerError %+v", 500, o.Payload) -} - func (o *UpdateFirehoseInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/upgrade_firehose_responses.go b/generated/client/operations/upgrade_firehose_responses.go index 9e93f3a6..900ef2ce 100644 --- a/generated/client/operations/upgrade_firehose_responses.go +++ b/generated/client/operations/upgrade_firehose_responses.go @@ -42,7 +42,7 @@ func (o *UpgradeFirehoseReader) ReadResponse(response runtime.ClientResponse, co } return nil, result default: - return nil, runtime.NewAPIError("[PUT /dex/firehoses/{firehoseUrn}/upgrade] upgradeFirehose", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -52,7 +52,7 @@ func NewUpgradeFirehoseOK() *UpgradeFirehoseOK { } /* -UpgradeFirehoseOK describes a response with status code 200, with default header values. + UpgradeFirehoseOK describes a response with status code 200, with default header values. Upgrade request accepted. */ @@ -60,44 +60,9 @@ type UpgradeFirehoseOK struct { Payload *models.Firehose } -// IsSuccess returns true when this upgrade firehose o k response has a 2xx status code -func (o *UpgradeFirehoseOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this upgrade firehose o k response has a 3xx status code -func (o *UpgradeFirehoseOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upgrade firehose o k response has a 4xx status code -func (o *UpgradeFirehoseOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this upgrade firehose o k response has a 5xx status code -func (o *UpgradeFirehoseOK) IsServerError() bool { - return false -} - -// IsCode returns true when this upgrade firehose o k response a status code equal to that given -func (o *UpgradeFirehoseOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the upgrade firehose o k response -func (o *UpgradeFirehoseOK) Code() int { - return 200 -} - func (o *UpgradeFirehoseOK) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/upgrade][%d] upgradeFirehoseOK %+v", 200, o.Payload) } - -func (o *UpgradeFirehoseOK) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/upgrade][%d] upgradeFirehoseOK %+v", 200, o.Payload) -} - func (o *UpgradeFirehoseOK) GetPayload() *models.Firehose { return o.Payload } @@ -120,7 +85,7 @@ func NewUpgradeFirehoseNotFound() *UpgradeFirehoseNotFound { } /* -UpgradeFirehoseNotFound describes a response with status code 404, with default header values. + UpgradeFirehoseNotFound describes a response with status code 404, with default header values. Firehose with given URN was not found */ @@ -128,44 +93,9 @@ type UpgradeFirehoseNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this upgrade firehose not found response has a 2xx status code -func (o *UpgradeFirehoseNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this upgrade firehose not found response has a 3xx status code -func (o *UpgradeFirehoseNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upgrade firehose not found response has a 4xx status code -func (o *UpgradeFirehoseNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this upgrade firehose not found response has a 5xx status code -func (o *UpgradeFirehoseNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this upgrade firehose not found response a status code equal to that given -func (o *UpgradeFirehoseNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the upgrade firehose not found response -func (o *UpgradeFirehoseNotFound) Code() int { - return 404 -} - func (o *UpgradeFirehoseNotFound) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/upgrade][%d] upgradeFirehoseNotFound %+v", 404, o.Payload) } - -func (o *UpgradeFirehoseNotFound) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/upgrade][%d] upgradeFirehoseNotFound %+v", 404, o.Payload) -} - func (o *UpgradeFirehoseNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -188,7 +118,7 @@ func NewUpgradeFirehoseInternalServerError() *UpgradeFirehoseInternalServerError } /* -UpgradeFirehoseInternalServerError describes a response with status code 500, with default header values. + UpgradeFirehoseInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -196,44 +126,9 @@ type UpgradeFirehoseInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this upgrade firehose internal server error response has a 2xx status code -func (o *UpgradeFirehoseInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this upgrade firehose internal server error response has a 3xx status code -func (o *UpgradeFirehoseInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upgrade firehose internal server error response has a 4xx status code -func (o *UpgradeFirehoseInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this upgrade firehose internal server error response has a 5xx status code -func (o *UpgradeFirehoseInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this upgrade firehose internal server error response a status code equal to that given -func (o *UpgradeFirehoseInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the upgrade firehose internal server error response -func (o *UpgradeFirehoseInternalServerError) Code() int { - return 500 -} - func (o *UpgradeFirehoseInternalServerError) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/upgrade][%d] upgradeFirehoseInternalServerError %+v", 500, o.Payload) } - -func (o *UpgradeFirehoseInternalServerError) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/upgrade][%d] upgradeFirehoseInternalServerError %+v", 500, o.Payload) -} - func (o *UpgradeFirehoseInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/client/operations/upsert_firehose_alert_policy_responses.go b/generated/client/operations/upsert_firehose_alert_policy_responses.go index f94df472..97e320ce 100644 --- a/generated/client/operations/upsert_firehose_alert_policy_responses.go +++ b/generated/client/operations/upsert_firehose_alert_policy_responses.go @@ -42,7 +42,7 @@ func (o *UpsertFirehoseAlertPolicyReader) ReadResponse(response runtime.ClientRe } return nil, result default: - return nil, runtime.NewAPIError("[PUT /dex/firehoses/{firehoseUrn}/alertPolicy] upsertFirehoseAlertPolicy", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -52,7 +52,7 @@ func NewUpsertFirehoseAlertPolicyOK() *UpsertFirehoseAlertPolicyOK { } /* -UpsertFirehoseAlertPolicyOK describes a response with status code 200, with default header values. + UpsertFirehoseAlertPolicyOK describes a response with status code 200, with default header values. Updated alert policy for firehose. */ @@ -60,44 +60,9 @@ type UpsertFirehoseAlertPolicyOK struct { Payload *models.AlertPolicy } -// IsSuccess returns true when this upsert firehose alert policy o k response has a 2xx status code -func (o *UpsertFirehoseAlertPolicyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this upsert firehose alert policy o k response has a 3xx status code -func (o *UpsertFirehoseAlertPolicyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upsert firehose alert policy o k response has a 4xx status code -func (o *UpsertFirehoseAlertPolicyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this upsert firehose alert policy o k response has a 5xx status code -func (o *UpsertFirehoseAlertPolicyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this upsert firehose alert policy o k response a status code equal to that given -func (o *UpsertFirehoseAlertPolicyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the upsert firehose alert policy o k response -func (o *UpsertFirehoseAlertPolicyOK) Code() int { - return 200 -} - func (o *UpsertFirehoseAlertPolicyOK) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/alertPolicy][%d] upsertFirehoseAlertPolicyOK %+v", 200, o.Payload) } - -func (o *UpsertFirehoseAlertPolicyOK) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/alertPolicy][%d] upsertFirehoseAlertPolicyOK %+v", 200, o.Payload) -} - func (o *UpsertFirehoseAlertPolicyOK) GetPayload() *models.AlertPolicy { return o.Payload } @@ -120,7 +85,7 @@ func NewUpsertFirehoseAlertPolicyNotFound() *UpsertFirehoseAlertPolicyNotFound { } /* -UpsertFirehoseAlertPolicyNotFound describes a response with status code 404, with default header values. + UpsertFirehoseAlertPolicyNotFound describes a response with status code 404, with default header values. Firehose with given URN was not found */ @@ -128,44 +93,9 @@ type UpsertFirehoseAlertPolicyNotFound struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this upsert firehose alert policy not found response has a 2xx status code -func (o *UpsertFirehoseAlertPolicyNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this upsert firehose alert policy not found response has a 3xx status code -func (o *UpsertFirehoseAlertPolicyNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upsert firehose alert policy not found response has a 4xx status code -func (o *UpsertFirehoseAlertPolicyNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this upsert firehose alert policy not found response has a 5xx status code -func (o *UpsertFirehoseAlertPolicyNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this upsert firehose alert policy not found response a status code equal to that given -func (o *UpsertFirehoseAlertPolicyNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the upsert firehose alert policy not found response -func (o *UpsertFirehoseAlertPolicyNotFound) Code() int { - return 404 -} - func (o *UpsertFirehoseAlertPolicyNotFound) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/alertPolicy][%d] upsertFirehoseAlertPolicyNotFound %+v", 404, o.Payload) } - -func (o *UpsertFirehoseAlertPolicyNotFound) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/alertPolicy][%d] upsertFirehoseAlertPolicyNotFound %+v", 404, o.Payload) -} - func (o *UpsertFirehoseAlertPolicyNotFound) GetPayload() *models.ErrorResponse { return o.Payload } @@ -188,7 +118,7 @@ func NewUpsertFirehoseAlertPolicyInternalServerError() *UpsertFirehoseAlertPolic } /* -UpsertFirehoseAlertPolicyInternalServerError describes a response with status code 500, with default header values. + UpsertFirehoseAlertPolicyInternalServerError describes a response with status code 500, with default header values. internal error */ @@ -196,44 +126,9 @@ type UpsertFirehoseAlertPolicyInternalServerError struct { Payload *models.ErrorResponse } -// IsSuccess returns true when this upsert firehose alert policy internal server error response has a 2xx status code -func (o *UpsertFirehoseAlertPolicyInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this upsert firehose alert policy internal server error response has a 3xx status code -func (o *UpsertFirehoseAlertPolicyInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upsert firehose alert policy internal server error response has a 4xx status code -func (o *UpsertFirehoseAlertPolicyInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this upsert firehose alert policy internal server error response has a 5xx status code -func (o *UpsertFirehoseAlertPolicyInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this upsert firehose alert policy internal server error response a status code equal to that given -func (o *UpsertFirehoseAlertPolicyInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the upsert firehose alert policy internal server error response -func (o *UpsertFirehoseAlertPolicyInternalServerError) Code() int { - return 500 -} - func (o *UpsertFirehoseAlertPolicyInternalServerError) Error() string { return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/alertPolicy][%d] upsertFirehoseAlertPolicyInternalServerError %+v", 500, o.Payload) } - -func (o *UpsertFirehoseAlertPolicyInternalServerError) String() string { - return fmt.Sprintf("[PUT /dex/firehoses/{firehoseUrn}/alertPolicy][%d] upsertFirehoseAlertPolicyInternalServerError %+v", 500, o.Payload) -} - func (o *UpsertFirehoseAlertPolicyInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } diff --git a/generated/models/alert_array.go b/generated/models/alert_array.go index 31ad0aac..17f8da48 100644 --- a/generated/models/alert_array.go +++ b/generated/models/alert_array.go @@ -51,8 +51,6 @@ func (m *AlertArray) validateItems(formats strfmt.Registry) error { if err := m.Items[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) } return err } @@ -82,16 +80,9 @@ func (m *AlertArray) contextValidateItems(ctx context.Context, formats strfmt.Re for i := 0; i < len(m.Items); i++ { if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) } return err } diff --git a/generated/models/alert_channel.go b/generated/models/alert_channel.go index 43d9dd41..99bbbf18 100644 --- a/generated/models/alert_channel.go +++ b/generated/models/alert_channel.go @@ -71,8 +71,6 @@ func (m *AlertChannel) validateChannelCriticality(formats strfmt.Registry) error if err := m.ChannelCriticality.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("channel_criticality") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channel_criticality") } return err } @@ -90,8 +88,6 @@ func (m *AlertChannel) validateChannelType(formats strfmt.Registry) error { if err := m.ChannelType.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("channel_type") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channel_type") } return err } @@ -129,16 +125,9 @@ func (m *AlertChannel) ContextValidate(ctx context.Context, formats strfmt.Regis func (m *AlertChannel) contextValidateChannelCriticality(ctx context.Context, formats strfmt.Registry) error { if m.ChannelCriticality != nil { - - if swag.IsZero(m.ChannelCriticality) { // not required - return nil - } - if err := m.ChannelCriticality.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("channel_criticality") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channel_criticality") } return err } @@ -150,16 +139,9 @@ func (m *AlertChannel) contextValidateChannelCriticality(ctx context.Context, fo func (m *AlertChannel) contextValidateChannelType(ctx context.Context, formats strfmt.Registry) error { if m.ChannelType != nil { - - if swag.IsZero(m.ChannelType) { // not required - return nil - } - if err := m.ChannelType.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("channel_type") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channel_type") } return err } diff --git a/generated/models/alert_channel_form.go b/generated/models/alert_channel_form.go index 7b467c36..9811eeef 100644 --- a/generated/models/alert_channel_form.go +++ b/generated/models/alert_channel_form.go @@ -68,8 +68,6 @@ func (m *AlertChannelForm) validateChannelCriticality(formats strfmt.Registry) e if err := m.ChannelCriticality.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("channel_criticality") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channel_criticality") } return err } @@ -92,8 +90,6 @@ func (m *AlertChannelForm) validateChannelType(formats strfmt.Registry) error { if err := m.ChannelType.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("channel_type") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channel_type") } return err } @@ -123,12 +119,9 @@ func (m *AlertChannelForm) ContextValidate(ctx context.Context, formats strfmt.R func (m *AlertChannelForm) contextValidateChannelCriticality(ctx context.Context, formats strfmt.Registry) error { if m.ChannelCriticality != nil { - if err := m.ChannelCriticality.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("channel_criticality") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channel_criticality") } return err } @@ -140,12 +133,9 @@ func (m *AlertChannelForm) contextValidateChannelCriticality(ctx context.Context func (m *AlertChannelForm) contextValidateChannelType(ctx context.Context, formats strfmt.Registry) error { if m.ChannelType != nil { - if err := m.ChannelType.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("channel_type") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channel_type") } return err } diff --git a/generated/models/alert_channel_type.go b/generated/models/alert_channel_type.go index 82e1de20..2330e36f 100644 --- a/generated/models/alert_channel_type.go +++ b/generated/models/alert_channel_type.go @@ -20,12 +20,8 @@ import ( type AlertChannelType string func NewAlertChannelType(value AlertChannelType) *AlertChannelType { - return &value -} - -// Pointer returns a pointer to a freshly-allocated AlertChannelType. -func (m AlertChannelType) Pointer() *AlertChannelType { - return &m + v := value + return &v } const ( diff --git a/generated/models/alert_policy.go b/generated/models/alert_policy.go index f6606531..7a980411 100644 --- a/generated/models/alert_policy.go +++ b/generated/models/alert_policy.go @@ -56,8 +56,6 @@ func (m *AlertPolicy) validateRules(formats strfmt.Registry) error { if err := m.Rules[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rules" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rules" + "." + strconv.Itoa(i)) } return err } @@ -100,16 +98,9 @@ func (m *AlertPolicy) contextValidateRules(ctx context.Context, formats strfmt.R for i := 0; i < len(m.Rules); i++ { if m.Rules[i] != nil { - - if swag.IsZero(m.Rules[i]) { // not required - return nil - } - if err := m.Rules[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rules" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rules" + "." + strconv.Itoa(i)) } return err } diff --git a/generated/models/alert_template.go b/generated/models/alert_template.go index b38defe6..dba62507 100644 --- a/generated/models/alert_template.go +++ b/generated/models/alert_template.go @@ -102,8 +102,6 @@ func (m *AlertTemplate) validateVariables(formats strfmt.Registry) error { if err := m.Variables.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("variables") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("variables") } return err } @@ -155,16 +153,9 @@ func (m *AlertTemplate) contextValidateUpdatedAt(ctx context.Context, formats st func (m *AlertTemplate) contextValidateVariables(ctx context.Context, formats strfmt.Registry) error { if m.Variables != nil { - - if swag.IsZero(m.Variables) { // not required - return nil - } - if err := m.Variables.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("variables") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("variables") } return err } diff --git a/generated/models/alert_templates_array.go b/generated/models/alert_templates_array.go index 746eb872..e7ef29a7 100644 --- a/generated/models/alert_templates_array.go +++ b/generated/models/alert_templates_array.go @@ -51,8 +51,6 @@ func (m *AlertTemplatesArray) validateItems(formats strfmt.Registry) error { if err := m.Items[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) } return err } @@ -82,16 +80,9 @@ func (m *AlertTemplatesArray) contextValidateItems(ctx context.Context, formats for i := 0; i < len(m.Items); i++ { if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) } return err } diff --git a/generated/models/channel_criticality.go b/generated/models/channel_criticality.go index a5753384..0c6e6499 100644 --- a/generated/models/channel_criticality.go +++ b/generated/models/channel_criticality.go @@ -20,12 +20,8 @@ import ( type ChannelCriticality string func NewChannelCriticality(value ChannelCriticality) *ChannelCriticality { - return &value -} - -// Pointer returns a pointer to a freshly-allocated ChannelCriticality. -func (m ChannelCriticality) Pointer() *ChannelCriticality { - return &m + v := value + return &v } const ( diff --git a/generated/models/firehose.go b/generated/models/firehose.go index 46856f6e..14fe9083 100644 --- a/generated/models/firehose.go +++ b/generated/models/firehose.go @@ -129,8 +129,6 @@ func (m *Firehose) validateConfigs(formats strfmt.Registry) error { if err := m.Configs.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("configs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configs") } return err } @@ -185,8 +183,6 @@ func (m *Firehose) validateState(formats strfmt.Registry) error { if err := m.State.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("state") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("state") } return err } @@ -257,12 +253,9 @@ func (m *Firehose) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Firehose) contextValidateConfigs(ctx context.Context, formats strfmt.Registry) error { if m.Configs != nil { - if err := m.Configs.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("configs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configs") } return err } @@ -292,16 +285,9 @@ func (m *Firehose) contextValidateCreatedBy(ctx context.Context, formats strfmt. func (m *Firehose) contextValidateState(ctx context.Context, formats strfmt.Registry) error { if m.State != nil { - - if swag.IsZero(m.State) { // not required - return nil - } - if err := m.State.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("state") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("state") } return err } diff --git a/generated/models/firehose_array.go b/generated/models/firehose_array.go index dffdc715..7313bcaf 100644 --- a/generated/models/firehose_array.go +++ b/generated/models/firehose_array.go @@ -51,8 +51,6 @@ func (m *FirehoseArray) validateItems(formats strfmt.Registry) error { if err := m.Items[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) } return err } @@ -82,16 +80,9 @@ func (m *FirehoseArray) contextValidateItems(ctx context.Context, formats strfmt for i := 0; i < len(m.Items); i++ { if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) } return err } diff --git a/generated/models/firehose_update_request.go b/generated/models/firehose_update_request.go index aeb15981..4fcaa3c4 100644 --- a/generated/models/firehose_update_request.go +++ b/generated/models/firehose_update_request.go @@ -60,8 +60,6 @@ func (m *FirehoseUpdateRequest) validateConfigs(formats strfmt.Registry) error { if err := m.Configs.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("configs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configs") } return err } @@ -100,16 +98,9 @@ func (m *FirehoseUpdateRequest) ContextValidate(ctx context.Context, formats str func (m *FirehoseUpdateRequest) contextValidateConfigs(ctx context.Context, formats strfmt.Registry) error { if m.Configs != nil { - - if swag.IsZero(m.Configs) { // not required - return nil - } - if err := m.Configs.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("configs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configs") } return err } diff --git a/generated/models/history_response.go b/generated/models/history_response.go index 5aa4d629..59a34c75 100644 --- a/generated/models/history_response.go +++ b/generated/models/history_response.go @@ -51,8 +51,6 @@ func (m *HistoryResponse) validateHistory(formats strfmt.Registry) error { if err := m.History[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("history" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("history" + "." + strconv.Itoa(i)) } return err } @@ -82,16 +80,9 @@ func (m *HistoryResponse) contextValidateHistory(ctx context.Context, formats st for i := 0; i < len(m.History); i++ { if m.History[i] != nil { - - if swag.IsZero(m.History[i]) { // not required - return nil - } - if err := m.History[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("history" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("history" + "." + strconv.Itoa(i)) } return err } diff --git a/generated/models/kubernetes_array.go b/generated/models/kubernetes_array.go index 7f118553..fc3a2e43 100644 --- a/generated/models/kubernetes_array.go +++ b/generated/models/kubernetes_array.go @@ -51,8 +51,6 @@ func (m *KubernetesArray) validateItems(formats strfmt.Registry) error { if err := m.Items[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) } return err } @@ -82,16 +80,9 @@ func (m *KubernetesArray) contextValidateItems(ctx context.Context, formats strf for i := 0; i < len(m.Items); i++ { if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) } return err } diff --git a/generated/models/logs.go b/generated/models/logs.go index 61c4f1cc..5940bdb6 100644 --- a/generated/models/logs.go +++ b/generated/models/logs.go @@ -32,8 +32,6 @@ func (m Logs) Validate(formats strfmt.Registry) error { if err := m[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) } return err } @@ -54,16 +52,9 @@ func (m Logs) ContextValidate(ctx context.Context, formats strfmt.Registry) erro for i := 0; i < len(m); i++ { if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - if err := m[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) } return err } diff --git a/generated/models/project_array.go b/generated/models/project_array.go index fead4faf..dd44433e 100644 --- a/generated/models/project_array.go +++ b/generated/models/project_array.go @@ -51,8 +51,6 @@ func (m *ProjectArray) validateItems(formats strfmt.Registry) error { if err := m.Items[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) } return err } @@ -82,16 +80,9 @@ func (m *ProjectArray) contextValidateItems(ctx context.Context, formats strfmt. for i := 0; i < len(m.Items); i++ { if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) } return err } diff --git a/generated/models/rule.go b/generated/models/rule.go index 47d429e1..f377de78 100644 --- a/generated/models/rule.go +++ b/generated/models/rule.go @@ -106,8 +106,6 @@ func (m *Rule) validateVariables(formats strfmt.Registry) error { if err := m.Variables[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("variables" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("variables" + "." + strconv.Itoa(i)) } return err } @@ -176,16 +174,9 @@ func (m *Rule) contextValidateVariables(ctx context.Context, formats strfmt.Regi for i := 0; i < len(m.Variables); i++ { if m.Variables[i] != nil { - - if swag.IsZero(m.Variables[i]) { // not required - return nil - } - if err := m.Variables[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("variables" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("variables" + "." + strconv.Itoa(i)) } return err } diff --git a/generated/models/subscription.go b/generated/models/subscription.go index e7d578fe..ec521ae1 100644 --- a/generated/models/subscription.go +++ b/generated/models/subscription.go @@ -101,8 +101,6 @@ func (m *Subscription) validateReceivers(formats strfmt.Registry) error { if err := m.Receivers[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("receivers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("receivers" + "." + strconv.Itoa(i)) } return err } @@ -144,16 +142,9 @@ func (m *Subscription) contextValidateReceivers(ctx context.Context, formats str for i := 0; i < len(m.Receivers); i++ { if m.Receivers[i] != nil { - - if swag.IsZero(m.Receivers[i]) { // not required - return nil - } - if err := m.Receivers[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("receivers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("receivers" + "." + strconv.Itoa(i)) } return err } diff --git a/generated/models/subscription_form.go b/generated/models/subscription_form.go index 4b7a45a5..cf7e1577 100644 --- a/generated/models/subscription_form.go +++ b/generated/models/subscription_form.go @@ -143,8 +143,6 @@ func (m *SubscriptionForm) validateChannelCriticality(formats strfmt.Registry) e if err := m.ChannelCriticality.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("channel_criticality") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channel_criticality") } return err } @@ -243,12 +241,9 @@ func (m *SubscriptionForm) ContextValidate(ctx context.Context, formats strfmt.R func (m *SubscriptionForm) contextValidateChannelCriticality(ctx context.Context, formats strfmt.Registry) error { if m.ChannelCriticality != nil { - if err := m.ChannelCriticality.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("channel_criticality") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channel_criticality") } return err } diff --git a/internal/server/v1/dlq/errors.go b/internal/server/v1/dlq/errors.go new file mode 100644 index 00000000..99b522a7 --- /dev/null +++ b/internal/server/v1/dlq/errors.go @@ -0,0 +1,8 @@ +package dlq + +import "errors" + +var ( + ErrFirehoseNamespaceNotFound = errors.New("could not find firehose namespace from resource output") + ErrFirehoseNamespaceInvalid = errors.New("invalid firehose namespace from resource output") +) diff --git a/internal/server/v1/dlq/mapper.go b/internal/server/v1/dlq/mapper.go index 65e28b60..7a7e88e0 100644 --- a/internal/server/v1/dlq/mapper.go +++ b/internal/server/v1/dlq/mapper.go @@ -1,7 +1,6 @@ package dlq import ( - "errors" "fmt" "strconv" @@ -14,10 +13,17 @@ import ( "github.com/goto/dex/internal/server/utils" ) -func enrichDlqJob(job *models.DlqJob, res *entropyv1beta1.Resource, cfg *DlqJobConfig) error { +const ( + kubeClusterDependenciesKey = "kube_cluster" + //nolint + dlqCredentialsSecretName = "firehose-bigquery-sink-credential" + dlqTelegrafConfigName = "dlq-processor-telegraf" +) + +func EnrichDlqJob(job *models.DlqJob, res *entropyv1beta1.Resource, cfg *DlqJobConfig) error { var kubeCluster string for _, dep := range res.Spec.GetDependencies() { - if dep.GetKey() == "kube_cluster" { + if dep.GetKey() == kubeClusterDependenciesKey { kubeCluster = dep.GetValue() } } @@ -29,11 +35,11 @@ func enrichDlqJob(job *models.DlqJob, res *entropyv1beta1.Resource, cfg *DlqJobC outputMap := res.GetState().GetOutput().GetStructValue().AsMap() namespaceAny, exists := outputMap["namespace"] if !exists { - return errors.New("could not find firehose namespace from resource output") + return ErrFirehoseNamespaceNotFound } namespace, ok := namespaceAny.(string) if !ok { - return errors.New("firehose namespace format is invalid") + return ErrFirehoseNamespaceInvalid } envs := modConf.EnvVariables @@ -82,7 +88,7 @@ func enrichDlqJob(job *models.DlqJob, res *entropyv1beta1.Resource, cfg *DlqJobC } // DlqJob param here is expected to have been enriched with firehose config -func mapToEntropyResource(job models.DlqJob) (*entropyv1beta1.Resource, error) { +func MapToEntropyResource(job models.DlqJob) (*entropyv1beta1.Resource, error) { cfgStruct, err := makeConfigStruct(job) if err != nil { return nil, err @@ -109,13 +115,9 @@ func mapToEntropyResource(job models.DlqJob) (*entropyv1beta1.Resource, error) { } func makeConfigStruct(job models.DlqJob) (*structpb.Value, error) { - - dlqCredentialSecretName := "firehose-bigquery-sink-credential" - dlqTelegrafConfigName := "dlq-processor-telegraf" return utils.GoValToProtoStruct(entropy.JobConfig{ Replicas: int32(job.Replicas), Namespace: job.Namespace, - Name: buildEntropyResourceName(job), Containers: []entropy.JobContainer{ { Name: "dlq-job", @@ -123,7 +125,7 @@ func makeConfigStruct(job models.DlqJob) (*structpb.Value, error) { ImagePullPolicy: "Always", SecretsVolumes: []entropy.JobSecret{ { - Name: dlqCredentialSecretName, + Name: dlqCredentialsSecretName, Mount: job.DlqGcsCredentialPath, }, }, @@ -181,7 +183,7 @@ func makeConfigStruct(job models.DlqJob) (*structpb.Value, error) { }, Volumes: []entropy.JobVolume{ { - Name: dlqCredentialSecretName, + Name: dlqCredentialsSecretName, Kind: "secret", }, { @@ -192,7 +194,7 @@ func makeConfigStruct(job models.DlqJob) (*structpb.Value, error) { }) } -func mapToDlqJob(r *entropyv1beta1.Resource) (*models.DlqJob, error) { +func MapToDlqJob(r *entropyv1beta1.Resource) (*models.DlqJob, error) { labels := r.Labels var modConf entropy.JobConfig @@ -260,13 +262,3 @@ func buildEntropyResourceName(job models.DlqJob) string { job.Date, // ) } - -func buildJobName(job models.DlqJob) string { - randomKey := "91238192" - return fmt.Sprintf( - "%s-%s-%s", - job.Date, - job.Topic, - randomKey, - ) -} diff --git a/internal/server/v1/dlq/service.go b/internal/server/v1/dlq/service.go index eb584eaf..21e9de14 100644 --- a/internal/server/v1/dlq/service.go +++ b/internal/server/v1/dlq/service.go @@ -3,7 +3,6 @@ package dlq import ( entropyv1beta1rpc "buf.build/gen/go/gotocompany/proton/grpc/go/gotocompany/entropy/v1beta1/entropyv1beta1grpc" - "github.com/goto/dex/generated/models" "github.com/goto/dex/internal/server/gcs" ) @@ -25,13 +24,3 @@ func NewService(client entropyv1beta1rpc.ResourceServiceClient, gcsClient gcs.Bl cfg: cfg, } } - -// TODO: replace *DlqJob with a generated models.DlqJob -func (s *Service) CreateDLQJob(dlqJob *models.DlqJob) error { - // validate dlqJob for creation - // fetch firehose details - // enrich DlqJob with firehose details - // map DlqJob to entropy resource -> return entropy.Resource (kind = job) - // entropy create resource - return nil -}