238 lines
7 KiB
Go
238 lines
7 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/errors"
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/swag"
|
|
"github.com/go-openapi/validate"
|
|
|
|
strfmt "github.com/go-openapi/strfmt"
|
|
)
|
|
|
|
// PostUIOpenwindowInformationReader is a Reader for the PostUIOpenwindowInformation structure.
|
|
type PostUIOpenwindowInformationReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *PostUIOpenwindowInformationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
|
|
case 204:
|
|
result := NewPostUIOpenwindowInformationNoContent()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
|
|
case 403:
|
|
result := NewPostUIOpenwindowInformationForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
|
|
case 500:
|
|
result := NewPostUIOpenwindowInformationInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewPostUIOpenwindowInformationNoContent creates a PostUIOpenwindowInformationNoContent with default headers values
|
|
func NewPostUIOpenwindowInformationNoContent() *PostUIOpenwindowInformationNoContent {
|
|
return &PostUIOpenwindowInformationNoContent{}
|
|
}
|
|
|
|
/*PostUIOpenwindowInformationNoContent handles this case with default header values.
|
|
|
|
Open window request received
|
|
*/
|
|
type PostUIOpenwindowInformationNoContent struct {
|
|
}
|
|
|
|
func (o *PostUIOpenwindowInformationNoContent) Error() string {
|
|
return fmt.Sprintf("[POST /ui/openwindow/information/][%d] postUiOpenwindowInformationNoContent ", 204)
|
|
}
|
|
|
|
func (o *PostUIOpenwindowInformationNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPostUIOpenwindowInformationForbidden creates a PostUIOpenwindowInformationForbidden with default headers values
|
|
func NewPostUIOpenwindowInformationForbidden() *PostUIOpenwindowInformationForbidden {
|
|
return &PostUIOpenwindowInformationForbidden{}
|
|
}
|
|
|
|
/*PostUIOpenwindowInformationForbidden handles this case with default header values.
|
|
|
|
Forbidden
|
|
*/
|
|
type PostUIOpenwindowInformationForbidden struct {
|
|
Payload PostUIOpenwindowInformationForbiddenBody
|
|
}
|
|
|
|
func (o *PostUIOpenwindowInformationForbidden) Error() string {
|
|
return fmt.Sprintf("[POST /ui/openwindow/information/][%d] postUiOpenwindowInformationForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *PostUIOpenwindowInformationForbidden) 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
|
|
}
|
|
|
|
// NewPostUIOpenwindowInformationInternalServerError creates a PostUIOpenwindowInformationInternalServerError with default headers values
|
|
func NewPostUIOpenwindowInformationInternalServerError() *PostUIOpenwindowInformationInternalServerError {
|
|
return &PostUIOpenwindowInformationInternalServerError{}
|
|
}
|
|
|
|
/*PostUIOpenwindowInformationInternalServerError handles this case with default header values.
|
|
|
|
Internal server error
|
|
*/
|
|
type PostUIOpenwindowInformationInternalServerError struct {
|
|
Payload PostUIOpenwindowInformationInternalServerErrorBody
|
|
}
|
|
|
|
func (o *PostUIOpenwindowInformationInternalServerError) Error() string {
|
|
return fmt.Sprintf("[POST /ui/openwindow/information/][%d] postUiOpenwindowInformationInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *PostUIOpenwindowInformationInternalServerError) 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
|
|
}
|
|
|
|
/*PostUIOpenwindowInformationForbiddenBody post_ui_openwindow_information_forbidden
|
|
//
|
|
// Forbidden
|
|
swagger:model PostUIOpenwindowInformationForbiddenBody
|
|
*/
|
|
type PostUIOpenwindowInformationForbiddenBody struct {
|
|
|
|
// post_ui_openwindow_information_403_forbidden
|
|
//
|
|
// Forbidden message
|
|
// Required: true
|
|
Error *string `json:"error"`
|
|
}
|
|
|
|
// Validate validates this post UI openwindow information forbidden body
|
|
func (o *PostUIOpenwindowInformationForbiddenBody) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateError(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *PostUIOpenwindowInformationForbiddenBody) validateError(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("postUiOpenwindowInformationForbidden"+"."+"error", "body", o.Error); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (o *PostUIOpenwindowInformationForbiddenBody) MarshalBinary() ([]byte, error) {
|
|
if o == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(o)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (o *PostUIOpenwindowInformationForbiddenBody) UnmarshalBinary(b []byte) error {
|
|
var res PostUIOpenwindowInformationForbiddenBody
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*o = res
|
|
return nil
|
|
}
|
|
|
|
/*PostUIOpenwindowInformationInternalServerErrorBody post_ui_openwindow_information_internal_server_error
|
|
//
|
|
// Internal server error
|
|
swagger:model PostUIOpenwindowInformationInternalServerErrorBody
|
|
*/
|
|
type PostUIOpenwindowInformationInternalServerErrorBody struct {
|
|
|
|
// post_ui_openwindow_information_500_internal_server_error
|
|
//
|
|
// Internal server error message
|
|
// Required: true
|
|
Error *string `json:"error"`
|
|
}
|
|
|
|
// Validate validates this post UI openwindow information internal server error body
|
|
func (o *PostUIOpenwindowInformationInternalServerErrorBody) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateError(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *PostUIOpenwindowInformationInternalServerErrorBody) validateError(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("postUiOpenwindowInformationInternalServerError"+"."+"error", "body", o.Error); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (o *PostUIOpenwindowInformationInternalServerErrorBody) MarshalBinary() ([]byte, error) {
|
|
if o == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(o)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (o *PostUIOpenwindowInformationInternalServerErrorBody) UnmarshalBinary(b []byte) error {
|
|
var res PostUIOpenwindowInformationInternalServerErrorBody
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*o = res
|
|
return nil
|
|
}
|