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 strains
// 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/metrc-gw/metrc_gw_models"
2021-01-08 17:40:28 +00:00
)
// DeleteStrainReader is a Reader for the DeleteStrain structure.
type DeleteStrainReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * DeleteStrainReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewDeleteStrainOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewDeleteStrainUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewDeleteStrainForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewDeleteStrainNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewDeleteStrainInternalServerError ( )
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
}
}
// NewDeleteStrainOK creates a DeleteStrainOK with default headers values
func NewDeleteStrainOK ( ) * DeleteStrainOK {
return & DeleteStrainOK { }
}
2021-02-09 16:56:57 +00:00
/ * DeleteStrainOK describes a response with status code 200 , with default header values .
2021-01-08 17:40:28 +00:00
Strains were successfully retrieved
* /
type DeleteStrainOK struct {
Payload * metrc_gw_models . StrainResponse
}
func ( o * DeleteStrainOK ) Error ( ) string {
return fmt . Sprintf ( "[DELETE /strains][%d] deleteStrainOK %+v" , 200 , o . Payload )
}
func ( o * DeleteStrainOK ) GetPayload ( ) * metrc_gw_models . StrainResponse {
return o . Payload
}
func ( o * DeleteStrainOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( metrc_gw_models . StrainResponse )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewDeleteStrainUnauthorized creates a DeleteStrainUnauthorized with default headers values
func NewDeleteStrainUnauthorized ( ) * DeleteStrainUnauthorized {
return & DeleteStrainUnauthorized { }
}
2021-02-09 16:56:57 +00:00
/ * DeleteStrainUnauthorized 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 DeleteStrainUnauthorized struct {
Payload * metrc_gw_models . Error
}
func ( o * DeleteStrainUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[DELETE /strains][%d] deleteStrainUnauthorized %+v" , 401 , o . Payload )
}
func ( o * DeleteStrainUnauthorized ) GetPayload ( ) * metrc_gw_models . Error {
return o . Payload
}
func ( o * DeleteStrainUnauthorized ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( metrc_gw_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewDeleteStrainForbidden creates a DeleteStrainForbidden with default headers values
func NewDeleteStrainForbidden ( ) * DeleteStrainForbidden {
return & DeleteStrainForbidden { }
}
2021-02-09 16:56:57 +00:00
/ * DeleteStrainForbidden 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 DeleteStrainForbidden struct {
Payload * metrc_gw_models . Error
}
func ( o * DeleteStrainForbidden ) Error ( ) string {
return fmt . Sprintf ( "[DELETE /strains][%d] deleteStrainForbidden %+v" , 403 , o . Payload )
}
func ( o * DeleteStrainForbidden ) GetPayload ( ) * metrc_gw_models . Error {
return o . Payload
}
func ( o * DeleteStrainForbidden ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( metrc_gw_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewDeleteStrainNotFound creates a DeleteStrainNotFound with default headers values
func NewDeleteStrainNotFound ( ) * DeleteStrainNotFound {
return & DeleteStrainNotFound { }
}
2021-02-09 16:56:57 +00:00
/ * DeleteStrainNotFound describes a response with status code 404 , with default header values .
2021-01-08 17:40:28 +00:00
Resource was not found
* /
type DeleteStrainNotFound struct {
Payload * metrc_gw_models . Error
}
func ( o * DeleteStrainNotFound ) Error ( ) string {
return fmt . Sprintf ( "[DELETE /strains][%d] deleteStrainNotFound %+v" , 404 , o . Payload )
}
func ( o * DeleteStrainNotFound ) GetPayload ( ) * metrc_gw_models . Error {
return o . Payload
}
func ( o * DeleteStrainNotFound ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( metrc_gw_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewDeleteStrainInternalServerError creates a DeleteStrainInternalServerError with default headers values
func NewDeleteStrainInternalServerError ( ) * DeleteStrainInternalServerError {
return & DeleteStrainInternalServerError { }
}
2021-02-09 16:56:57 +00:00
/ * DeleteStrainInternalServerError describes a response with status code 500 , with default header values .
2021-01-08 17:40:28 +00:00
Server Internal Error
* /
type DeleteStrainInternalServerError struct {
Payload * metrc_gw_models . Error
}
func ( o * DeleteStrainInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[DELETE /strains][%d] deleteStrainInternalServerError %+v" , 500 , o . Payload )
}
func ( o * DeleteStrainInternalServerError ) GetPayload ( ) * metrc_gw_models . Error {
return o . Payload
}
func ( o * DeleteStrainInternalServerError ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( metrc_gw_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}