// 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 // 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/members/members_models" ) // PutCertificatesReader is a Reader for the PutCertificates structure. type PutCertificatesReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *PutCertificatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewPutCertificatesOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 401: result := NewPutCertificatesUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewPutCertificatesForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewPutCertificatesNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 422: result := NewPutCertificatesUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewPutCertificatesInternalServerError() 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()) } } // NewPutCertificatesOK creates a PutCertificatesOK with default headers values func NewPutCertificatesOK() *PutCertificatesOK { return &PutCertificatesOK{} } /* PutCertificatesOK describes a response with status code 200, with default header values. Certificate Response Object */ type PutCertificatesOK struct { Payload *members_models.CertificateResponse } // IsSuccess returns true when this put certificates o k response has a 2xx status code func (o *PutCertificatesOK) IsSuccess() bool { return true } // IsRedirect returns true when this put certificates o k response has a 3xx status code func (o *PutCertificatesOK) IsRedirect() bool { return false } // IsClientError returns true when this put certificates o k response has a 4xx status code func (o *PutCertificatesOK) IsClientError() bool { return false } // IsServerError returns true when this put certificates o k response has a 5xx status code func (o *PutCertificatesOK) IsServerError() bool { return false } // IsCode returns true when this put certificates o k response a status code equal to that given func (o *PutCertificatesOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the put certificates o k response func (o *PutCertificatesOK) Code() int { return 200 } func (o *PutCertificatesOK) Error() string { return fmt.Sprintf("[PUT /certificates][%d] putCertificatesOK %+v", 200, o.Payload) } func (o *PutCertificatesOK) String() string { return fmt.Sprintf("[PUT /certificates][%d] putCertificatesOK %+v", 200, o.Payload) } func (o *PutCertificatesOK) GetPayload() *members_models.CertificateResponse { return o.Payload } func (o *PutCertificatesOK) 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 && err != io.EOF { return err } return nil } // NewPutCertificatesUnauthorized creates a PutCertificatesUnauthorized with default headers values func NewPutCertificatesUnauthorized() *PutCertificatesUnauthorized { return &PutCertificatesUnauthorized{} } /* PutCertificatesUnauthorized describes a response with status code 401, with default header values. Access Unauthorized, invalid API-KEY was used */ type PutCertificatesUnauthorized struct { Payload *members_models.Error } // IsSuccess returns true when this put certificates unauthorized response has a 2xx status code func (o *PutCertificatesUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this put certificates unauthorized response has a 3xx status code func (o *PutCertificatesUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this put certificates unauthorized response has a 4xx status code func (o *PutCertificatesUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this put certificates unauthorized response has a 5xx status code func (o *PutCertificatesUnauthorized) IsServerError() bool { return false } // IsCode returns true when this put certificates unauthorized response a status code equal to that given func (o *PutCertificatesUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the put certificates unauthorized response func (o *PutCertificatesUnauthorized) Code() int { return 401 } func (o *PutCertificatesUnauthorized) Error() string { return fmt.Sprintf("[PUT /certificates][%d] putCertificatesUnauthorized %+v", 401, o.Payload) } func (o *PutCertificatesUnauthorized) String() string { return fmt.Sprintf("[PUT /certificates][%d] putCertificatesUnauthorized %+v", 401, o.Payload) } func (o *PutCertificatesUnauthorized) GetPayload() *members_models.Error { return o.Payload } func (o *PutCertificatesUnauthorized) 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 && err != io.EOF { return err } return nil } // NewPutCertificatesForbidden creates a PutCertificatesForbidden with default headers values func NewPutCertificatesForbidden() *PutCertificatesForbidden { return &PutCertificatesForbidden{} } /* PutCertificatesForbidden describes a response with status code 403, with default header values. Access forbidden, account lacks access */ type PutCertificatesForbidden struct { AccessControlAllowOrigin string Payload *members_models.Error } // IsSuccess returns true when this put certificates forbidden response has a 2xx status code func (o *PutCertificatesForbidden) IsSuccess() bool { return false } // IsRedirect returns true when this put certificates forbidden response has a 3xx status code func (o *PutCertificatesForbidden) IsRedirect() bool { return false } // IsClientError returns true when this put certificates forbidden response has a 4xx status code func (o *PutCertificatesForbidden) IsClientError() bool { return true } // IsServerError returns true when this put certificates forbidden response has a 5xx status code func (o *PutCertificatesForbidden) IsServerError() bool { return false } // IsCode returns true when this put certificates forbidden response a status code equal to that given func (o *PutCertificatesForbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the put certificates forbidden response func (o *PutCertificatesForbidden) Code() int { return 403 } func (o *PutCertificatesForbidden) Error() string { return fmt.Sprintf("[PUT /certificates][%d] putCertificatesForbidden %+v", 403, o.Payload) } func (o *PutCertificatesForbidden) String() string { return fmt.Sprintf("[PUT /certificates][%d] putCertificatesForbidden %+v", 403, o.Payload) } func (o *PutCertificatesForbidden) GetPayload() *members_models.Error { return o.Payload } func (o *PutCertificatesForbidden) 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 && err != io.EOF { return err } return nil } // NewPutCertificatesNotFound creates a PutCertificatesNotFound with default headers values func NewPutCertificatesNotFound() *PutCertificatesNotFound { return &PutCertificatesNotFound{} } /* PutCertificatesNotFound describes a response with status code 404, with default header values. Resource was not found */ type PutCertificatesNotFound struct { Payload *members_models.Error } // IsSuccess returns true when this put certificates not found response has a 2xx status code func (o *PutCertificatesNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this put certificates not found response has a 3xx status code func (o *PutCertificatesNotFound) IsRedirect() bool { return false } // IsClientError returns true when this put certificates not found response has a 4xx status code func (o *PutCertificatesNotFound) IsClientError() bool { return true } // IsServerError returns true when this put certificates not found response has a 5xx status code func (o *PutCertificatesNotFound) IsServerError() bool { return false } // IsCode returns true when this put certificates not found response a status code equal to that given func (o *PutCertificatesNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the put certificates not found response func (o *PutCertificatesNotFound) Code() int { return 404 } func (o *PutCertificatesNotFound) Error() string { return fmt.Sprintf("[PUT /certificates][%d] putCertificatesNotFound %+v", 404, o.Payload) } func (o *PutCertificatesNotFound) String() string { return fmt.Sprintf("[PUT /certificates][%d] putCertificatesNotFound %+v", 404, o.Payload) } func (o *PutCertificatesNotFound) GetPayload() *members_models.Error { return o.Payload } func (o *PutCertificatesNotFound) 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 && err != io.EOF { return err } return nil } // NewPutCertificatesUnprocessableEntity creates a PutCertificatesUnprocessableEntity with default headers values func NewPutCertificatesUnprocessableEntity() *PutCertificatesUnprocessableEntity { return &PutCertificatesUnprocessableEntity{} } /* PutCertificatesUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity, likely a bad parameter */ type PutCertificatesUnprocessableEntity struct { Payload *members_models.Error } // IsSuccess returns true when this put certificates unprocessable entity response has a 2xx status code func (o *PutCertificatesUnprocessableEntity) IsSuccess() bool { return false } // IsRedirect returns true when this put certificates unprocessable entity response has a 3xx status code func (o *PutCertificatesUnprocessableEntity) IsRedirect() bool { return false } // IsClientError returns true when this put certificates unprocessable entity response has a 4xx status code func (o *PutCertificatesUnprocessableEntity) IsClientError() bool { return true } // IsServerError returns true when this put certificates unprocessable entity response has a 5xx status code func (o *PutCertificatesUnprocessableEntity) IsServerError() bool { return false } // IsCode returns true when this put certificates unprocessable entity response a status code equal to that given func (o *PutCertificatesUnprocessableEntity) IsCode(code int) bool { return code == 422 } // Code gets the status code for the put certificates unprocessable entity response func (o *PutCertificatesUnprocessableEntity) Code() int { return 422 } func (o *PutCertificatesUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /certificates][%d] putCertificatesUnprocessableEntity %+v", 422, o.Payload) } func (o *PutCertificatesUnprocessableEntity) String() string { return fmt.Sprintf("[PUT /certificates][%d] putCertificatesUnprocessableEntity %+v", 422, o.Payload) } func (o *PutCertificatesUnprocessableEntity) GetPayload() *members_models.Error { return o.Payload } func (o *PutCertificatesUnprocessableEntity) 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 && err != io.EOF { return err } return nil } // NewPutCertificatesInternalServerError creates a PutCertificatesInternalServerError with default headers values func NewPutCertificatesInternalServerError() *PutCertificatesInternalServerError { return &PutCertificatesInternalServerError{} } /* PutCertificatesInternalServerError describes a response with status code 500, with default header values. Server Internal Error */ type PutCertificatesInternalServerError struct { Payload *members_models.Error } // IsSuccess returns true when this put certificates internal server error response has a 2xx status code func (o *PutCertificatesInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this put certificates internal server error response has a 3xx status code func (o *PutCertificatesInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this put certificates internal server error response has a 4xx status code func (o *PutCertificatesInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this put certificates internal server error response has a 5xx status code func (o *PutCertificatesInternalServerError) IsServerError() bool { return true } // IsCode returns true when this put certificates internal server error response a status code equal to that given func (o *PutCertificatesInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the put certificates internal server error response func (o *PutCertificatesInternalServerError) Code() int { return 500 } func (o *PutCertificatesInternalServerError) Error() string { return fmt.Sprintf("[PUT /certificates][%d] putCertificatesInternalServerError %+v", 500, o.Payload) } func (o *PutCertificatesInternalServerError) String() string { return fmt.Sprintf("[PUT /certificates][%d] putCertificatesInternalServerError %+v", 500, o.Payload) } func (o *PutCertificatesInternalServerError) GetPayload() *members_models.Error { return o.Payload } func (o *PutCertificatesInternalServerError) 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 && err != io.EOF { return err } return nil }