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

262 lines
7.7 KiB
Go
Raw Permalink 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 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"
2021-01-10 17:03:26 +00:00
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_models"
2021-01-08 17:40:28 +00:00
)
// 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:
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
}
}
// NewGetNotebooksOK creates a GetNotebooksOK with default headers values
func NewGetNotebooksOK() *GetNotebooksOK {
return &GetNotebooksOK{}
}
2021-02-09 16:56:57 +00:00
/* GetNotebooksOK describes a response with status code 200, with default header values.
2021-01-08 17:40:28 +00:00
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{}
}
2021-02-09 16:56:57 +00:00
/* GetNotebooksUnauthorized 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 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{}
}
2021-02-09 16:56:57 +00:00
/* GetNotebooksForbidden 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 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{}
}
2021-02-09 16:56:57 +00:00
/* GetNotebooksNotFound describes a response with status code 404, with default header values.
2021-01-08 17:40:28 +00:00
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{}
}
2021-02-09 16:56:57 +00:00
/* GetNotebooksUnprocessableEntity 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 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{}
}
2021-02-09 16:56:57 +00:00
/* GetNotebooksInternalServerError describes a response with status code 500, with default header values.
2021-01-08 17:40:28 +00:00
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
}