lib/api/geo/geo_client/domain/get_domain_observable_respo...

322 lines
9.9 KiB
Go
Raw Normal View History

2021-01-08 17:40:28 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-01-19 16:58:40 +00:00
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
2021-01-08 17:40:28 +00:00
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package domain
// 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"
2021-01-10 17:03:26 +00:00
"code.tnxs.net/taxnexus/lib/api/geo/geo_models"
2021-01-08 17:40:28 +00:00
)
// GetDomainObservableReader is a Reader for the GetDomainObservable structure.
type GetDomainObservableReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetDomainObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetDomainObservableOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetDomainObservableUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetDomainObservableForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetDomainObservableNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetDomainObservableUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetDomainObservableInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
2021-02-09 16:56:57 +00:00
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
2021-01-08 17:40:28 +00:00
}
}
// NewGetDomainObservableOK creates a GetDomainObservableOK with default headers values
func NewGetDomainObservableOK() *GetDomainObservableOK {
return &GetDomainObservableOK{}
}
2021-02-09 16:56:57 +00:00
/* GetDomainObservableOK describes a response with status code 200, with default header values.
2021-01-08 17:40:28 +00:00
Observable array response to a domain retrieval
*/
type GetDomainObservableOK struct {
AccessControlAllowOrigin string
2021-02-09 16:56:57 +00:00
CacheControl string
2021-01-08 17:40:28 +00:00
Payload []*geo_models.Domain
}
func (o *GetDomainObservableOK) Error() string {
return fmt.Sprintf("[GET /domains/observable][%d] getDomainObservableOK %+v", 200, o.Payload)
}
func (o *GetDomainObservableOK) GetPayload() []*geo_models.Domain {
return o.Payload
}
func (o *GetDomainObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Cache-Control
hdrCacheControl := response.GetHeader("Cache-Control")
if hdrCacheControl != "" {
o.CacheControl = hdrCacheControl
}
2021-01-08 17:40:28 +00:00
// response payload
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetDomainObservableUnauthorized creates a GetDomainObservableUnauthorized with default headers values
func NewGetDomainObservableUnauthorized() *GetDomainObservableUnauthorized {
return &GetDomainObservableUnauthorized{}
}
2021-02-09 16:56:57 +00:00
/* GetDomainObservableUnauthorized describes a response with status code 401, with default header values.
2021-01-08 17:40:28 +00:00
Access unauthorized, invalid API-KEY was used
*/
type GetDomainObservableUnauthorized struct {
AccessControlAllowOrigin string
Payload *geo_models.Error
}
func (o *GetDomainObservableUnauthorized) Error() string {
return fmt.Sprintf("[GET /domains/observable][%d] getDomainObservableUnauthorized %+v", 401, o.Payload)
}
func (o *GetDomainObservableUnauthorized) GetPayload() *geo_models.Error {
return o.Payload
}
func (o *GetDomainObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o.Payload = new(geo_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetDomainObservableForbidden creates a GetDomainObservableForbidden with default headers values
func NewGetDomainObservableForbidden() *GetDomainObservableForbidden {
return &GetDomainObservableForbidden{}
}
2021-02-09 16:56:57 +00:00
/* GetDomainObservableForbidden describes a response with status code 403, with default header values.
2021-01-08 17:40:28 +00:00
Access forbidden, account lacks access
*/
type GetDomainObservableForbidden struct {
AccessControlAllowOrigin string
Payload *geo_models.Error
}
func (o *GetDomainObservableForbidden) Error() string {
return fmt.Sprintf("[GET /domains/observable][%d] getDomainObservableForbidden %+v", 403, o.Payload)
}
func (o *GetDomainObservableForbidden) GetPayload() *geo_models.Error {
return o.Payload
}
func (o *GetDomainObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o.Payload = new(geo_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetDomainObservableNotFound creates a GetDomainObservableNotFound with default headers values
func NewGetDomainObservableNotFound() *GetDomainObservableNotFound {
return &GetDomainObservableNotFound{}
}
2021-02-09 16:56:57 +00:00
/* GetDomainObservableNotFound describes a response with status code 404, with default header values.
2021-01-08 17:40:28 +00:00
Resource was not found
*/
type GetDomainObservableNotFound struct {
AccessControlAllowOrigin string
Payload *geo_models.Error
}
func (o *GetDomainObservableNotFound) Error() string {
return fmt.Sprintf("[GET /domains/observable][%d] getDomainObservableNotFound %+v", 404, o.Payload)
}
func (o *GetDomainObservableNotFound) GetPayload() *geo_models.Error {
return o.Payload
}
func (o *GetDomainObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o.Payload = new(geo_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetDomainObservableUnprocessableEntity creates a GetDomainObservableUnprocessableEntity with default headers values
func NewGetDomainObservableUnprocessableEntity() *GetDomainObservableUnprocessableEntity {
return &GetDomainObservableUnprocessableEntity{}
}
2021-02-09 16:56:57 +00:00
/* GetDomainObservableUnprocessableEntity describes a response with status code 422, with default header values.
2021-01-08 17:40:28 +00:00
Unprocessable Entity, likely a bad parameter
*/
type GetDomainObservableUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload *geo_models.Error
}
func (o *GetDomainObservableUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /domains/observable][%d] getDomainObservableUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetDomainObservableUnprocessableEntity) GetPayload() *geo_models.Error {
return o.Payload
}
func (o *GetDomainObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o.Payload = new(geo_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetDomainObservableInternalServerError creates a GetDomainObservableInternalServerError with default headers values
func NewGetDomainObservableInternalServerError() *GetDomainObservableInternalServerError {
return &GetDomainObservableInternalServerError{}
}
2021-02-09 16:56:57 +00:00
/* GetDomainObservableInternalServerError describes a response with status code 500, with default header values.
2021-01-08 17:40:28 +00:00
Server Internal Error
*/
type GetDomainObservableInternalServerError struct {
AccessControlAllowOrigin string
Payload *geo_models.Error
}
func (o *GetDomainObservableInternalServerError) Error() string {
return fmt.Sprintf("[GET /domains/observable][%d] getDomainObservableInternalServerError %+v", 500, o.Payload)
}
func (o *GetDomainObservableInternalServerError) GetPayload() *geo_models.Error {
return o.Payload
}
func (o *GetDomainObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o.Payload = new(geo_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}