mirror of https://github.com/vernonkeenan/lib
485 lines
16 KiB
Go
485 lines
16 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 certificates
|
|
|
|
import (
|
|
"encoding/json"
|
|
stderrors "errors"
|
|
"fmt"
|
|
"io"
|
|
|
|
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/strfmt"
|
|
)
|
|
|
|
// GetCertificatesReader is a Reader for the GetCertificates structure.
|
|
type GetCertificatesReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetCertificatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetCertificatesOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewGetCertificatesUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewGetCertificatesForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetCertificatesNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewGetCertificatesUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetCertificatesInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[GET /certificates] getCertificates", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewGetCertificatesOK creates a GetCertificatesOK with default headers values
|
|
func NewGetCertificatesOK() *GetCertificatesOK {
|
|
return &GetCertificatesOK{}
|
|
}
|
|
|
|
// GetCertificatesOK describes a response with status code 200, with default header values.
|
|
//
|
|
// Certificate Response Object
|
|
type GetCertificatesOK struct {
|
|
Payload *members_models.CertificateResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this get certificates o k response has a 2xx status code
|
|
func (o *GetCertificatesOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get certificates o k response has a 3xx status code
|
|
func (o *GetCertificatesOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get certificates o k response has a 4xx status code
|
|
func (o *GetCertificatesOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get certificates o k response has a 5xx status code
|
|
func (o *GetCertificatesOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get certificates o k response a status code equal to that given
|
|
func (o *GetCertificatesOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get certificates o k response
|
|
func (o *GetCertificatesOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetCertificatesOK) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /certificates][%d] getCertificatesOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *GetCertificatesOK) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /certificates][%d] getCertificatesOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *GetCertificatesOK) GetPayload() *members_models.CertificateResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetCertificatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.CertificateResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetCertificatesUnauthorized creates a GetCertificatesUnauthorized with default headers values
|
|
func NewGetCertificatesUnauthorized() *GetCertificatesUnauthorized {
|
|
return &GetCertificatesUnauthorized{}
|
|
}
|
|
|
|
// GetCertificatesUnauthorized describes a response with status code 401, with default header values.
|
|
//
|
|
// Access Unauthorized, invalid API-KEY was used
|
|
type GetCertificatesUnauthorized struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get certificates unauthorized response has a 2xx status code
|
|
func (o *GetCertificatesUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get certificates unauthorized response has a 3xx status code
|
|
func (o *GetCertificatesUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get certificates unauthorized response has a 4xx status code
|
|
func (o *GetCertificatesUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get certificates unauthorized response has a 5xx status code
|
|
func (o *GetCertificatesUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get certificates unauthorized response a status code equal to that given
|
|
func (o *GetCertificatesUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the get certificates unauthorized response
|
|
func (o *GetCertificatesUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *GetCertificatesUnauthorized) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /certificates][%d] getCertificatesUnauthorized %s", 401, payload)
|
|
}
|
|
|
|
func (o *GetCertificatesUnauthorized) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /certificates][%d] getCertificatesUnauthorized %s", 401, payload)
|
|
}
|
|
|
|
func (o *GetCertificatesUnauthorized) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetCertificatesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetCertificatesForbidden creates a GetCertificatesForbidden with default headers values
|
|
func NewGetCertificatesForbidden() *GetCertificatesForbidden {
|
|
return &GetCertificatesForbidden{}
|
|
}
|
|
|
|
// GetCertificatesForbidden describes a response with status code 403, with default header values.
|
|
//
|
|
// Access forbidden, account lacks access
|
|
type GetCertificatesForbidden struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get certificates forbidden response has a 2xx status code
|
|
func (o *GetCertificatesForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get certificates forbidden response has a 3xx status code
|
|
func (o *GetCertificatesForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get certificates forbidden response has a 4xx status code
|
|
func (o *GetCertificatesForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get certificates forbidden response has a 5xx status code
|
|
func (o *GetCertificatesForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get certificates forbidden response a status code equal to that given
|
|
func (o *GetCertificatesForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the get certificates forbidden response
|
|
func (o *GetCertificatesForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *GetCertificatesForbidden) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /certificates][%d] getCertificatesForbidden %s", 403, payload)
|
|
}
|
|
|
|
func (o *GetCertificatesForbidden) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /certificates][%d] getCertificatesForbidden %s", 403, payload)
|
|
}
|
|
|
|
func (o *GetCertificatesForbidden) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetCertificatesForbidden) 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(members_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetCertificatesNotFound creates a GetCertificatesNotFound with default headers values
|
|
func NewGetCertificatesNotFound() *GetCertificatesNotFound {
|
|
return &GetCertificatesNotFound{}
|
|
}
|
|
|
|
// GetCertificatesNotFound describes a response with status code 404, with default header values.
|
|
//
|
|
// Resource was not found
|
|
type GetCertificatesNotFound struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get certificates not found response has a 2xx status code
|
|
func (o *GetCertificatesNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get certificates not found response has a 3xx status code
|
|
func (o *GetCertificatesNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get certificates not found response has a 4xx status code
|
|
func (o *GetCertificatesNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get certificates not found response has a 5xx status code
|
|
func (o *GetCertificatesNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get certificates not found response a status code equal to that given
|
|
func (o *GetCertificatesNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the get certificates not found response
|
|
func (o *GetCertificatesNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *GetCertificatesNotFound) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /certificates][%d] getCertificatesNotFound %s", 404, payload)
|
|
}
|
|
|
|
func (o *GetCertificatesNotFound) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /certificates][%d] getCertificatesNotFound %s", 404, payload)
|
|
}
|
|
|
|
func (o *GetCertificatesNotFound) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetCertificatesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetCertificatesUnprocessableEntity creates a GetCertificatesUnprocessableEntity with default headers values
|
|
func NewGetCertificatesUnprocessableEntity() *GetCertificatesUnprocessableEntity {
|
|
return &GetCertificatesUnprocessableEntity{}
|
|
}
|
|
|
|
// GetCertificatesUnprocessableEntity describes a response with status code 422, with default header values.
|
|
//
|
|
// Unprocessable Entity, likely a bad parameter
|
|
type GetCertificatesUnprocessableEntity struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get certificates unprocessable entity response has a 2xx status code
|
|
func (o *GetCertificatesUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get certificates unprocessable entity response has a 3xx status code
|
|
func (o *GetCertificatesUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get certificates unprocessable entity response has a 4xx status code
|
|
func (o *GetCertificatesUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get certificates unprocessable entity response has a 5xx status code
|
|
func (o *GetCertificatesUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get certificates unprocessable entity response a status code equal to that given
|
|
func (o *GetCertificatesUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the get certificates unprocessable entity response
|
|
func (o *GetCertificatesUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *GetCertificatesUnprocessableEntity) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /certificates][%d] getCertificatesUnprocessableEntity %s", 422, payload)
|
|
}
|
|
|
|
func (o *GetCertificatesUnprocessableEntity) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /certificates][%d] getCertificatesUnprocessableEntity %s", 422, payload)
|
|
}
|
|
|
|
func (o *GetCertificatesUnprocessableEntity) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetCertificatesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetCertificatesInternalServerError creates a GetCertificatesInternalServerError with default headers values
|
|
func NewGetCertificatesInternalServerError() *GetCertificatesInternalServerError {
|
|
return &GetCertificatesInternalServerError{}
|
|
}
|
|
|
|
// GetCertificatesInternalServerError describes a response with status code 500, with default header values.
|
|
//
|
|
// Server Internal Error
|
|
type GetCertificatesInternalServerError struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get certificates internal server error response has a 2xx status code
|
|
func (o *GetCertificatesInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get certificates internal server error response has a 3xx status code
|
|
func (o *GetCertificatesInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get certificates internal server error response has a 4xx status code
|
|
func (o *GetCertificatesInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get certificates internal server error response has a 5xx status code
|
|
func (o *GetCertificatesInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get certificates internal server error response a status code equal to that given
|
|
func (o *GetCertificatesInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the get certificates internal server error response
|
|
func (o *GetCertificatesInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *GetCertificatesInternalServerError) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /certificates][%d] getCertificatesInternalServerError %s", 500, payload)
|
|
}
|
|
|
|
func (o *GetCertificatesInternalServerError) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /certificates][%d] getCertificatesInternalServerError %s", 500, payload)
|
|
}
|
|
|
|
func (o *GetCertificatesInternalServerError) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetCertificatesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|