lib/api/sf-gate/sf_gate_client/notebooks/get_notebooks_responses.go

269 lines
7.4 KiB
Go
Raw Normal View History

2021-01-08 17:40:28 +00:00
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-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"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_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("unknown error", response, response.Code())
}
}
// NewGetNotebooksOK creates a GetNotebooksOK with default headers values
func NewGetNotebooksOK() *GetNotebooksOK {
return &GetNotebooksOK{}
}
/*GetNotebooksOK handles this case with default header values.
Taxnexus Response with Notebook objects
*/
type GetNotebooksOK struct {
Payload *sf_gate_models.NotebookResponse
}
func (o *GetNotebooksOK) Error() string {
return fmt.Sprintf("[GET /notebooks][%d] getNotebooksOK %+v", 200, o.Payload)
}
func (o *GetNotebooksOK) GetPayload() *sf_gate_models.NotebookResponse {
return o.Payload
}
func (o *GetNotebooksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sf_gate_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 handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
type GetNotebooksUnauthorized struct {
Payload *sf_gate_models.Error
}
func (o *GetNotebooksUnauthorized) Error() string {
return fmt.Sprintf("[GET /notebooks][%d] getNotebooksUnauthorized %+v", 401, o.Payload)
}
func (o *GetNotebooksUnauthorized) GetPayload() *sf_gate_models.Error {
return o.Payload
}
func (o *GetNotebooksUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sf_gate_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 handles this case with default header values.
Access forbidden, account lacks access
*/
type GetNotebooksForbidden struct {
Payload *sf_gate_models.Error
}
func (o *GetNotebooksForbidden) Error() string {
return fmt.Sprintf("[GET /notebooks][%d] getNotebooksForbidden %+v", 403, o.Payload)
}
func (o *GetNotebooksForbidden) GetPayload() *sf_gate_models.Error {
return o.Payload
}
func (o *GetNotebooksForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sf_gate_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 handles this case with default header values.
Resource was not found
*/
type GetNotebooksNotFound struct {
Payload *sf_gate_models.Error
}
func (o *GetNotebooksNotFound) Error() string {
return fmt.Sprintf("[GET /notebooks][%d] getNotebooksNotFound %+v", 404, o.Payload)
}
func (o *GetNotebooksNotFound) GetPayload() *sf_gate_models.Error {
return o.Payload
}
func (o *GetNotebooksNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sf_gate_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 handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetNotebooksUnprocessableEntity struct {
Payload *sf_gate_models.Error
}
func (o *GetNotebooksUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /notebooks][%d] getNotebooksUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetNotebooksUnprocessableEntity) GetPayload() *sf_gate_models.Error {
return o.Payload
}
func (o *GetNotebooksUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sf_gate_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 handles this case with default header values.
Server Internal Error
*/
type GetNotebooksInternalServerError struct {
Payload *sf_gate_models.Error
}
func (o *GetNotebooksInternalServerError) Error() string {
return fmt.Sprintf("[GET /notebooks][%d] getNotebooksInternalServerError %+v", 500, o.Payload)
}
func (o *GetNotebooksInternalServerError) GetPayload() *sf_gate_models.Error {
return o.Payload
}
func (o *GetNotebooksInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sf_gate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}