All checks were successful
continuous-integration/drone/push Build is passing
523 lines
17 KiB
Go
523 lines
17 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package admin
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/strfmt"
|
|
)
|
|
|
|
// TestEmailSendReader is a Reader for the TestEmailSend structure.
|
|
type TestEmailSendReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *TestEmailSendReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 202:
|
|
result := NewTestEmailSendAccepted()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewTestEmailSendBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 401:
|
|
result := NewTestEmailSendUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewTestEmailSendForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewTestEmailSendNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 406:
|
|
result := NewTestEmailSendNotAcceptable()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewTestEmailSendUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewTestEmailSendInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[POST /api/v1/admin/email/test] testEmailSend", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewTestEmailSendAccepted creates a TestEmailSendAccepted with default headers values
|
|
func NewTestEmailSendAccepted() *TestEmailSendAccepted {
|
|
return &TestEmailSendAccepted{}
|
|
}
|
|
|
|
/*
|
|
TestEmailSendAccepted describes a response with status code 202, with default header values.
|
|
|
|
Test email was sent.
|
|
*/
|
|
type TestEmailSendAccepted struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this test email send accepted response has a 2xx status code
|
|
func (o *TestEmailSendAccepted) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this test email send accepted response has a 3xx status code
|
|
func (o *TestEmailSendAccepted) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this test email send accepted response has a 4xx status code
|
|
func (o *TestEmailSendAccepted) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this test email send accepted response has a 5xx status code
|
|
func (o *TestEmailSendAccepted) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this test email send accepted response a status code equal to that given
|
|
func (o *TestEmailSendAccepted) IsCode(code int) bool {
|
|
return code == 202
|
|
}
|
|
|
|
// Code gets the status code for the test email send accepted response
|
|
func (o *TestEmailSendAccepted) Code() int {
|
|
return 202
|
|
}
|
|
|
|
func (o *TestEmailSendAccepted) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendAccepted", 202)
|
|
}
|
|
|
|
func (o *TestEmailSendAccepted) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendAccepted", 202)
|
|
}
|
|
|
|
func (o *TestEmailSendAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewTestEmailSendBadRequest creates a TestEmailSendBadRequest with default headers values
|
|
func NewTestEmailSendBadRequest() *TestEmailSendBadRequest {
|
|
return &TestEmailSendBadRequest{}
|
|
}
|
|
|
|
/*
|
|
TestEmailSendBadRequest describes a response with status code 400, with default header values.
|
|
|
|
bad request
|
|
*/
|
|
type TestEmailSendBadRequest struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this test email send bad request response has a 2xx status code
|
|
func (o *TestEmailSendBadRequest) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this test email send bad request response has a 3xx status code
|
|
func (o *TestEmailSendBadRequest) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this test email send bad request response has a 4xx status code
|
|
func (o *TestEmailSendBadRequest) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this test email send bad request response has a 5xx status code
|
|
func (o *TestEmailSendBadRequest) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this test email send bad request response a status code equal to that given
|
|
func (o *TestEmailSendBadRequest) IsCode(code int) bool {
|
|
return code == 400
|
|
}
|
|
|
|
// Code gets the status code for the test email send bad request response
|
|
func (o *TestEmailSendBadRequest) Code() int {
|
|
return 400
|
|
}
|
|
|
|
func (o *TestEmailSendBadRequest) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendBadRequest", 400)
|
|
}
|
|
|
|
func (o *TestEmailSendBadRequest) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendBadRequest", 400)
|
|
}
|
|
|
|
func (o *TestEmailSendBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewTestEmailSendUnauthorized creates a TestEmailSendUnauthorized with default headers values
|
|
func NewTestEmailSendUnauthorized() *TestEmailSendUnauthorized {
|
|
return &TestEmailSendUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
TestEmailSendUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
unauthorized
|
|
*/
|
|
type TestEmailSendUnauthorized struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this test email send unauthorized response has a 2xx status code
|
|
func (o *TestEmailSendUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this test email send unauthorized response has a 3xx status code
|
|
func (o *TestEmailSendUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this test email send unauthorized response has a 4xx status code
|
|
func (o *TestEmailSendUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this test email send unauthorized response has a 5xx status code
|
|
func (o *TestEmailSendUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this test email send unauthorized response a status code equal to that given
|
|
func (o *TestEmailSendUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the test email send unauthorized response
|
|
func (o *TestEmailSendUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *TestEmailSendUnauthorized) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendUnauthorized", 401)
|
|
}
|
|
|
|
func (o *TestEmailSendUnauthorized) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendUnauthorized", 401)
|
|
}
|
|
|
|
func (o *TestEmailSendUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewTestEmailSendForbidden creates a TestEmailSendForbidden with default headers values
|
|
func NewTestEmailSendForbidden() *TestEmailSendForbidden {
|
|
return &TestEmailSendForbidden{}
|
|
}
|
|
|
|
/*
|
|
TestEmailSendForbidden describes a response with status code 403, with default header values.
|
|
|
|
forbidden
|
|
*/
|
|
type TestEmailSendForbidden struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this test email send forbidden response has a 2xx status code
|
|
func (o *TestEmailSendForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this test email send forbidden response has a 3xx status code
|
|
func (o *TestEmailSendForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this test email send forbidden response has a 4xx status code
|
|
func (o *TestEmailSendForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this test email send forbidden response has a 5xx status code
|
|
func (o *TestEmailSendForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this test email send forbidden response a status code equal to that given
|
|
func (o *TestEmailSendForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the test email send forbidden response
|
|
func (o *TestEmailSendForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *TestEmailSendForbidden) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendForbidden", 403)
|
|
}
|
|
|
|
func (o *TestEmailSendForbidden) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendForbidden", 403)
|
|
}
|
|
|
|
func (o *TestEmailSendForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewTestEmailSendNotFound creates a TestEmailSendNotFound with default headers values
|
|
func NewTestEmailSendNotFound() *TestEmailSendNotFound {
|
|
return &TestEmailSendNotFound{}
|
|
}
|
|
|
|
/*
|
|
TestEmailSendNotFound describes a response with status code 404, with default header values.
|
|
|
|
not found
|
|
*/
|
|
type TestEmailSendNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this test email send not found response has a 2xx status code
|
|
func (o *TestEmailSendNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this test email send not found response has a 3xx status code
|
|
func (o *TestEmailSendNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this test email send not found response has a 4xx status code
|
|
func (o *TestEmailSendNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this test email send not found response has a 5xx status code
|
|
func (o *TestEmailSendNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this test email send not found response a status code equal to that given
|
|
func (o *TestEmailSendNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the test email send not found response
|
|
func (o *TestEmailSendNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *TestEmailSendNotFound) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendNotFound", 404)
|
|
}
|
|
|
|
func (o *TestEmailSendNotFound) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendNotFound", 404)
|
|
}
|
|
|
|
func (o *TestEmailSendNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewTestEmailSendNotAcceptable creates a TestEmailSendNotAcceptable with default headers values
|
|
func NewTestEmailSendNotAcceptable() *TestEmailSendNotAcceptable {
|
|
return &TestEmailSendNotAcceptable{}
|
|
}
|
|
|
|
/*
|
|
TestEmailSendNotAcceptable describes a response with status code 406, with default header values.
|
|
|
|
not acceptable
|
|
*/
|
|
type TestEmailSendNotAcceptable struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this test email send not acceptable response has a 2xx status code
|
|
func (o *TestEmailSendNotAcceptable) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this test email send not acceptable response has a 3xx status code
|
|
func (o *TestEmailSendNotAcceptable) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this test email send not acceptable response has a 4xx status code
|
|
func (o *TestEmailSendNotAcceptable) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this test email send not acceptable response has a 5xx status code
|
|
func (o *TestEmailSendNotAcceptable) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this test email send not acceptable response a status code equal to that given
|
|
func (o *TestEmailSendNotAcceptable) IsCode(code int) bool {
|
|
return code == 406
|
|
}
|
|
|
|
// Code gets the status code for the test email send not acceptable response
|
|
func (o *TestEmailSendNotAcceptable) Code() int {
|
|
return 406
|
|
}
|
|
|
|
func (o *TestEmailSendNotAcceptable) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *TestEmailSendNotAcceptable) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *TestEmailSendNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewTestEmailSendUnprocessableEntity creates a TestEmailSendUnprocessableEntity with default headers values
|
|
func NewTestEmailSendUnprocessableEntity() *TestEmailSendUnprocessableEntity {
|
|
return &TestEmailSendUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
TestEmailSendUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
An smtp occurred while the email attempt was in progress. Check the returned json for more information. The smtp error will be included, to help you debug communication with the smtp server.
|
|
*/
|
|
type TestEmailSendUnprocessableEntity struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this test email send unprocessable entity response has a 2xx status code
|
|
func (o *TestEmailSendUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this test email send unprocessable entity response has a 3xx status code
|
|
func (o *TestEmailSendUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this test email send unprocessable entity response has a 4xx status code
|
|
func (o *TestEmailSendUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this test email send unprocessable entity response has a 5xx status code
|
|
func (o *TestEmailSendUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this test email send unprocessable entity response a status code equal to that given
|
|
func (o *TestEmailSendUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the test email send unprocessable entity response
|
|
func (o *TestEmailSendUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *TestEmailSendUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendUnprocessableEntity", 422)
|
|
}
|
|
|
|
func (o *TestEmailSendUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendUnprocessableEntity", 422)
|
|
}
|
|
|
|
func (o *TestEmailSendUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewTestEmailSendInternalServerError creates a TestEmailSendInternalServerError with default headers values
|
|
func NewTestEmailSendInternalServerError() *TestEmailSendInternalServerError {
|
|
return &TestEmailSendInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
TestEmailSendInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
internal server error
|
|
*/
|
|
type TestEmailSendInternalServerError struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this test email send internal server error response has a 2xx status code
|
|
func (o *TestEmailSendInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this test email send internal server error response has a 3xx status code
|
|
func (o *TestEmailSendInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this test email send internal server error response has a 4xx status code
|
|
func (o *TestEmailSendInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this test email send internal server error response has a 5xx status code
|
|
func (o *TestEmailSendInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this test email send internal server error response a status code equal to that given
|
|
func (o *TestEmailSendInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the test email send internal server error response
|
|
func (o *TestEmailSendInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *TestEmailSendInternalServerError) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendInternalServerError", 500)
|
|
}
|
|
|
|
func (o *TestEmailSendInternalServerError) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/admin/email/test][%d] testEmailSendInternalServerError", 500)
|
|
}
|
|
|
|
func (o *TestEmailSendInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|