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/dogma/get_dogma_attributes_attribute_id_responses.go

158 lines
4.9 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package dogma
// 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"
"git.inf3.xyz/tschwery/eve-goclient.git/models"
)
// GetDogmaAttributesAttributeIDReader is a Reader for the GetDogmaAttributesAttributeID structure.
type GetDogmaAttributesAttributeIDReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetDogmaAttributesAttributeIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetDogmaAttributesAttributeIDOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 404:
result := NewGetDogmaAttributesAttributeIDNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetDogmaAttributesAttributeIDInternalServerError()
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())
}
}
// NewGetDogmaAttributesAttributeIDOK creates a GetDogmaAttributesAttributeIDOK with default headers values
func NewGetDogmaAttributesAttributeIDOK() *GetDogmaAttributesAttributeIDOK {
return &GetDogmaAttributesAttributeIDOK{}
}
/*GetDogmaAttributesAttributeIDOK handles this case with default header values.
Information about a dogma attribute
*/
type GetDogmaAttributesAttributeIDOK struct {
/*The caching mechanism used
*/
CacheControl string
/*RFC7231 formatted datetime string
*/
Expires string
/*RFC7231 formatted datetime string
*/
LastModified string
Payload *models.GetDogmaAttributesAttributeIDOKBody
}
func (o *GetDogmaAttributesAttributeIDOK) Error() string {
return fmt.Sprintf("[GET /dogma/attributes/{attribute_id}/][%d] getDogmaAttributesAttributeIdOK %+v", 200, o.Payload)
}
func (o *GetDogmaAttributesAttributeIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Cache-Control
o.CacheControl = response.GetHeader("Cache-Control")
// response header Expires
o.Expires = response.GetHeader("Expires")
// response header Last-Modified
o.LastModified = response.GetHeader("Last-Modified")
o.Payload = new(models.GetDogmaAttributesAttributeIDOKBody)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetDogmaAttributesAttributeIDNotFound creates a GetDogmaAttributesAttributeIDNotFound with default headers values
func NewGetDogmaAttributesAttributeIDNotFound() *GetDogmaAttributesAttributeIDNotFound {
return &GetDogmaAttributesAttributeIDNotFound{}
}
/*GetDogmaAttributesAttributeIDNotFound handles this case with default header values.
Dogma attribute not found
*/
type GetDogmaAttributesAttributeIDNotFound struct {
Payload *models.GetDogmaAttributesAttributeIDNotFoundBody
}
func (o *GetDogmaAttributesAttributeIDNotFound) Error() string {
return fmt.Sprintf("[GET /dogma/attributes/{attribute_id}/][%d] getDogmaAttributesAttributeIdNotFound %+v", 404, o.Payload)
}
func (o *GetDogmaAttributesAttributeIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.GetDogmaAttributesAttributeIDNotFoundBody)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetDogmaAttributesAttributeIDInternalServerError creates a GetDogmaAttributesAttributeIDInternalServerError with default headers values
func NewGetDogmaAttributesAttributeIDInternalServerError() *GetDogmaAttributesAttributeIDInternalServerError {
return &GetDogmaAttributesAttributeIDInternalServerError{}
}
/*GetDogmaAttributesAttributeIDInternalServerError handles this case with default header values.
Internal server error
*/
type GetDogmaAttributesAttributeIDInternalServerError struct {
Payload *models.InternalServerError
}
func (o *GetDogmaAttributesAttributeIDInternalServerError) Error() string {
return fmt.Sprintf("[GET /dogma/attributes/{attribute_id}/][%d] getDogmaAttributesAttributeIdInternalServerError %+v", 500, o.Payload)
}
func (o *GetDogmaAttributesAttributeIDInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.InternalServerError)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}