mirror of https://github.com/vernonkeenan/lib
532 lines
17 KiB
Go
532 lines
17 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 company_products
|
|
|
|
// 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/research/research_models"
|
|
)
|
|
|
|
// DeleteCompanyProductReader is a Reader for the DeleteCompanyProduct structure.
|
|
type DeleteCompanyProductReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *DeleteCompanyProductReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewDeleteCompanyProductOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewDeleteCompanyProductUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewDeleteCompanyProductForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewDeleteCompanyProductNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewDeleteCompanyProductUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewDeleteCompanyProductInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewDeleteCompanyProductOK creates a DeleteCompanyProductOK with default headers values
|
|
func NewDeleteCompanyProductOK() *DeleteCompanyProductOK {
|
|
return &DeleteCompanyProductOK{}
|
|
}
|
|
|
|
/*
|
|
DeleteCompanyProductOK describes a response with status code 200, with default header values.
|
|
|
|
Response with Message Objects with Delete Status
|
|
*/
|
|
type DeleteCompanyProductOK struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.DeleteResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this delete company product o k response has a 2xx status code
|
|
func (o *DeleteCompanyProductOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this delete company product o k response has a 3xx status code
|
|
func (o *DeleteCompanyProductOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete company product o k response has a 4xx status code
|
|
func (o *DeleteCompanyProductOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this delete company product o k response has a 5xx status code
|
|
func (o *DeleteCompanyProductOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete company product o k response a status code equal to that given
|
|
func (o *DeleteCompanyProductOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the delete company product o k response
|
|
func (o *DeleteCompanyProductOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *DeleteCompanyProductOK) Error() string {
|
|
return fmt.Sprintf("[DELETE /companyproducts][%d] deleteCompanyProductOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteCompanyProductOK) String() string {
|
|
return fmt.Sprintf("[DELETE /companyproducts][%d] deleteCompanyProductOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteCompanyProductOK) GetPayload() *research_models.DeleteResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *DeleteCompanyProductOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header Access-Control-Allow-Origin
|
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
|
|
|
if hdrAccessControlAllowOrigin != "" {
|
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
|
}
|
|
|
|
o.Payload = new(research_models.DeleteResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewDeleteCompanyProductUnauthorized creates a DeleteCompanyProductUnauthorized with default headers values
|
|
func NewDeleteCompanyProductUnauthorized() *DeleteCompanyProductUnauthorized {
|
|
return &DeleteCompanyProductUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
DeleteCompanyProductUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access unauthorized, invalid API-KEY was used
|
|
*/
|
|
type DeleteCompanyProductUnauthorized struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this delete company product unauthorized response has a 2xx status code
|
|
func (o *DeleteCompanyProductUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete company product unauthorized response has a 3xx status code
|
|
func (o *DeleteCompanyProductUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete company product unauthorized response has a 4xx status code
|
|
func (o *DeleteCompanyProductUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete company product unauthorized response has a 5xx status code
|
|
func (o *DeleteCompanyProductUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete company product unauthorized response a status code equal to that given
|
|
func (o *DeleteCompanyProductUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the delete company product unauthorized response
|
|
func (o *DeleteCompanyProductUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *DeleteCompanyProductUnauthorized) Error() string {
|
|
return fmt.Sprintf("[DELETE /companyproducts][%d] deleteCompanyProductUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteCompanyProductUnauthorized) String() string {
|
|
return fmt.Sprintf("[DELETE /companyproducts][%d] deleteCompanyProductUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteCompanyProductUnauthorized) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *DeleteCompanyProductUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header Access-Control-Allow-Origin
|
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
|
|
|
if hdrAccessControlAllowOrigin != "" {
|
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
|
}
|
|
|
|
o.Payload = new(research_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewDeleteCompanyProductForbidden creates a DeleteCompanyProductForbidden with default headers values
|
|
func NewDeleteCompanyProductForbidden() *DeleteCompanyProductForbidden {
|
|
return &DeleteCompanyProductForbidden{}
|
|
}
|
|
|
|
/*
|
|
DeleteCompanyProductForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type DeleteCompanyProductForbidden struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this delete company product forbidden response has a 2xx status code
|
|
func (o *DeleteCompanyProductForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete company product forbidden response has a 3xx status code
|
|
func (o *DeleteCompanyProductForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete company product forbidden response has a 4xx status code
|
|
func (o *DeleteCompanyProductForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete company product forbidden response has a 5xx status code
|
|
func (o *DeleteCompanyProductForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete company product forbidden response a status code equal to that given
|
|
func (o *DeleteCompanyProductForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the delete company product forbidden response
|
|
func (o *DeleteCompanyProductForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *DeleteCompanyProductForbidden) Error() string {
|
|
return fmt.Sprintf("[DELETE /companyproducts][%d] deleteCompanyProductForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteCompanyProductForbidden) String() string {
|
|
return fmt.Sprintf("[DELETE /companyproducts][%d] deleteCompanyProductForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteCompanyProductForbidden) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *DeleteCompanyProductForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header Access-Control-Allow-Origin
|
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
|
|
|
if hdrAccessControlAllowOrigin != "" {
|
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
|
}
|
|
|
|
o.Payload = new(research_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewDeleteCompanyProductNotFound creates a DeleteCompanyProductNotFound with default headers values
|
|
func NewDeleteCompanyProductNotFound() *DeleteCompanyProductNotFound {
|
|
return &DeleteCompanyProductNotFound{}
|
|
}
|
|
|
|
/*
|
|
DeleteCompanyProductNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type DeleteCompanyProductNotFound struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this delete company product not found response has a 2xx status code
|
|
func (o *DeleteCompanyProductNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete company product not found response has a 3xx status code
|
|
func (o *DeleteCompanyProductNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete company product not found response has a 4xx status code
|
|
func (o *DeleteCompanyProductNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete company product not found response has a 5xx status code
|
|
func (o *DeleteCompanyProductNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete company product not found response a status code equal to that given
|
|
func (o *DeleteCompanyProductNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the delete company product not found response
|
|
func (o *DeleteCompanyProductNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *DeleteCompanyProductNotFound) Error() string {
|
|
return fmt.Sprintf("[DELETE /companyproducts][%d] deleteCompanyProductNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteCompanyProductNotFound) String() string {
|
|
return fmt.Sprintf("[DELETE /companyproducts][%d] deleteCompanyProductNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteCompanyProductNotFound) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *DeleteCompanyProductNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header Access-Control-Allow-Origin
|
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
|
|
|
if hdrAccessControlAllowOrigin != "" {
|
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
|
}
|
|
|
|
o.Payload = new(research_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewDeleteCompanyProductUnprocessableEntity creates a DeleteCompanyProductUnprocessableEntity with default headers values
|
|
func NewDeleteCompanyProductUnprocessableEntity() *DeleteCompanyProductUnprocessableEntity {
|
|
return &DeleteCompanyProductUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
DeleteCompanyProductUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type DeleteCompanyProductUnprocessableEntity struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this delete company product unprocessable entity response has a 2xx status code
|
|
func (o *DeleteCompanyProductUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete company product unprocessable entity response has a 3xx status code
|
|
func (o *DeleteCompanyProductUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete company product unprocessable entity response has a 4xx status code
|
|
func (o *DeleteCompanyProductUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete company product unprocessable entity response has a 5xx status code
|
|
func (o *DeleteCompanyProductUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete company product unprocessable entity response a status code equal to that given
|
|
func (o *DeleteCompanyProductUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the delete company product unprocessable entity response
|
|
func (o *DeleteCompanyProductUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *DeleteCompanyProductUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[DELETE /companyproducts][%d] deleteCompanyProductUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteCompanyProductUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[DELETE /companyproducts][%d] deleteCompanyProductUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteCompanyProductUnprocessableEntity) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *DeleteCompanyProductUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header Access-Control-Allow-Origin
|
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
|
|
|
if hdrAccessControlAllowOrigin != "" {
|
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
|
}
|
|
|
|
o.Payload = new(research_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewDeleteCompanyProductInternalServerError creates a DeleteCompanyProductInternalServerError with default headers values
|
|
func NewDeleteCompanyProductInternalServerError() *DeleteCompanyProductInternalServerError {
|
|
return &DeleteCompanyProductInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
DeleteCompanyProductInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type DeleteCompanyProductInternalServerError struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this delete company product internal server error response has a 2xx status code
|
|
func (o *DeleteCompanyProductInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete company product internal server error response has a 3xx status code
|
|
func (o *DeleteCompanyProductInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete company product internal server error response has a 4xx status code
|
|
func (o *DeleteCompanyProductInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this delete company product internal server error response has a 5xx status code
|
|
func (o *DeleteCompanyProductInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this delete company product internal server error response a status code equal to that given
|
|
func (o *DeleteCompanyProductInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the delete company product internal server error response
|
|
func (o *DeleteCompanyProductInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *DeleteCompanyProductInternalServerError) Error() string {
|
|
return fmt.Sprintf("[DELETE /companyproducts][%d] deleteCompanyProductInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteCompanyProductInternalServerError) String() string {
|
|
return fmt.Sprintf("[DELETE /companyproducts][%d] deleteCompanyProductInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteCompanyProductInternalServerError) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *DeleteCompanyProductInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header Access-Control-Allow-Origin
|
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
|
|
|
if hdrAccessControlAllowOrigin != "" {
|
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
|
}
|
|
|
|
o.Payload = new(research_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|