This repository has been archived on 2025-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
eve-goclient/client/user_interface/post_ui_openwindow_newmail_responses.go

241 lines
7.2 KiB
Go

package user_interface
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
strfmt "github.com/go-openapi/strfmt"
)
// PostUIOpenwindowNewmailReader is a Reader for the PostUIOpenwindowNewmail structure.
type PostUIOpenwindowNewmailReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostUIOpenwindowNewmailReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 204:
result := NewPostUIOpenwindowNewmailNoContent()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 403:
result := NewPostUIOpenwindowNewmailForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPostUIOpenwindowNewmailUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostUIOpenwindowNewmailInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
// NewPostUIOpenwindowNewmailNoContent creates a PostUIOpenwindowNewmailNoContent with default headers values
func NewPostUIOpenwindowNewmailNoContent() *PostUIOpenwindowNewmailNoContent {
return &PostUIOpenwindowNewmailNoContent{}
}
/*PostUIOpenwindowNewmailNoContent handles this case with default header values.
Open window request received
*/
type PostUIOpenwindowNewmailNoContent struct {
}
func (o *PostUIOpenwindowNewmailNoContent) Error() string {
return fmt.Sprintf("[POST /ui/openwindow/newmail/][%d] postUiOpenwindowNewmailNoContent ", 204)
}
func (o *PostUIOpenwindowNewmailNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewPostUIOpenwindowNewmailForbidden creates a PostUIOpenwindowNewmailForbidden with default headers values
func NewPostUIOpenwindowNewmailForbidden() *PostUIOpenwindowNewmailForbidden {
return &PostUIOpenwindowNewmailForbidden{}
}
/*PostUIOpenwindowNewmailForbidden handles this case with default header values.
Forbidden
*/
type PostUIOpenwindowNewmailForbidden struct {
Payload PostUIOpenwindowNewmailForbiddenBody
}
func (o *PostUIOpenwindowNewmailForbidden) Error() string {
return fmt.Sprintf("[POST /ui/openwindow/newmail/][%d] postUiOpenwindowNewmailForbidden %+v", 403, o.Payload)
}
func (o *PostUIOpenwindowNewmailForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response payload
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostUIOpenwindowNewmailUnprocessableEntity creates a PostUIOpenwindowNewmailUnprocessableEntity with default headers values
func NewPostUIOpenwindowNewmailUnprocessableEntity() *PostUIOpenwindowNewmailUnprocessableEntity {
return &PostUIOpenwindowNewmailUnprocessableEntity{}
}
/*PostUIOpenwindowNewmailUnprocessableEntity handles this case with default header values.
Errors in request body
*/
type PostUIOpenwindowNewmailUnprocessableEntity struct {
Payload PostUIOpenwindowNewmailUnprocessableEntityBody
}
func (o *PostUIOpenwindowNewmailUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /ui/openwindow/newmail/][%d] postUiOpenwindowNewmailUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostUIOpenwindowNewmailUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response payload
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostUIOpenwindowNewmailInternalServerError creates a PostUIOpenwindowNewmailInternalServerError with default headers values
func NewPostUIOpenwindowNewmailInternalServerError() *PostUIOpenwindowNewmailInternalServerError {
return &PostUIOpenwindowNewmailInternalServerError{}
}
/*PostUIOpenwindowNewmailInternalServerError handles this case with default header values.
Internal server error
*/
type PostUIOpenwindowNewmailInternalServerError struct {
Payload PostUIOpenwindowNewmailInternalServerErrorBody
}
func (o *PostUIOpenwindowNewmailInternalServerError) Error() string {
return fmt.Sprintf("[POST /ui/openwindow/newmail/][%d] postUiOpenwindowNewmailInternalServerError %+v", 500, o.Payload)
}
func (o *PostUIOpenwindowNewmailInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response payload
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
/*PostUIOpenwindowNewmailForbiddenBody post_ui_openwindow_newmail_forbidden
//
// Forbidden
swagger:model PostUIOpenwindowNewmailForbiddenBody
*/
type PostUIOpenwindowNewmailForbiddenBody struct {
// post_ui_openwindow_newmail_403_forbidden
//
// Forbidden message
// Required: true
Error *string `json:"error"`
}
/*PostUIOpenwindowNewmailUnprocessableEntityBody post_ui_openwindow_newmail_unprocessable_entity
//
// 422 unprocessable entity object
swagger:model PostUIOpenwindowNewmailUnprocessableEntityBody
*/
type PostUIOpenwindowNewmailUnprocessableEntityBody struct {
// post_ui_openwindow_newmail_error
//
// error message
// Required: true
Error *string `json:"error"`
}
/*PostUIOpenwindowNewmailInternalServerErrorBody post_ui_openwindow_newmail_internal_server_error
//
// Internal server error
swagger:model PostUIOpenwindowNewmailInternalServerErrorBody
*/
type PostUIOpenwindowNewmailInternalServerErrorBody struct {
// post_ui_openwindow_newmail_500_internal_server_error
//
// Internal server error message
// Required: true
Error *string `json:"error"`
}
/*PostUIOpenwindowNewmailBody post_ui_openwindow_newmail_new_mail
//
// new_mail object
swagger:model PostUIOpenwindowNewmailBody
*/
type PostUIOpenwindowNewmailBody struct {
// post_ui_openwindow_newmail_body
//
// body string
// Required: true
// Max Length: 10000
Body *string `json:"body"`
// post_ui_openwindow_newmail_recipients
//
// recipients array
// Required: true
// Max Items: 50
// Min Items: 1
Recipients []int32 `json:"recipients"`
// post_ui_openwindow_newmail_subject
//
// subject string
// Required: true
// Max Length: 1000
Subject *string `json:"subject"`
// post_ui_openwindow_newmail_to_corp_or_alliance_id
//
// to_corp_or_alliance_id integer
// Required: true
ToCorpOrAllianceID *int32 `json:"to_corp_or_alliance_id"`
// post_ui_openwindow_newmail_to_mailing_list_id
//
// Corporations, alliances and mailing lists are all types of mailing groups. You may only send to one mailing group, at a time, so you may fill out either this field or the to_corp_or_alliance_ids field
// Required: true
ToMailingListID *int32 `json:"to_mailing_list_id"`
}