lib/api/sfgate/sfgate_client/notebooks/get_notebooks_responses.go

262 lines
7.6 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package notebooks
// 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"
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
)
// GetNotebooksReader is a Reader for the GetNotebooks structure.
type GetNotebooksReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetNotebooksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetNotebooksOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetNotebooksUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetNotebooksForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetNotebooksNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetNotebooksUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetNotebooksInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
// NewGetNotebooksOK creates a GetNotebooksOK with default headers values
func NewGetNotebooksOK() *GetNotebooksOK {
return &GetNotebooksOK{}
}
/* GetNotebooksOK describes a response with status code 200, with default header values.
Taxnexus Response with Notebook objects
*/
type GetNotebooksOK struct {
Payload *sfgate_models.NotebookResponse
}
func (o *GetNotebooksOK) Error() string {
return fmt.Sprintf("[GET /notebooks][%d] getNotebooksOK %+v", 200, o.Payload)
}
func (o *GetNotebooksOK) GetPayload() *sfgate_models.NotebookResponse {
return o.Payload
}
func (o *GetNotebooksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.NotebookResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetNotebooksUnauthorized creates a GetNotebooksUnauthorized with default headers values
func NewGetNotebooksUnauthorized() *GetNotebooksUnauthorized {
return &GetNotebooksUnauthorized{}
}
/* GetNotebooksUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type GetNotebooksUnauthorized struct {
Payload *sfgate_models.Error
}
func (o *GetNotebooksUnauthorized) Error() string {
return fmt.Sprintf("[GET /notebooks][%d] getNotebooksUnauthorized %+v", 401, o.Payload)
}
func (o *GetNotebooksUnauthorized) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetNotebooksUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetNotebooksForbidden creates a GetNotebooksForbidden with default headers values
func NewGetNotebooksForbidden() *GetNotebooksForbidden {
return &GetNotebooksForbidden{}
}
/* GetNotebooksForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetNotebooksForbidden struct {
Payload *sfgate_models.Error
}
func (o *GetNotebooksForbidden) Error() string {
return fmt.Sprintf("[GET /notebooks][%d] getNotebooksForbidden %+v", 403, o.Payload)
}
func (o *GetNotebooksForbidden) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetNotebooksForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetNotebooksNotFound creates a GetNotebooksNotFound with default headers values
func NewGetNotebooksNotFound() *GetNotebooksNotFound {
return &GetNotebooksNotFound{}
}
/* GetNotebooksNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetNotebooksNotFound struct {
Payload *sfgate_models.Error
}
func (o *GetNotebooksNotFound) Error() string {
return fmt.Sprintf("[GET /notebooks][%d] getNotebooksNotFound %+v", 404, o.Payload)
}
func (o *GetNotebooksNotFound) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetNotebooksNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetNotebooksUnprocessableEntity creates a GetNotebooksUnprocessableEntity with default headers values
func NewGetNotebooksUnprocessableEntity() *GetNotebooksUnprocessableEntity {
return &GetNotebooksUnprocessableEntity{}
}
/* GetNotebooksUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetNotebooksUnprocessableEntity struct {
Payload *sfgate_models.Error
}
func (o *GetNotebooksUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /notebooks][%d] getNotebooksUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetNotebooksUnprocessableEntity) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetNotebooksUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetNotebooksInternalServerError creates a GetNotebooksInternalServerError with default headers values
func NewGetNotebooksInternalServerError() *GetNotebooksInternalServerError {
return &GetNotebooksInternalServerError{}
}
/* GetNotebooksInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetNotebooksInternalServerError struct {
Payload *sfgate_models.Error
}
func (o *GetNotebooksInternalServerError) Error() string {
return fmt.Sprintf("[GET /notebooks][%d] getNotebooksInternalServerError %+v", 500, o.Payload)
}
func (o *GetNotebooksInternalServerError) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetNotebooksInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}