// Code generated by go-swagger; DO NOT EDIT. package statuses // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "git.coopcloud.tech/decentral1se/gtslib/models" ) // StatusUnpinReader is a Reader for the StatusUnpin structure. type StatusUnpinReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *StatusUnpinReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewStatusUnpinOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewStatusUnpinBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 401: result := NewStatusUnpinUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewStatusUnpinForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewStatusUnpinNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 406: result := NewStatusUnpinNotAcceptable() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewStatusUnpinInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("[POST /api/v1/statuses/{id}/unpin] statusUnpin", response, response.Code()) } } // NewStatusUnpinOK creates a StatusUnpinOK with default headers values func NewStatusUnpinOK() *StatusUnpinOK { return &StatusUnpinOK{} } /* StatusUnpinOK describes a response with status code 200, with default header values. The status. */ type StatusUnpinOK struct { Payload *models.Status } // IsSuccess returns true when this status unpin o k response has a 2xx status code func (o *StatusUnpinOK) IsSuccess() bool { return true } // IsRedirect returns true when this status unpin o k response has a 3xx status code func (o *StatusUnpinOK) IsRedirect() bool { return false } // IsClientError returns true when this status unpin o k response has a 4xx status code func (o *StatusUnpinOK) IsClientError() bool { return false } // IsServerError returns true when this status unpin o k response has a 5xx status code func (o *StatusUnpinOK) IsServerError() bool { return false } // IsCode returns true when this status unpin o k response a status code equal to that given func (o *StatusUnpinOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the status unpin o k response func (o *StatusUnpinOK) Code() int { return 200 } func (o *StatusUnpinOK) Error() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[POST /api/v1/statuses/{id}/unpin][%d] statusUnpinOK %s", 200, payload) } func (o *StatusUnpinOK) String() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[POST /api/v1/statuses/{id}/unpin][%d] statusUnpinOK %s", 200, payload) } func (o *StatusUnpinOK) GetPayload() *models.Status { return o.Payload } func (o *StatusUnpinOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Status) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewStatusUnpinBadRequest creates a StatusUnpinBadRequest with default headers values func NewStatusUnpinBadRequest() *StatusUnpinBadRequest { return &StatusUnpinBadRequest{} } /* StatusUnpinBadRequest describes a response with status code 400, with default header values. bad request */ type StatusUnpinBadRequest struct { } // IsSuccess returns true when this status unpin bad request response has a 2xx status code func (o *StatusUnpinBadRequest) IsSuccess() bool { return false } // IsRedirect returns true when this status unpin bad request response has a 3xx status code func (o *StatusUnpinBadRequest) IsRedirect() bool { return false } // IsClientError returns true when this status unpin bad request response has a 4xx status code func (o *StatusUnpinBadRequest) IsClientError() bool { return true } // IsServerError returns true when this status unpin bad request response has a 5xx status code func (o *StatusUnpinBadRequest) IsServerError() bool { return false } // IsCode returns true when this status unpin bad request response a status code equal to that given func (o *StatusUnpinBadRequest) IsCode(code int) bool { return code == 400 } // Code gets the status code for the status unpin bad request response func (o *StatusUnpinBadRequest) Code() int { return 400 } func (o *StatusUnpinBadRequest) Error() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/unpin][%d] statusUnpinBadRequest", 400) } func (o *StatusUnpinBadRequest) String() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/unpin][%d] statusUnpinBadRequest", 400) } func (o *StatusUnpinBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewStatusUnpinUnauthorized creates a StatusUnpinUnauthorized with default headers values func NewStatusUnpinUnauthorized() *StatusUnpinUnauthorized { return &StatusUnpinUnauthorized{} } /* StatusUnpinUnauthorized describes a response with status code 401, with default header values. unauthorized */ type StatusUnpinUnauthorized struct { } // IsSuccess returns true when this status unpin unauthorized response has a 2xx status code func (o *StatusUnpinUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this status unpin unauthorized response has a 3xx status code func (o *StatusUnpinUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this status unpin unauthorized response has a 4xx status code func (o *StatusUnpinUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this status unpin unauthorized response has a 5xx status code func (o *StatusUnpinUnauthorized) IsServerError() bool { return false } // IsCode returns true when this status unpin unauthorized response a status code equal to that given func (o *StatusUnpinUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the status unpin unauthorized response func (o *StatusUnpinUnauthorized) Code() int { return 401 } func (o *StatusUnpinUnauthorized) Error() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/unpin][%d] statusUnpinUnauthorized", 401) } func (o *StatusUnpinUnauthorized) String() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/unpin][%d] statusUnpinUnauthorized", 401) } func (o *StatusUnpinUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewStatusUnpinForbidden creates a StatusUnpinForbidden with default headers values func NewStatusUnpinForbidden() *StatusUnpinForbidden { return &StatusUnpinForbidden{} } /* StatusUnpinForbidden describes a response with status code 403, with default header values. forbidden */ type StatusUnpinForbidden struct { } // IsSuccess returns true when this status unpin forbidden response has a 2xx status code func (o *StatusUnpinForbidden) IsSuccess() bool { return false } // IsRedirect returns true when this status unpin forbidden response has a 3xx status code func (o *StatusUnpinForbidden) IsRedirect() bool { return false } // IsClientError returns true when this status unpin forbidden response has a 4xx status code func (o *StatusUnpinForbidden) IsClientError() bool { return true } // IsServerError returns true when this status unpin forbidden response has a 5xx status code func (o *StatusUnpinForbidden) IsServerError() bool { return false } // IsCode returns true when this status unpin forbidden response a status code equal to that given func (o *StatusUnpinForbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the status unpin forbidden response func (o *StatusUnpinForbidden) Code() int { return 403 } func (o *StatusUnpinForbidden) Error() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/unpin][%d] statusUnpinForbidden", 403) } func (o *StatusUnpinForbidden) String() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/unpin][%d] statusUnpinForbidden", 403) } func (o *StatusUnpinForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewStatusUnpinNotFound creates a StatusUnpinNotFound with default headers values func NewStatusUnpinNotFound() *StatusUnpinNotFound { return &StatusUnpinNotFound{} } /* StatusUnpinNotFound describes a response with status code 404, with default header values. not found */ type StatusUnpinNotFound struct { } // IsSuccess returns true when this status unpin not found response has a 2xx status code func (o *StatusUnpinNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this status unpin not found response has a 3xx status code func (o *StatusUnpinNotFound) IsRedirect() bool { return false } // IsClientError returns true when this status unpin not found response has a 4xx status code func (o *StatusUnpinNotFound) IsClientError() bool { return true } // IsServerError returns true when this status unpin not found response has a 5xx status code func (o *StatusUnpinNotFound) IsServerError() bool { return false } // IsCode returns true when this status unpin not found response a status code equal to that given func (o *StatusUnpinNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the status unpin not found response func (o *StatusUnpinNotFound) Code() int { return 404 } func (o *StatusUnpinNotFound) Error() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/unpin][%d] statusUnpinNotFound", 404) } func (o *StatusUnpinNotFound) String() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/unpin][%d] statusUnpinNotFound", 404) } func (o *StatusUnpinNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewStatusUnpinNotAcceptable creates a StatusUnpinNotAcceptable with default headers values func NewStatusUnpinNotAcceptable() *StatusUnpinNotAcceptable { return &StatusUnpinNotAcceptable{} } /* StatusUnpinNotAcceptable describes a response with status code 406, with default header values. not acceptable */ type StatusUnpinNotAcceptable struct { } // IsSuccess returns true when this status unpin not acceptable response has a 2xx status code func (o *StatusUnpinNotAcceptable) IsSuccess() bool { return false } // IsRedirect returns true when this status unpin not acceptable response has a 3xx status code func (o *StatusUnpinNotAcceptable) IsRedirect() bool { return false } // IsClientError returns true when this status unpin not acceptable response has a 4xx status code func (o *StatusUnpinNotAcceptable) IsClientError() bool { return true } // IsServerError returns true when this status unpin not acceptable response has a 5xx status code func (o *StatusUnpinNotAcceptable) IsServerError() bool { return false } // IsCode returns true when this status unpin not acceptable response a status code equal to that given func (o *StatusUnpinNotAcceptable) IsCode(code int) bool { return code == 406 } // Code gets the status code for the status unpin not acceptable response func (o *StatusUnpinNotAcceptable) Code() int { return 406 } func (o *StatusUnpinNotAcceptable) Error() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/unpin][%d] statusUnpinNotAcceptable", 406) } func (o *StatusUnpinNotAcceptable) String() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/unpin][%d] statusUnpinNotAcceptable", 406) } func (o *StatusUnpinNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewStatusUnpinInternalServerError creates a StatusUnpinInternalServerError with default headers values func NewStatusUnpinInternalServerError() *StatusUnpinInternalServerError { return &StatusUnpinInternalServerError{} } /* StatusUnpinInternalServerError describes a response with status code 500, with default header values. internal server error */ type StatusUnpinInternalServerError struct { } // IsSuccess returns true when this status unpin internal server error response has a 2xx status code func (o *StatusUnpinInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this status unpin internal server error response has a 3xx status code func (o *StatusUnpinInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this status unpin internal server error response has a 4xx status code func (o *StatusUnpinInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this status unpin internal server error response has a 5xx status code func (o *StatusUnpinInternalServerError) IsServerError() bool { return true } // IsCode returns true when this status unpin internal server error response a status code equal to that given func (o *StatusUnpinInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the status unpin internal server error response func (o *StatusUnpinInternalServerError) Code() int { return 500 } func (o *StatusUnpinInternalServerError) Error() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/unpin][%d] statusUnpinInternalServerError", 500) } func (o *StatusUnpinInternalServerError) String() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/unpin][%d] statusUnpinInternalServerError", 500) } func (o *StatusUnpinInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }