1 // Code generated by go-swagger; DO NOT EDIT.
5 // This file was generated by the swagger tool.
6 // Editing this file might prove futile when you re-run the swagger generate command
11 "github.com/go-openapi/runtime"
13 strfmt "github.com/go-openapi/strfmt"
16 // UnsubscribeReader is a Reader for the Unsubscribe structure.
17 type UnsubscribeReader struct {
18 formats strfmt.Registry
21 // ReadResponse reads a server response into the received o.
22 func (o *UnsubscribeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
23 switch response.Code() {
26 result := NewUnsubscribeNoContent()
27 if err := result.readResponse(response, consumer, o.formats); err != nil {
33 result := NewUnsubscribeBadRequest()
34 if err := result.readResponse(response, consumer, o.formats); err != nil {
40 result := NewUnsubscribeInternalServerError()
41 if err := result.readResponse(response, consumer, o.formats); err != nil {
47 return nil, runtime.NewAPIError("unknown error", response, response.Code())
51 // NewUnsubscribeNoContent creates a UnsubscribeNoContent with default headers values
52 func NewUnsubscribeNoContent() *UnsubscribeNoContent {
53 return &UnsubscribeNoContent{}
56 /*UnsubscribeNoContent handles this case with default header values.
58 Operation done successfully
60 type UnsubscribeNoContent struct {
63 func (o *UnsubscribeNoContent) Error() string {
64 return fmt.Sprintf("[DELETE /subscriptions/{subscriptionId}][%d] unsubscribeNoContent ", 204)
67 func (o *UnsubscribeNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
72 // NewUnsubscribeBadRequest creates a UnsubscribeBadRequest with default headers values
73 func NewUnsubscribeBadRequest() *UnsubscribeBadRequest {
74 return &UnsubscribeBadRequest{}
77 /*UnsubscribeBadRequest handles this case with default header values.
79 Invalid requestorId supplied
81 type UnsubscribeBadRequest struct {
84 func (o *UnsubscribeBadRequest) Error() string {
85 return fmt.Sprintf("[DELETE /subscriptions/{subscriptionId}][%d] unsubscribeBadRequest ", 400)
88 func (o *UnsubscribeBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
93 // NewUnsubscribeInternalServerError creates a UnsubscribeInternalServerError with default headers values
94 func NewUnsubscribeInternalServerError() *UnsubscribeInternalServerError {
95 return &UnsubscribeInternalServerError{}
98 /*UnsubscribeInternalServerError handles this case with default header values.
102 type UnsubscribeInternalServerError struct {
105 func (o *UnsubscribeInternalServerError) Error() string {
106 return fmt.Sprintf("[DELETE /subscriptions/{subscriptionId}][%d] unsubscribeInternalServerError ", 500)
109 func (o *UnsubscribeInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {