diff --git a/go/client/operations/app_delete_parameters.go b/go/client/operations/app_delete_parameters.go new file mode 100644 index 0000000..34e851e --- /dev/null +++ b/go/client/operations/app_delete_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAppDeleteParams creates a new AppDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAppDeleteParams() *AppDeleteParams { + return &AppDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAppDeleteParamsWithTimeout creates a new AppDeleteParams object +// with the ability to set a timeout on a request. +func NewAppDeleteParamsWithTimeout(timeout time.Duration) *AppDeleteParams { + return &AppDeleteParams{ + timeout: timeout, + } +} + +// NewAppDeleteParamsWithContext creates a new AppDeleteParams object +// with the ability to set a context for a request. +func NewAppDeleteParamsWithContext(ctx context.Context) *AppDeleteParams { + return &AppDeleteParams{ + Context: ctx, + } +} + +// NewAppDeleteParamsWithHTTPClient creates a new AppDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewAppDeleteParamsWithHTTPClient(client *http.Client) *AppDeleteParams { + return &AppDeleteParams{ + HTTPClient: client, + } +} + +/* +AppDeleteParams contains all the parameters to send to the API endpoint + + for the app delete operation. + + Typically these are written to a http.Request. +*/ +type AppDeleteParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the app delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppDeleteParams) WithDefaults() *AppDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the app delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the app delete params +func (o *AppDeleteParams) WithTimeout(timeout time.Duration) *AppDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the app delete params +func (o *AppDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the app delete params +func (o *AppDeleteParams) WithContext(ctx context.Context) *AppDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the app delete params +func (o *AppDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the app delete params +func (o *AppDeleteParams) WithHTTPClient(client *http.Client) *AppDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the app delete params +func (o *AppDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the app delete params +func (o *AppDeleteParams) WithAppSlug(appSlug string) *AppDeleteParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the app delete params +func (o *AppDeleteParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AppDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/app_delete_responses.go b/go/client/operations/app_delete_responses.go new file mode 100644 index 0000000..ca166d3 --- /dev/null +++ b/go/client/operations/app_delete_responses.go @@ -0,0 +1,374 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AppDeleteReader is a Reader for the AppDelete structure. +type AppDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAppDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAppDeleteBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAppDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAppDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAppDeleteInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAppDeleteOK creates a AppDeleteOK with default headers values +func NewAppDeleteOK() *AppDeleteOK { + return &AppDeleteOK{} +} + +/* +AppDeleteOK describes a response with status code 200, with default header values. + +OK +*/ +type AppDeleteOK struct { + Payload *models.V0AppDeleteRespModel +} + +// IsSuccess returns true when this app delete o k response has a 2xx status code +func (o *AppDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this app delete o k response has a 3xx status code +func (o *AppDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app delete o k response has a 4xx status code +func (o *AppDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this app delete o k response has a 5xx status code +func (o *AppDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this app delete o k response a status code equal to that given +func (o *AppDeleteOK) IsCode(code int) bool { + return code == 200 +} + +func (o *AppDeleteOK) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}][%d] appDeleteOK %+v", 200, o.Payload) +} + +func (o *AppDeleteOK) String() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}][%d] appDeleteOK %+v", 200, o.Payload) +} + +func (o *AppDeleteOK) GetPayload() *models.V0AppDeleteRespModel { + return o.Payload +} + +func (o *AppDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AppDeleteRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppDeleteBadRequest creates a AppDeleteBadRequest with default headers values +func NewAppDeleteBadRequest() *AppDeleteBadRequest { + return &AppDeleteBadRequest{} +} + +/* +AppDeleteBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AppDeleteBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app delete bad request response has a 2xx status code +func (o *AppDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app delete bad request response has a 3xx status code +func (o *AppDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app delete bad request response has a 4xx status code +func (o *AppDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this app delete bad request response has a 5xx status code +func (o *AppDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this app delete bad request response a status code equal to that given +func (o *AppDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +func (o *AppDeleteBadRequest) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}][%d] appDeleteBadRequest %+v", 400, o.Payload) +} + +func (o *AppDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}][%d] appDeleteBadRequest %+v", 400, o.Payload) +} + +func (o *AppDeleteBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppDeleteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppDeleteUnauthorized creates a AppDeleteUnauthorized with default headers values +func NewAppDeleteUnauthorized() *AppDeleteUnauthorized { + return &AppDeleteUnauthorized{} +} + +/* +AppDeleteUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AppDeleteUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app delete unauthorized response has a 2xx status code +func (o *AppDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app delete unauthorized response has a 3xx status code +func (o *AppDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app delete unauthorized response has a 4xx status code +func (o *AppDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this app delete unauthorized response has a 5xx status code +func (o *AppDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this app delete unauthorized response a status code equal to that given +func (o *AppDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +func (o *AppDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}][%d] appDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *AppDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}][%d] appDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *AppDeleteUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppDeleteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppDeleteNotFound creates a AppDeleteNotFound with default headers values +func NewAppDeleteNotFound() *AppDeleteNotFound { + return &AppDeleteNotFound{} +} + +/* +AppDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AppDeleteNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app delete not found response has a 2xx status code +func (o *AppDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app delete not found response has a 3xx status code +func (o *AppDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app delete not found response has a 4xx status code +func (o *AppDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this app delete not found response has a 5xx status code +func (o *AppDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this app delete not found response a status code equal to that given +func (o *AppDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +func (o *AppDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}][%d] appDeleteNotFound %+v", 404, o.Payload) +} + +func (o *AppDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}][%d] appDeleteNotFound %+v", 404, o.Payload) +} + +func (o *AppDeleteNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppDeleteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppDeleteInternalServerError creates a AppDeleteInternalServerError with default headers values +func NewAppDeleteInternalServerError() *AppDeleteInternalServerError { + return &AppDeleteInternalServerError{} +} + +/* +AppDeleteInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AppDeleteInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app delete internal server error response has a 2xx status code +func (o *AppDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app delete internal server error response has a 3xx status code +func (o *AppDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app delete internal server error response has a 4xx status code +func (o *AppDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this app delete internal server error response has a 5xx status code +func (o *AppDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this app delete internal server error response a status code equal to that given +func (o *AppDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +func (o *AppDeleteInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}][%d] appDeleteInternalServerError %+v", 500, o.Payload) +} + +func (o *AppDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}][%d] appDeleteInternalServerError %+v", 500, o.Payload) +} + +func (o *AppDeleteInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppDeleteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/app_notifications_parameters.go b/go/client/operations/app_notifications_parameters.go new file mode 100644 index 0000000..5f2a841 --- /dev/null +++ b/go/client/operations/app_notifications_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewAppNotificationsParams creates a new AppNotificationsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAppNotificationsParams() *AppNotificationsParams { + return &AppNotificationsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAppNotificationsParamsWithTimeout creates a new AppNotificationsParams object +// with the ability to set a timeout on a request. +func NewAppNotificationsParamsWithTimeout(timeout time.Duration) *AppNotificationsParams { + return &AppNotificationsParams{ + timeout: timeout, + } +} + +// NewAppNotificationsParamsWithContext creates a new AppNotificationsParams object +// with the ability to set a context for a request. +func NewAppNotificationsParamsWithContext(ctx context.Context) *AppNotificationsParams { + return &AppNotificationsParams{ + Context: ctx, + } +} + +// NewAppNotificationsParamsWithHTTPClient creates a new AppNotificationsParams object +// with the ability to set a custom HTTPClient for a request. +func NewAppNotificationsParamsWithHTTPClient(client *http.Client) *AppNotificationsParams { + return &AppNotificationsParams{ + HTTPClient: client, + } +} + +/* +AppNotificationsParams contains all the parameters to send to the API endpoint + + for the app notifications operation. + + Typically these are written to a http.Request. +*/ +type AppNotificationsParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* NotificationSettingsParams. + + App notification settings parameters + */ + NotificationSettingsParams *models.V0AppNotificationSettingsParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the app notifications params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppNotificationsParams) WithDefaults() *AppNotificationsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the app notifications params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppNotificationsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the app notifications params +func (o *AppNotificationsParams) WithTimeout(timeout time.Duration) *AppNotificationsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the app notifications params +func (o *AppNotificationsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the app notifications params +func (o *AppNotificationsParams) WithContext(ctx context.Context) *AppNotificationsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the app notifications params +func (o *AppNotificationsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the app notifications params +func (o *AppNotificationsParams) WithHTTPClient(client *http.Client) *AppNotificationsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the app notifications params +func (o *AppNotificationsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the app notifications params +func (o *AppNotificationsParams) WithAppSlug(appSlug string) *AppNotificationsParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the app notifications params +func (o *AppNotificationsParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithNotificationSettingsParams adds the notificationSettingsParams to the app notifications params +func (o *AppNotificationsParams) WithNotificationSettingsParams(notificationSettingsParams *models.V0AppNotificationSettingsParams) *AppNotificationsParams { + o.SetNotificationSettingsParams(notificationSettingsParams) + return o +} + +// SetNotificationSettingsParams adds the notificationSettingsParams to the app notifications params +func (o *AppNotificationsParams) SetNotificationSettingsParams(notificationSettingsParams *models.V0AppNotificationSettingsParams) { + o.NotificationSettingsParams = notificationSettingsParams +} + +// WriteToRequest writes these params to a swagger request +func (o *AppNotificationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.NotificationSettingsParams != nil { + if err := r.SetBodyParam(o.NotificationSettingsParams); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/app_notifications_responses.go b/go/client/operations/app_notifications_responses.go new file mode 100644 index 0000000..a97ce17 --- /dev/null +++ b/go/client/operations/app_notifications_responses.go @@ -0,0 +1,374 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AppNotificationsReader is a Reader for the AppNotifications structure. +type AppNotificationsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppNotificationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAppNotificationsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAppNotificationsBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAppNotificationsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAppNotificationsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAppNotificationsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAppNotificationsOK creates a AppNotificationsOK with default headers values +func NewAppNotificationsOK() *AppNotificationsOK { + return &AppNotificationsOK{} +} + +/* +AppNotificationsOK describes a response with status code 200, with default header values. + +OK +*/ +type AppNotificationsOK struct { + Payload *models.V0AppNotificationSettingsUpdateResponse +} + +// IsSuccess returns true when this app notifications o k response has a 2xx status code +func (o *AppNotificationsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this app notifications o k response has a 3xx status code +func (o *AppNotificationsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app notifications o k response has a 4xx status code +func (o *AppNotificationsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this app notifications o k response has a 5xx status code +func (o *AppNotificationsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this app notifications o k response a status code equal to that given +func (o *AppNotificationsOK) IsCode(code int) bool { + return code == 200 +} + +func (o *AppNotificationsOK) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/update-email-notifications][%d] appNotificationsOK %+v", 200, o.Payload) +} + +func (o *AppNotificationsOK) String() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/update-email-notifications][%d] appNotificationsOK %+v", 200, o.Payload) +} + +func (o *AppNotificationsOK) GetPayload() *models.V0AppNotificationSettingsUpdateResponse { + return o.Payload +} + +func (o *AppNotificationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AppNotificationSettingsUpdateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppNotificationsBadRequest creates a AppNotificationsBadRequest with default headers values +func NewAppNotificationsBadRequest() *AppNotificationsBadRequest { + return &AppNotificationsBadRequest{} +} + +/* +AppNotificationsBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AppNotificationsBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app notifications bad request response has a 2xx status code +func (o *AppNotificationsBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app notifications bad request response has a 3xx status code +func (o *AppNotificationsBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app notifications bad request response has a 4xx status code +func (o *AppNotificationsBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this app notifications bad request response has a 5xx status code +func (o *AppNotificationsBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this app notifications bad request response a status code equal to that given +func (o *AppNotificationsBadRequest) IsCode(code int) bool { + return code == 400 +} + +func (o *AppNotificationsBadRequest) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/update-email-notifications][%d] appNotificationsBadRequest %+v", 400, o.Payload) +} + +func (o *AppNotificationsBadRequest) String() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/update-email-notifications][%d] appNotificationsBadRequest %+v", 400, o.Payload) +} + +func (o *AppNotificationsBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppNotificationsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppNotificationsUnauthorized creates a AppNotificationsUnauthorized with default headers values +func NewAppNotificationsUnauthorized() *AppNotificationsUnauthorized { + return &AppNotificationsUnauthorized{} +} + +/* +AppNotificationsUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AppNotificationsUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app notifications unauthorized response has a 2xx status code +func (o *AppNotificationsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app notifications unauthorized response has a 3xx status code +func (o *AppNotificationsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app notifications unauthorized response has a 4xx status code +func (o *AppNotificationsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this app notifications unauthorized response has a 5xx status code +func (o *AppNotificationsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this app notifications unauthorized response a status code equal to that given +func (o *AppNotificationsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +func (o *AppNotificationsUnauthorized) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/update-email-notifications][%d] appNotificationsUnauthorized %+v", 401, o.Payload) +} + +func (o *AppNotificationsUnauthorized) String() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/update-email-notifications][%d] appNotificationsUnauthorized %+v", 401, o.Payload) +} + +func (o *AppNotificationsUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppNotificationsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppNotificationsNotFound creates a AppNotificationsNotFound with default headers values +func NewAppNotificationsNotFound() *AppNotificationsNotFound { + return &AppNotificationsNotFound{} +} + +/* +AppNotificationsNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AppNotificationsNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app notifications not found response has a 2xx status code +func (o *AppNotificationsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app notifications not found response has a 3xx status code +func (o *AppNotificationsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app notifications not found response has a 4xx status code +func (o *AppNotificationsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this app notifications not found response has a 5xx status code +func (o *AppNotificationsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this app notifications not found response a status code equal to that given +func (o *AppNotificationsNotFound) IsCode(code int) bool { + return code == 404 +} + +func (o *AppNotificationsNotFound) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/update-email-notifications][%d] appNotificationsNotFound %+v", 404, o.Payload) +} + +func (o *AppNotificationsNotFound) String() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/update-email-notifications][%d] appNotificationsNotFound %+v", 404, o.Payload) +} + +func (o *AppNotificationsNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppNotificationsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppNotificationsInternalServerError creates a AppNotificationsInternalServerError with default headers values +func NewAppNotificationsInternalServerError() *AppNotificationsInternalServerError { + return &AppNotificationsInternalServerError{} +} + +/* +AppNotificationsInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AppNotificationsInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app notifications internal server error response has a 2xx status code +func (o *AppNotificationsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app notifications internal server error response has a 3xx status code +func (o *AppNotificationsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app notifications internal server error response has a 4xx status code +func (o *AppNotificationsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this app notifications internal server error response has a 5xx status code +func (o *AppNotificationsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this app notifications internal server error response a status code equal to that given +func (o *AppNotificationsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +func (o *AppNotificationsInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/update-email-notifications][%d] appNotificationsInternalServerError %+v", 500, o.Payload) +} + +func (o *AppNotificationsInternalServerError) String() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/update-email-notifications][%d] appNotificationsInternalServerError %+v", 500, o.Payload) +} + +func (o *AppNotificationsInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppNotificationsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/app_setup_bitrise_yml_config_get_parameters.go b/go/client/operations/app_setup_bitrise_yml_config_get_parameters.go new file mode 100644 index 0000000..c60cc64 --- /dev/null +++ b/go/client/operations/app_setup_bitrise_yml_config_get_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAppSetupBitriseYmlConfigGetParams creates a new AppSetupBitriseYmlConfigGetParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAppSetupBitriseYmlConfigGetParams() *AppSetupBitriseYmlConfigGetParams { + return &AppSetupBitriseYmlConfigGetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAppSetupBitriseYmlConfigGetParamsWithTimeout creates a new AppSetupBitriseYmlConfigGetParams object +// with the ability to set a timeout on a request. +func NewAppSetupBitriseYmlConfigGetParamsWithTimeout(timeout time.Duration) *AppSetupBitriseYmlConfigGetParams { + return &AppSetupBitriseYmlConfigGetParams{ + timeout: timeout, + } +} + +// NewAppSetupBitriseYmlConfigGetParamsWithContext creates a new AppSetupBitriseYmlConfigGetParams object +// with the ability to set a context for a request. +func NewAppSetupBitriseYmlConfigGetParamsWithContext(ctx context.Context) *AppSetupBitriseYmlConfigGetParams { + return &AppSetupBitriseYmlConfigGetParams{ + Context: ctx, + } +} + +// NewAppSetupBitriseYmlConfigGetParamsWithHTTPClient creates a new AppSetupBitriseYmlConfigGetParams object +// with the ability to set a custom HTTPClient for a request. +func NewAppSetupBitriseYmlConfigGetParamsWithHTTPClient(client *http.Client) *AppSetupBitriseYmlConfigGetParams { + return &AppSetupBitriseYmlConfigGetParams{ + HTTPClient: client, + } +} + +/* +AppSetupBitriseYmlConfigGetParams contains all the parameters to send to the API endpoint + + for the app setup bitrise yml config get operation. + + Typically these are written to a http.Request. +*/ +type AppSetupBitriseYmlConfigGetParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the app setup bitrise yml config get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppSetupBitriseYmlConfigGetParams) WithDefaults() *AppSetupBitriseYmlConfigGetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the app setup bitrise yml config get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppSetupBitriseYmlConfigGetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the app setup bitrise yml config get params +func (o *AppSetupBitriseYmlConfigGetParams) WithTimeout(timeout time.Duration) *AppSetupBitriseYmlConfigGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the app setup bitrise yml config get params +func (o *AppSetupBitriseYmlConfigGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the app setup bitrise yml config get params +func (o *AppSetupBitriseYmlConfigGetParams) WithContext(ctx context.Context) *AppSetupBitriseYmlConfigGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the app setup bitrise yml config get params +func (o *AppSetupBitriseYmlConfigGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the app setup bitrise yml config get params +func (o *AppSetupBitriseYmlConfigGetParams) WithHTTPClient(client *http.Client) *AppSetupBitriseYmlConfigGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the app setup bitrise yml config get params +func (o *AppSetupBitriseYmlConfigGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the app setup bitrise yml config get params +func (o *AppSetupBitriseYmlConfigGetParams) WithAppSlug(appSlug string) *AppSetupBitriseYmlConfigGetParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the app setup bitrise yml config get params +func (o *AppSetupBitriseYmlConfigGetParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AppSetupBitriseYmlConfigGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/app_setup_bitrise_yml_config_get_responses.go b/go/client/operations/app_setup_bitrise_yml_config_get_responses.go new file mode 100644 index 0000000..887ad17 --- /dev/null +++ b/go/client/operations/app_setup_bitrise_yml_config_get_responses.go @@ -0,0 +1,374 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AppSetupBitriseYmlConfigGetReader is a Reader for the AppSetupBitriseYmlConfigGet structure. +type AppSetupBitriseYmlConfigGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppSetupBitriseYmlConfigGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAppSetupBitriseYmlConfigGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAppSetupBitriseYmlConfigGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAppSetupBitriseYmlConfigGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAppSetupBitriseYmlConfigGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAppSetupBitriseYmlConfigGetInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAppSetupBitriseYmlConfigGetOK creates a AppSetupBitriseYmlConfigGetOK with default headers values +func NewAppSetupBitriseYmlConfigGetOK() *AppSetupBitriseYmlConfigGetOK { + return &AppSetupBitriseYmlConfigGetOK{} +} + +/* +AppSetupBitriseYmlConfigGetOK describes a response with status code 200, with default header values. + +OK +*/ +type AppSetupBitriseYmlConfigGetOK struct { + Payload *models.V0BitriseYMLConfigGetResponse +} + +// IsSuccess returns true when this app setup bitrise yml config get o k response has a 2xx status code +func (o *AppSetupBitriseYmlConfigGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this app setup bitrise yml config get o k response has a 3xx status code +func (o *AppSetupBitriseYmlConfigGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app setup bitrise yml config get o k response has a 4xx status code +func (o *AppSetupBitriseYmlConfigGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this app setup bitrise yml config get o k response has a 5xx status code +func (o *AppSetupBitriseYmlConfigGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this app setup bitrise yml config get o k response a status code equal to that given +func (o *AppSetupBitriseYmlConfigGetOK) IsCode(code int) bool { + return code == 200 +} + +func (o *AppSetupBitriseYmlConfigGetOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigGetOK %+v", 200, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigGetOK) String() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigGetOK %+v", 200, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigGetOK) GetPayload() *models.V0BitriseYMLConfigGetResponse { + return o.Payload +} + +func (o *AppSetupBitriseYmlConfigGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BitriseYMLConfigGetResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppSetupBitriseYmlConfigGetBadRequest creates a AppSetupBitriseYmlConfigGetBadRequest with default headers values +func NewAppSetupBitriseYmlConfigGetBadRequest() *AppSetupBitriseYmlConfigGetBadRequest { + return &AppSetupBitriseYmlConfigGetBadRequest{} +} + +/* +AppSetupBitriseYmlConfigGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AppSetupBitriseYmlConfigGetBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app setup bitrise yml config get bad request response has a 2xx status code +func (o *AppSetupBitriseYmlConfigGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app setup bitrise yml config get bad request response has a 3xx status code +func (o *AppSetupBitriseYmlConfigGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app setup bitrise yml config get bad request response has a 4xx status code +func (o *AppSetupBitriseYmlConfigGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this app setup bitrise yml config get bad request response has a 5xx status code +func (o *AppSetupBitriseYmlConfigGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this app setup bitrise yml config get bad request response a status code equal to that given +func (o *AppSetupBitriseYmlConfigGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +func (o *AppSetupBitriseYmlConfigGetBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigGetBadRequest %+v", 400, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigGetBadRequest) String() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigGetBadRequest %+v", 400, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigGetBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppSetupBitriseYmlConfigGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppSetupBitriseYmlConfigGetUnauthorized creates a AppSetupBitriseYmlConfigGetUnauthorized with default headers values +func NewAppSetupBitriseYmlConfigGetUnauthorized() *AppSetupBitriseYmlConfigGetUnauthorized { + return &AppSetupBitriseYmlConfigGetUnauthorized{} +} + +/* +AppSetupBitriseYmlConfigGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AppSetupBitriseYmlConfigGetUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app setup bitrise yml config get unauthorized response has a 2xx status code +func (o *AppSetupBitriseYmlConfigGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app setup bitrise yml config get unauthorized response has a 3xx status code +func (o *AppSetupBitriseYmlConfigGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app setup bitrise yml config get unauthorized response has a 4xx status code +func (o *AppSetupBitriseYmlConfigGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this app setup bitrise yml config get unauthorized response has a 5xx status code +func (o *AppSetupBitriseYmlConfigGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this app setup bitrise yml config get unauthorized response a status code equal to that given +func (o *AppSetupBitriseYmlConfigGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +func (o *AppSetupBitriseYmlConfigGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigGetUnauthorized %+v", 401, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigGetUnauthorized) String() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigGetUnauthorized %+v", 401, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigGetUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppSetupBitriseYmlConfigGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppSetupBitriseYmlConfigGetNotFound creates a AppSetupBitriseYmlConfigGetNotFound with default headers values +func NewAppSetupBitriseYmlConfigGetNotFound() *AppSetupBitriseYmlConfigGetNotFound { + return &AppSetupBitriseYmlConfigGetNotFound{} +} + +/* +AppSetupBitriseYmlConfigGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AppSetupBitriseYmlConfigGetNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app setup bitrise yml config get not found response has a 2xx status code +func (o *AppSetupBitriseYmlConfigGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app setup bitrise yml config get not found response has a 3xx status code +func (o *AppSetupBitriseYmlConfigGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app setup bitrise yml config get not found response has a 4xx status code +func (o *AppSetupBitriseYmlConfigGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this app setup bitrise yml config get not found response has a 5xx status code +func (o *AppSetupBitriseYmlConfigGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this app setup bitrise yml config get not found response a status code equal to that given +func (o *AppSetupBitriseYmlConfigGetNotFound) IsCode(code int) bool { + return code == 404 +} + +func (o *AppSetupBitriseYmlConfigGetNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigGetNotFound %+v", 404, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigGetNotFound) String() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigGetNotFound %+v", 404, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigGetNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppSetupBitriseYmlConfigGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppSetupBitriseYmlConfigGetInternalServerError creates a AppSetupBitriseYmlConfigGetInternalServerError with default headers values +func NewAppSetupBitriseYmlConfigGetInternalServerError() *AppSetupBitriseYmlConfigGetInternalServerError { + return &AppSetupBitriseYmlConfigGetInternalServerError{} +} + +/* +AppSetupBitriseYmlConfigGetInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AppSetupBitriseYmlConfigGetInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app setup bitrise yml config get internal server error response has a 2xx status code +func (o *AppSetupBitriseYmlConfigGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app setup bitrise yml config get internal server error response has a 3xx status code +func (o *AppSetupBitriseYmlConfigGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app setup bitrise yml config get internal server error response has a 4xx status code +func (o *AppSetupBitriseYmlConfigGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this app setup bitrise yml config get internal server error response has a 5xx status code +func (o *AppSetupBitriseYmlConfigGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this app setup bitrise yml config get internal server error response a status code equal to that given +func (o *AppSetupBitriseYmlConfigGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +func (o *AppSetupBitriseYmlConfigGetInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigGetInternalServerError %+v", 500, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigGetInternalServerError) String() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigGetInternalServerError %+v", 500, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigGetInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppSetupBitriseYmlConfigGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/app_setup_bitrise_yml_config_update_parameters.go b/go/client/operations/app_setup_bitrise_yml_config_update_parameters.go new file mode 100644 index 0000000..5f8e155 --- /dev/null +++ b/go/client/operations/app_setup_bitrise_yml_config_update_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewAppSetupBitriseYmlConfigUpdateParams creates a new AppSetupBitriseYmlConfigUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAppSetupBitriseYmlConfigUpdateParams() *AppSetupBitriseYmlConfigUpdateParams { + return &AppSetupBitriseYmlConfigUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAppSetupBitriseYmlConfigUpdateParamsWithTimeout creates a new AppSetupBitriseYmlConfigUpdateParams object +// with the ability to set a timeout on a request. +func NewAppSetupBitriseYmlConfigUpdateParamsWithTimeout(timeout time.Duration) *AppSetupBitriseYmlConfigUpdateParams { + return &AppSetupBitriseYmlConfigUpdateParams{ + timeout: timeout, + } +} + +// NewAppSetupBitriseYmlConfigUpdateParamsWithContext creates a new AppSetupBitriseYmlConfigUpdateParams object +// with the ability to set a context for a request. +func NewAppSetupBitriseYmlConfigUpdateParamsWithContext(ctx context.Context) *AppSetupBitriseYmlConfigUpdateParams { + return &AppSetupBitriseYmlConfigUpdateParams{ + Context: ctx, + } +} + +// NewAppSetupBitriseYmlConfigUpdateParamsWithHTTPClient creates a new AppSetupBitriseYmlConfigUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewAppSetupBitriseYmlConfigUpdateParamsWithHTTPClient(client *http.Client) *AppSetupBitriseYmlConfigUpdateParams { + return &AppSetupBitriseYmlConfigUpdateParams{ + HTTPClient: client, + } +} + +/* +AppSetupBitriseYmlConfigUpdateParams contains all the parameters to send to the API endpoint + + for the app setup bitrise yml config update operation. + + Typically these are written to a http.Request. +*/ +type AppSetupBitriseYmlConfigUpdateParams struct { + + /* App. + + Bitrise YML Config Update Params + */ + App *models.V0BitriseYMLConfigUpdateParams + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the app setup bitrise yml config update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppSetupBitriseYmlConfigUpdateParams) WithDefaults() *AppSetupBitriseYmlConfigUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the app setup bitrise yml config update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppSetupBitriseYmlConfigUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the app setup bitrise yml config update params +func (o *AppSetupBitriseYmlConfigUpdateParams) WithTimeout(timeout time.Duration) *AppSetupBitriseYmlConfigUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the app setup bitrise yml config update params +func (o *AppSetupBitriseYmlConfigUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the app setup bitrise yml config update params +func (o *AppSetupBitriseYmlConfigUpdateParams) WithContext(ctx context.Context) *AppSetupBitriseYmlConfigUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the app setup bitrise yml config update params +func (o *AppSetupBitriseYmlConfigUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the app setup bitrise yml config update params +func (o *AppSetupBitriseYmlConfigUpdateParams) WithHTTPClient(client *http.Client) *AppSetupBitriseYmlConfigUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the app setup bitrise yml config update params +func (o *AppSetupBitriseYmlConfigUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithApp adds the app to the app setup bitrise yml config update params +func (o *AppSetupBitriseYmlConfigUpdateParams) WithApp(app *models.V0BitriseYMLConfigUpdateParams) *AppSetupBitriseYmlConfigUpdateParams { + o.SetApp(app) + return o +} + +// SetApp adds the app to the app setup bitrise yml config update params +func (o *AppSetupBitriseYmlConfigUpdateParams) SetApp(app *models.V0BitriseYMLConfigUpdateParams) { + o.App = app +} + +// WithAppSlug adds the appSlug to the app setup bitrise yml config update params +func (o *AppSetupBitriseYmlConfigUpdateParams) WithAppSlug(appSlug string) *AppSetupBitriseYmlConfigUpdateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the app setup bitrise yml config update params +func (o *AppSetupBitriseYmlConfigUpdateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AppSetupBitriseYmlConfigUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.App != nil { + if err := r.SetBodyParam(o.App); err != nil { + return err + } + } + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/app_setup_bitrise_yml_config_update_responses.go b/go/client/operations/app_setup_bitrise_yml_config_update_responses.go new file mode 100644 index 0000000..fc36d9b --- /dev/null +++ b/go/client/operations/app_setup_bitrise_yml_config_update_responses.go @@ -0,0 +1,362 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AppSetupBitriseYmlConfigUpdateReader is a Reader for the AppSetupBitriseYmlConfigUpdate structure. +type AppSetupBitriseYmlConfigUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppSetupBitriseYmlConfigUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewAppSetupBitriseYmlConfigUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAppSetupBitriseYmlConfigUpdateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAppSetupBitriseYmlConfigUpdateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAppSetupBitriseYmlConfigUpdateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAppSetupBitriseYmlConfigUpdateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAppSetupBitriseYmlConfigUpdateNoContent creates a AppSetupBitriseYmlConfigUpdateNoContent with default headers values +func NewAppSetupBitriseYmlConfigUpdateNoContent() *AppSetupBitriseYmlConfigUpdateNoContent { + return &AppSetupBitriseYmlConfigUpdateNoContent{} +} + +/* +AppSetupBitriseYmlConfigUpdateNoContent describes a response with status code 204, with default header values. + +No Content +*/ +type AppSetupBitriseYmlConfigUpdateNoContent struct { +} + +// IsSuccess returns true when this app setup bitrise yml config update no content response has a 2xx status code +func (o *AppSetupBitriseYmlConfigUpdateNoContent) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this app setup bitrise yml config update no content response has a 3xx status code +func (o *AppSetupBitriseYmlConfigUpdateNoContent) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app setup bitrise yml config update no content response has a 4xx status code +func (o *AppSetupBitriseYmlConfigUpdateNoContent) IsClientError() bool { + return false +} + +// IsServerError returns true when this app setup bitrise yml config update no content response has a 5xx status code +func (o *AppSetupBitriseYmlConfigUpdateNoContent) IsServerError() bool { + return false +} + +// IsCode returns true when this app setup bitrise yml config update no content response a status code equal to that given +func (o *AppSetupBitriseYmlConfigUpdateNoContent) IsCode(code int) bool { + return code == 204 +} + +func (o *AppSetupBitriseYmlConfigUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigUpdateNoContent ", 204) +} + +func (o *AppSetupBitriseYmlConfigUpdateNoContent) String() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigUpdateNoContent ", 204) +} + +func (o *AppSetupBitriseYmlConfigUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewAppSetupBitriseYmlConfigUpdateBadRequest creates a AppSetupBitriseYmlConfigUpdateBadRequest with default headers values +func NewAppSetupBitriseYmlConfigUpdateBadRequest() *AppSetupBitriseYmlConfigUpdateBadRequest { + return &AppSetupBitriseYmlConfigUpdateBadRequest{} +} + +/* +AppSetupBitriseYmlConfigUpdateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AppSetupBitriseYmlConfigUpdateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app setup bitrise yml config update bad request response has a 2xx status code +func (o *AppSetupBitriseYmlConfigUpdateBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app setup bitrise yml config update bad request response has a 3xx status code +func (o *AppSetupBitriseYmlConfigUpdateBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app setup bitrise yml config update bad request response has a 4xx status code +func (o *AppSetupBitriseYmlConfigUpdateBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this app setup bitrise yml config update bad request response has a 5xx status code +func (o *AppSetupBitriseYmlConfigUpdateBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this app setup bitrise yml config update bad request response a status code equal to that given +func (o *AppSetupBitriseYmlConfigUpdateBadRequest) IsCode(code int) bool { + return code == 400 +} + +func (o *AppSetupBitriseYmlConfigUpdateBadRequest) Error() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigUpdateBadRequest %+v", 400, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigUpdateBadRequest) String() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigUpdateBadRequest %+v", 400, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigUpdateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppSetupBitriseYmlConfigUpdateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppSetupBitriseYmlConfigUpdateUnauthorized creates a AppSetupBitriseYmlConfigUpdateUnauthorized with default headers values +func NewAppSetupBitriseYmlConfigUpdateUnauthorized() *AppSetupBitriseYmlConfigUpdateUnauthorized { + return &AppSetupBitriseYmlConfigUpdateUnauthorized{} +} + +/* +AppSetupBitriseYmlConfigUpdateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AppSetupBitriseYmlConfigUpdateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app setup bitrise yml config update unauthorized response has a 2xx status code +func (o *AppSetupBitriseYmlConfigUpdateUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app setup bitrise yml config update unauthorized response has a 3xx status code +func (o *AppSetupBitriseYmlConfigUpdateUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app setup bitrise yml config update unauthorized response has a 4xx status code +func (o *AppSetupBitriseYmlConfigUpdateUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this app setup bitrise yml config update unauthorized response has a 5xx status code +func (o *AppSetupBitriseYmlConfigUpdateUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this app setup bitrise yml config update unauthorized response a status code equal to that given +func (o *AppSetupBitriseYmlConfigUpdateUnauthorized) IsCode(code int) bool { + return code == 401 +} + +func (o *AppSetupBitriseYmlConfigUpdateUnauthorized) Error() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigUpdateUnauthorized %+v", 401, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigUpdateUnauthorized) String() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigUpdateUnauthorized %+v", 401, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigUpdateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppSetupBitriseYmlConfigUpdateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppSetupBitriseYmlConfigUpdateNotFound creates a AppSetupBitriseYmlConfigUpdateNotFound with default headers values +func NewAppSetupBitriseYmlConfigUpdateNotFound() *AppSetupBitriseYmlConfigUpdateNotFound { + return &AppSetupBitriseYmlConfigUpdateNotFound{} +} + +/* +AppSetupBitriseYmlConfigUpdateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AppSetupBitriseYmlConfigUpdateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app setup bitrise yml config update not found response has a 2xx status code +func (o *AppSetupBitriseYmlConfigUpdateNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app setup bitrise yml config update not found response has a 3xx status code +func (o *AppSetupBitriseYmlConfigUpdateNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app setup bitrise yml config update not found response has a 4xx status code +func (o *AppSetupBitriseYmlConfigUpdateNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this app setup bitrise yml config update not found response has a 5xx status code +func (o *AppSetupBitriseYmlConfigUpdateNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this app setup bitrise yml config update not found response a status code equal to that given +func (o *AppSetupBitriseYmlConfigUpdateNotFound) IsCode(code int) bool { + return code == 404 +} + +func (o *AppSetupBitriseYmlConfigUpdateNotFound) Error() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigUpdateNotFound %+v", 404, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigUpdateNotFound) String() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigUpdateNotFound %+v", 404, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigUpdateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppSetupBitriseYmlConfigUpdateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppSetupBitriseYmlConfigUpdateInternalServerError creates a AppSetupBitriseYmlConfigUpdateInternalServerError with default headers values +func NewAppSetupBitriseYmlConfigUpdateInternalServerError() *AppSetupBitriseYmlConfigUpdateInternalServerError { + return &AppSetupBitriseYmlConfigUpdateInternalServerError{} +} + +/* +AppSetupBitriseYmlConfigUpdateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AppSetupBitriseYmlConfigUpdateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +// IsSuccess returns true when this app setup bitrise yml config update internal server error response has a 2xx status code +func (o *AppSetupBitriseYmlConfigUpdateInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this app setup bitrise yml config update internal server error response has a 3xx status code +func (o *AppSetupBitriseYmlConfigUpdateInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this app setup bitrise yml config update internal server error response has a 4xx status code +func (o *AppSetupBitriseYmlConfigUpdateInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this app setup bitrise yml config update internal server error response has a 5xx status code +func (o *AppSetupBitriseYmlConfigUpdateInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this app setup bitrise yml config update internal server error response a status code equal to that given +func (o *AppSetupBitriseYmlConfigUpdateInternalServerError) IsCode(code int) bool { + return code == 500 +} + +func (o *AppSetupBitriseYmlConfigUpdateInternalServerError) Error() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigUpdateInternalServerError %+v", 500, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigUpdateInternalServerError) String() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/bitrise.yml/config][%d] appSetupBitriseYmlConfigUpdateInternalServerError %+v", 500, o.Payload) +} + +func (o *AppSetupBitriseYmlConfigUpdateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppSetupBitriseYmlConfigUpdateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/operations_client.go b/go/client/operations/operations_client.go index dd1aa52..7917d54 100644 --- a/go/client/operations/operations_client.go +++ b/go/client/operations/operations_client.go @@ -56,6 +56,8 @@ type ClientService interface { AppCreate(params *AppCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppCreateOK, error) + AppDelete(params *AppDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppDeleteOK, error) + AppFinish(params *AppFinishParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppFinishOK, error) AppList(params *AppListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppListOK, error) @@ -64,6 +66,12 @@ type ClientService interface { AppListByUser(params *AppListByUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppListByUserOK, error) + AppNotifications(params *AppNotificationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppNotificationsOK, error) + + AppSetupBitriseYmlConfigGet(params *AppSetupBitriseYmlConfigGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppSetupBitriseYmlConfigGetOK, error) + + AppSetupBitriseYmlConfigUpdate(params *AppSetupBitriseYmlConfigUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppSetupBitriseYmlConfigUpdateNoContent, error) + AppShow(params *AppShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppShowOK, error) AppUpdate(params *AppUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppUpdateOK, error) @@ -738,6 +746,47 @@ func (a *Client) AppCreate(params *AppCreateParams, authInfo runtime.ClientAuthI panic(msg) } +/* +AppDelete deletes an app + +Deletes an app by slug. Use with care, make sure you really want to delete the app. This action cannot be undone. +*/ +func (a *Client) AppDelete(params *AppDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "app-delete", + Method: "DELETE", + PathPattern: "/apps/{app-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AppDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AppDeleteOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for app-delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* AppFinish saves the application at the end of the app registration process @@ -902,6 +951,129 @@ func (a *Client) AppListByUser(params *AppListByUserParams, authInfo runtime.Cli panic(msg) } +/* +AppNotifications updates the app s notification settings + +Updates the app's email notification settings with parameters +*/ +func (a *Client) AppNotifications(params *AppNotificationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppNotificationsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppNotificationsParams() + } + op := &runtime.ClientOperation{ + ID: "app-notifications", + Method: "PATCH", + PathPattern: "/apps/{app-slug}/update-email-notifications", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AppNotificationsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AppNotificationsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for app-notifications: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +AppSetupBitriseYmlConfigGet gettings the location of the application s bitrise yaml + +Getting the location of the application's bitrise.yaml. Requires administrator level privileges to the app. +*/ +func (a *Client) AppSetupBitriseYmlConfigGet(params *AppSetupBitriseYmlConfigGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppSetupBitriseYmlConfigGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppSetupBitriseYmlConfigGetParams() + } + op := &runtime.ClientOperation{ + ID: "app-setup-bitrise-yml-config-get", + Method: "GET", + PathPattern: "/apps/{app-slug}/bitrise.yml/config", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AppSetupBitriseYmlConfigGetReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AppSetupBitriseYmlConfigGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for app-setup-bitrise-yml-config-get: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +AppSetupBitriseYmlConfigUpdate changings the location of the application s bitrise yaml + +Changing the location of the application's bitrise.yaml. Requires administrator level privileges to the app. +*/ +func (a *Client) AppSetupBitriseYmlConfigUpdate(params *AppSetupBitriseYmlConfigUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppSetupBitriseYmlConfigUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppSetupBitriseYmlConfigUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "app-setup-bitrise-yml-config-update", + Method: "PUT", + PathPattern: "/apps/{app-slug}/bitrise.yml/config", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AppSetupBitriseYmlConfigUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AppSetupBitriseYmlConfigUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for app-setup-bitrise-yml-config-update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* AppShow gets a specific app diff --git a/go/models/v0_app_delete_resp_model.go b/go/models/v0_app_delete_resp_model.go new file mode 100644 index 0000000..d8f7f39 --- /dev/null +++ b/go/models/v0_app_delete_resp_model.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppDeleteRespModel v0 app delete resp model +// +// swagger:model v0.AppDeleteRespModel +type V0AppDeleteRespModel struct { + + // msg + Msg string `json:"msg,omitempty"` +} + +// Validate validates this v0 app delete resp model +func (m *V0AppDeleteRespModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 app delete resp model based on context it is used +func (m *V0AppDeleteRespModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppDeleteRespModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppDeleteRespModel) UnmarshalBinary(b []byte) error { + var res V0AppDeleteRespModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_notification_settings_params.go b/go/models/v0_app_notification_settings_params.go new file mode 100644 index 0000000..5ef1165 --- /dev/null +++ b/go/models/v0_app_notification_settings_params.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppNotificationSettingsParams v0 app notification settings params +// +// swagger:model v0.AppNotificationSettingsParams +type V0AppNotificationSettingsParams struct { + + // When should Bitrise send notifications for the users on build failure? Possible values: always, never, change + OnFailure string `json:"on_failure,omitempty"` + + // When should Bitrise send notifications for the users on build success? Possible values: always, never, change + OnSuccess string `json:"on_success,omitempty"` +} + +// Validate validates this v0 app notification settings params +func (m *V0AppNotificationSettingsParams) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 app notification settings params based on context it is used +func (m *V0AppNotificationSettingsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppNotificationSettingsParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppNotificationSettingsParams) UnmarshalBinary(b []byte) error { + var res V0AppNotificationSettingsParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_notification_settings_update_response.go b/go/models/v0_app_notification_settings_update_response.go new file mode 100644 index 0000000..3da25f6 --- /dev/null +++ b/go/models/v0_app_notification_settings_update_response.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppNotificationSettingsUpdateResponse v0 app notification settings update response +// +// swagger:model v0.AppNotificationSettingsUpdateResponse +type V0AppNotificationSettingsUpdateResponse struct { + + // msg + Msg string `json:"msg,omitempty"` +} + +// Validate validates this v0 app notification settings update response +func (m *V0AppNotificationSettingsUpdateResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 app notification settings update response based on context it is used +func (m *V0AppNotificationSettingsUpdateResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppNotificationSettingsUpdateResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppNotificationSettingsUpdateResponse) UnmarshalBinary(b []byte) error { + var res V0AppNotificationSettingsUpdateResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_bitrise_y_m_l_config_get_response.go b/go/models/v0_bitrise_y_m_l_config_get_response.go new file mode 100644 index 0000000..8e188a2 --- /dev/null +++ b/go/models/v0_bitrise_y_m_l_config_get_response.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BitriseYMLConfigGetResponse v0 bitrise y m l config get response +// +// swagger:model v0.BitriseYMLConfigGetResponse +type V0BitriseYMLConfigGetResponse struct { + + // Location of bitrise.yml file. Enums(bitrise.io, repository) + Location string `json:"location,omitempty"` +} + +// Validate validates this v0 bitrise y m l config get response +func (m *V0BitriseYMLConfigGetResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 bitrise y m l config get response based on context it is used +func (m *V0BitriseYMLConfigGetResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BitriseYMLConfigGetResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BitriseYMLConfigGetResponse) UnmarshalBinary(b []byte) error { + var res V0BitriseYMLConfigGetResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_bitrise_y_m_l_config_update_params.go b/go/models/v0_bitrise_y_m_l_config_update_params.go new file mode 100644 index 0000000..2fd025a --- /dev/null +++ b/go/models/v0_bitrise_y_m_l_config_update_params.go @@ -0,0 +1,51 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BitriseYMLConfigUpdateParams v0 bitrise y m l config update params +// +// swagger:model v0.BitriseYMLConfigUpdateParams +type V0BitriseYMLConfigUpdateParams struct { + + // Location of bitrise.yml file. Enums(bitrise.io, repository) + // Example: repository + Location string `json:"location,omitempty"` +} + +// Validate validates this v0 bitrise y m l config update params +func (m *V0BitriseYMLConfigUpdateParams) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 bitrise y m l config update params based on context it is used +func (m *V0BitriseYMLConfigUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BitriseYMLConfigUpdateParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BitriseYMLConfigUpdateParams) UnmarshalBinary(b []byte) error { + var res V0BitriseYMLConfigUpdateParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_cache_item_list_response_item_model.go b/go/models/v0_cache_item_list_response_item_model.go index 7cbb4c4..54ce113 100644 --- a/go/models/v0_cache_item_list_response_item_model.go +++ b/go/models/v0_cache_item_list_response_item_model.go @@ -37,6 +37,9 @@ type V0CacheItemListResponseItemModel struct { // id ID string `json:"id,omitempty"` + + // last used at + LastUsedAt string `json:"last_used_at,omitempty"` } // Validate validates this v0 cache item list response item model diff --git a/go/models/v0_pipeline_show_response_model.go b/go/models/v0_pipeline_show_response_model.go index 9fc01f3..22159b3 100644 --- a/go/models/v0_pipeline_show_response_model.go +++ b/go/models/v0_pipeline_show_response_model.go @@ -7,11 +7,13 @@ package models import ( "context" + "encoding/json" "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // V0PipelineShowResponseModel v0 pipeline show response model @@ -56,6 +58,7 @@ type V0PipelineShowResponseModel struct { StartedAt string `json:"started_at,omitempty"` // status + // Enum: [aborted failed initializing on_hold running succeeded succeeded_with_abort] Status string `json:"status,omitempty"` // trigger params @@ -84,6 +87,10 @@ func (m *V0PipelineShowResponseModel) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if err := m.validateTriggerParams(formats); err != nil { res = append(res, err) } @@ -165,6 +172,63 @@ func (m *V0PipelineShowResponseModel) validateStages(formats strfmt.Registry) er return nil } +var v0PipelineShowResponseModelTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["aborted","failed","initializing","on_hold","running","succeeded","succeeded_with_abort"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v0PipelineShowResponseModelTypeStatusPropEnum = append(v0PipelineShowResponseModelTypeStatusPropEnum, v) + } +} + +const ( + + // V0PipelineShowResponseModelStatusAborted captures enum value "aborted" + V0PipelineShowResponseModelStatusAborted string = "aborted" + + // V0PipelineShowResponseModelStatusFailed captures enum value "failed" + V0PipelineShowResponseModelStatusFailed string = "failed" + + // V0PipelineShowResponseModelStatusInitializing captures enum value "initializing" + V0PipelineShowResponseModelStatusInitializing string = "initializing" + + // V0PipelineShowResponseModelStatusOnHold captures enum value "on_hold" + V0PipelineShowResponseModelStatusOnHold string = "on_hold" + + // V0PipelineShowResponseModelStatusRunning captures enum value "running" + V0PipelineShowResponseModelStatusRunning string = "running" + + // V0PipelineShowResponseModelStatusSucceeded captures enum value "succeeded" + V0PipelineShowResponseModelStatusSucceeded string = "succeeded" + + // V0PipelineShowResponseModelStatusSucceededWithAbort captures enum value "succeeded_with_abort" + V0PipelineShowResponseModelStatusSucceededWithAbort string = "succeeded_with_abort" +) + +// prop value enum +func (m *V0PipelineShowResponseModel) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v0PipelineShowResponseModelTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V0PipelineShowResponseModel) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { + return err + } + + return nil +} + func (m *V0PipelineShowResponseModel) validateTriggerParams(formats strfmt.Registry) error { if swag.IsZero(m.TriggerParams) { // not required return nil diff --git a/staffbase.patch b/staffbase.patch index c4632d9..46b49f8 100644 --- a/staffbase.patch +++ b/staffbase.patch @@ -1,6 +1,6 @@ ---- swagger.json 2022-10-27 11:55:24.000000000 +0200 -+++ swagger_patched.json 2022-11-02 13:40:17.346935458 +0100 -@@ -1969,7 +1969,7 @@ +--- swagger.json 2022-11-29 09:57:38.000000000 +0100 ++++ swagger_patched.json 2022-12-06 13:41:01.823671064 +0100 +@@ -2157,7 +2157,7 @@ } ], "responses": { @@ -9,7 +9,7 @@ "description": "OK", "schema": { "$ref": "#/definitions/v0.BuildTriggerRespModel" -@@ -4821,8 +4821,8 @@ +@@ -5009,8 +5009,8 @@ } ], "responses": { @@ -20,7 +20,7 @@ }, "400": { "description": "Bad Request", -@@ -5309,6 +5309,15 @@ +@@ -5568,6 +5568,15 @@ ], "summary": "Removes an active addon token of the user", "operationId": "user-addon-tokens-delete", diff --git a/swagger.json b/swagger.json index b356c6a..0563bc6 100644 --- a/swagger.json +++ b/swagger.json @@ -330,6 +330,66 @@ } } }, + "delete": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Deletes an app by slug. Use with care, make sure you really want to delete the app. This action cannot be undone.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "application" + ], + "summary": "Deletes an app", + "operationId": "app-delete", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppDeleteRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, "patch": { "security": [ { @@ -1101,6 +1161,134 @@ } } }, + "/apps/{app-slug}/bitrise.yml/config": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Getting the location of the application's bitrise.yaml. Requires administrator level privileges to the app.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "app-setup" + ], + "summary": "Getting the location of the application's bitrise.yaml", + "operationId": "app-setup-bitrise-yml-config-get", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BitriseYMLConfigGetResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "put": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Changing the location of the application's bitrise.yaml. Requires administrator level privileges to the app.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "app-setup" + ], + "summary": "Changing the location of the application's bitrise.yaml", + "operationId": "app-setup-bitrise-yml-config-update", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "Bitrise YML Config Update Params", + "name": "app", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.BitriseYMLConfigUpdateParams" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, "/apps/{app-slug}/branches": { "get": { "security": [ @@ -5046,6 +5234,77 @@ } } }, + "/apps/{app-slug}/update-email-notifications": { + "patch": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Updates the app's email notification settings with parameters", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "application" + ], + "summary": "Updates the app's notification settings", + "operationId": "app-notifications", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "App notification settings parameters", + "name": "notification_settings_params", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AppNotificationSettingsParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppNotificationSettingsUpdateResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, "/builds": { "get": { "security": [ @@ -6520,6 +6779,14 @@ "type": "string" } }, + "v0.AppDeleteRespModel": { + "type": "object", + "properties": { + "msg": { + "type": "string" + } + } + }, "v0.AppFinishParams": { "type": "object", "required": [ @@ -6588,6 +6855,27 @@ } } }, + "v0.AppNotificationSettingsParams": { + "type": "object", + "properties": { + "on_failure": { + "description": "When should Bitrise send notifications for the users on build failure? Possible values: always, never, change", + "type": "string" + }, + "on_success": { + "description": "When should Bitrise send notifications for the users on build success? Possible values: always, never, change", + "type": "string" + } + } + }, + "v0.AppNotificationSettingsUpdateResponse": { + "type": "object", + "properties": { + "msg": { + "type": "string" + } + } + }, "v0.AppRespModel": { "type": "object", "properties": { @@ -7261,6 +7549,25 @@ } } }, + "v0.BitriseYMLConfigGetResponse": { + "type": "object", + "properties": { + "location": { + "description": "Location of bitrise.yml file. Enums(bitrise.io, repository)", + "type": "string" + } + } + }, + "v0.BitriseYMLConfigUpdateParams": { + "type": "object", + "properties": { + "location": { + "description": "Location of bitrise.yml file. Enums(bitrise.io, repository)", + "type": "string", + "example": "repository" + } + } + }, "v0.BranchListResponseModel": { "type": "object", "properties": { @@ -7836,6 +8143,9 @@ }, "id": { "type": "string" + }, + "last_used_at": { + "type": "string" } } }, @@ -8290,7 +8600,16 @@ "type": "string" }, "status": { - "type": "string" + "type": "string", + "enum": [ + "aborted", + "failed", + "initializing", + "on_hold", + "running", + "succeeded", + "succeeded_with_abort" + ] }, "trigger_params": { "$ref": "#/definitions/v0.PipelineShowTriggerParamsResponseModel" diff --git a/swagger_patched.json b/swagger_patched.json index a9a48aa..dfca6a2 100644 --- a/swagger_patched.json +++ b/swagger_patched.json @@ -330,6 +330,66 @@ } } }, + "delete": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Deletes an app by slug. Use with care, make sure you really want to delete the app. This action cannot be undone.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "application" + ], + "summary": "Deletes an app", + "operationId": "app-delete", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppDeleteRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, "patch": { "security": [ { @@ -1101,6 +1161,134 @@ } } }, + "/apps/{app-slug}/bitrise.yml/config": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Getting the location of the application's bitrise.yaml. Requires administrator level privileges to the app.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "app-setup" + ], + "summary": "Getting the location of the application's bitrise.yaml", + "operationId": "app-setup-bitrise-yml-config-get", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BitriseYMLConfigGetResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "put": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Changing the location of the application's bitrise.yaml. Requires administrator level privileges to the app.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "app-setup" + ], + "summary": "Changing the location of the application's bitrise.yaml", + "operationId": "app-setup-bitrise-yml-config-update", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "Bitrise YML Config Update Params", + "name": "app", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.BitriseYMLConfigUpdateParams" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, "/apps/{app-slug}/branches": { "get": { "security": [ @@ -5046,6 +5234,77 @@ } } }, + "/apps/{app-slug}/update-email-notifications": { + "patch": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Updates the app's email notification settings with parameters", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "application" + ], + "summary": "Updates the app's notification settings", + "operationId": "app-notifications", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "App notification settings parameters", + "name": "notification_settings_params", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AppNotificationSettingsParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppNotificationSettingsUpdateResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, "/builds": { "get": { "security": [ @@ -6529,6 +6788,14 @@ "type": "string" } }, + "v0.AppDeleteRespModel": { + "type": "object", + "properties": { + "msg": { + "type": "string" + } + } + }, "v0.AppFinishParams": { "type": "object", "required": [ @@ -6597,6 +6864,27 @@ } } }, + "v0.AppNotificationSettingsParams": { + "type": "object", + "properties": { + "on_failure": { + "description": "When should Bitrise send notifications for the users on build failure? Possible values: always, never, change", + "type": "string" + }, + "on_success": { + "description": "When should Bitrise send notifications for the users on build success? Possible values: always, never, change", + "type": "string" + } + } + }, + "v0.AppNotificationSettingsUpdateResponse": { + "type": "object", + "properties": { + "msg": { + "type": "string" + } + } + }, "v0.AppRespModel": { "type": "object", "properties": { @@ -7270,6 +7558,25 @@ } } }, + "v0.BitriseYMLConfigGetResponse": { + "type": "object", + "properties": { + "location": { + "description": "Location of bitrise.yml file. Enums(bitrise.io, repository)", + "type": "string" + } + } + }, + "v0.BitriseYMLConfigUpdateParams": { + "type": "object", + "properties": { + "location": { + "description": "Location of bitrise.yml file. Enums(bitrise.io, repository)", + "type": "string", + "example": "repository" + } + } + }, "v0.BranchListResponseModel": { "type": "object", "properties": { @@ -7845,6 +8152,9 @@ }, "id": { "type": "string" + }, + "last_used_at": { + "type": "string" } } }, @@ -8299,7 +8609,16 @@ "type": "string" }, "status": { - "type": "string" + "type": "string", + "enum": [ + "aborted", + "failed", + "initializing", + "on_hold", + "running", + "succeeded", + "succeeded_with_abort" + ] }, "trigger_params": { "$ref": "#/definitions/v0.PipelineShowTriggerParamsResponseModel"