mirror of https://github.com/vernonkeenan/lib
262 lines
7.7 KiB
Go
262 lines
7.7 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"
|
|
)
|
|
|
|
// PostNotebooksReader is a Reader for the PostNotebooks structure.
|
|
type PostNotebooksReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *PostNotebooksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewPostNotebooksOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewPostNotebooksUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewPostNotebooksForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewPostNotebooksNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewPostNotebooksUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewPostNotebooksInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewPostNotebooksOK creates a PostNotebooksOK with default headers values
|
|
func NewPostNotebooksOK() *PostNotebooksOK {
|
|
return &PostNotebooksOK{}
|
|
}
|
|
|
|
/* PostNotebooksOK describes a response with status code 200, with default header values.
|
|
|
|
Taxnexus Response with Notebook objects
|
|
*/
|
|
type PostNotebooksOK struct {
|
|
Payload *sfgate_models.NotebookResponse
|
|
}
|
|
|
|
func (o *PostNotebooksOK) Error() string {
|
|
return fmt.Sprintf("[POST /notebooks][%d] postNotebooksOK %+v", 200, o.Payload)
|
|
}
|
|
func (o *PostNotebooksOK) GetPayload() *sfgate_models.NotebookResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostNotebooksOK) 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
|
|
}
|
|
|
|
// NewPostNotebooksUnauthorized creates a PostNotebooksUnauthorized with default headers values
|
|
func NewPostNotebooksUnauthorized() *PostNotebooksUnauthorized {
|
|
return &PostNotebooksUnauthorized{}
|
|
}
|
|
|
|
/* PostNotebooksUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access unauthorized, invalid API-KEY was used
|
|
*/
|
|
type PostNotebooksUnauthorized struct {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
func (o *PostNotebooksUnauthorized) Error() string {
|
|
return fmt.Sprintf("[POST /notebooks][%d] postNotebooksUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
func (o *PostNotebooksUnauthorized) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostNotebooksUnauthorized) 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
|
|
}
|
|
|
|
// NewPostNotebooksForbidden creates a PostNotebooksForbidden with default headers values
|
|
func NewPostNotebooksForbidden() *PostNotebooksForbidden {
|
|
return &PostNotebooksForbidden{}
|
|
}
|
|
|
|
/* PostNotebooksForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type PostNotebooksForbidden struct {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
func (o *PostNotebooksForbidden) Error() string {
|
|
return fmt.Sprintf("[POST /notebooks][%d] postNotebooksForbidden %+v", 403, o.Payload)
|
|
}
|
|
func (o *PostNotebooksForbidden) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostNotebooksForbidden) 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
|
|
}
|
|
|
|
// NewPostNotebooksNotFound creates a PostNotebooksNotFound with default headers values
|
|
func NewPostNotebooksNotFound() *PostNotebooksNotFound {
|
|
return &PostNotebooksNotFound{}
|
|
}
|
|
|
|
/* PostNotebooksNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type PostNotebooksNotFound struct {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
func (o *PostNotebooksNotFound) Error() string {
|
|
return fmt.Sprintf("[POST /notebooks][%d] postNotebooksNotFound %+v", 404, o.Payload)
|
|
}
|
|
func (o *PostNotebooksNotFound) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostNotebooksNotFound) 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
|
|
}
|
|
|
|
// NewPostNotebooksUnprocessableEntity creates a PostNotebooksUnprocessableEntity with default headers values
|
|
func NewPostNotebooksUnprocessableEntity() *PostNotebooksUnprocessableEntity {
|
|
return &PostNotebooksUnprocessableEntity{}
|
|
}
|
|
|
|
/* PostNotebooksUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type PostNotebooksUnprocessableEntity struct {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
func (o *PostNotebooksUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[POST /notebooks][%d] postNotebooksUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
func (o *PostNotebooksUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostNotebooksUnprocessableEntity) 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
|
|
}
|
|
|
|
// NewPostNotebooksInternalServerError creates a PostNotebooksInternalServerError with default headers values
|
|
func NewPostNotebooksInternalServerError() *PostNotebooksInternalServerError {
|
|
return &PostNotebooksInternalServerError{}
|
|
}
|
|
|
|
/* PostNotebooksInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type PostNotebooksInternalServerError struct {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
func (o *PostNotebooksInternalServerError) Error() string {
|
|
return fmt.Sprintf("[POST /notebooks][%d] postNotebooksInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
func (o *PostNotebooksInternalServerError) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostNotebooksInternalServerError) 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
|
|
}
|