229 lines
6.8 KiB
Go
229 lines
6.8 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package issue
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/strfmt"
|
|
)
|
|
|
|
// MoveIssuePinReader is a Reader for the MoveIssuePin structure.
|
|
type MoveIssuePinReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *MoveIssuePinReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 204:
|
|
result := NewMoveIssuePinNoContent()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 403:
|
|
result := NewMoveIssuePinForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewMoveIssuePinNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[PATCH /repos/{owner}/{repo}/issues/{index}/pin/{position}] moveIssuePin", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewMoveIssuePinNoContent creates a MoveIssuePinNoContent with default headers values
|
|
func NewMoveIssuePinNoContent() *MoveIssuePinNoContent {
|
|
return &MoveIssuePinNoContent{}
|
|
}
|
|
|
|
/*
|
|
MoveIssuePinNoContent describes a response with status code 204, with default header values.
|
|
|
|
APIEmpty is an empty response
|
|
*/
|
|
type MoveIssuePinNoContent struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this move issue pin no content response has a 2xx status code
|
|
func (o *MoveIssuePinNoContent) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this move issue pin no content response has a 3xx status code
|
|
func (o *MoveIssuePinNoContent) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this move issue pin no content response has a 4xx status code
|
|
func (o *MoveIssuePinNoContent) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this move issue pin no content response has a 5xx status code
|
|
func (o *MoveIssuePinNoContent) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this move issue pin no content response a status code equal to that given
|
|
func (o *MoveIssuePinNoContent) IsCode(code int) bool {
|
|
return code == 204
|
|
}
|
|
|
|
// Code gets the status code for the move issue pin no content response
|
|
func (o *MoveIssuePinNoContent) Code() int {
|
|
return 204
|
|
}
|
|
|
|
func (o *MoveIssuePinNoContent) Error() string {
|
|
return fmt.Sprintf("[PATCH /repos/{owner}/{repo}/issues/{index}/pin/{position}][%d] moveIssuePinNoContent", 204)
|
|
}
|
|
|
|
func (o *MoveIssuePinNoContent) String() string {
|
|
return fmt.Sprintf("[PATCH /repos/{owner}/{repo}/issues/{index}/pin/{position}][%d] moveIssuePinNoContent", 204)
|
|
}
|
|
|
|
func (o *MoveIssuePinNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewMoveIssuePinForbidden creates a MoveIssuePinForbidden with default headers values
|
|
func NewMoveIssuePinForbidden() *MoveIssuePinForbidden {
|
|
return &MoveIssuePinForbidden{}
|
|
}
|
|
|
|
/*
|
|
MoveIssuePinForbidden describes a response with status code 403, with default header values.
|
|
|
|
APIForbiddenError is a forbidden error response
|
|
*/
|
|
type MoveIssuePinForbidden struct {
|
|
Message string
|
|
URL string
|
|
}
|
|
|
|
// IsSuccess returns true when this move issue pin forbidden response has a 2xx status code
|
|
func (o *MoveIssuePinForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this move issue pin forbidden response has a 3xx status code
|
|
func (o *MoveIssuePinForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this move issue pin forbidden response has a 4xx status code
|
|
func (o *MoveIssuePinForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this move issue pin forbidden response has a 5xx status code
|
|
func (o *MoveIssuePinForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this move issue pin forbidden response a status code equal to that given
|
|
func (o *MoveIssuePinForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the move issue pin forbidden response
|
|
func (o *MoveIssuePinForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *MoveIssuePinForbidden) Error() string {
|
|
return fmt.Sprintf("[PATCH /repos/{owner}/{repo}/issues/{index}/pin/{position}][%d] moveIssuePinForbidden", 403)
|
|
}
|
|
|
|
func (o *MoveIssuePinForbidden) String() string {
|
|
return fmt.Sprintf("[PATCH /repos/{owner}/{repo}/issues/{index}/pin/{position}][%d] moveIssuePinForbidden", 403)
|
|
}
|
|
|
|
func (o *MoveIssuePinForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header message
|
|
hdrMessage := response.GetHeader("message")
|
|
|
|
if hdrMessage != "" {
|
|
o.Message = hdrMessage
|
|
}
|
|
|
|
// hydrates response header url
|
|
hdrURL := response.GetHeader("url")
|
|
|
|
if hdrURL != "" {
|
|
o.URL = hdrURL
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewMoveIssuePinNotFound creates a MoveIssuePinNotFound with default headers values
|
|
func NewMoveIssuePinNotFound() *MoveIssuePinNotFound {
|
|
return &MoveIssuePinNotFound{}
|
|
}
|
|
|
|
/*
|
|
MoveIssuePinNotFound describes a response with status code 404, with default header values.
|
|
|
|
APINotFound is a not found empty response
|
|
*/
|
|
type MoveIssuePinNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this move issue pin not found response has a 2xx status code
|
|
func (o *MoveIssuePinNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this move issue pin not found response has a 3xx status code
|
|
func (o *MoveIssuePinNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this move issue pin not found response has a 4xx status code
|
|
func (o *MoveIssuePinNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this move issue pin not found response has a 5xx status code
|
|
func (o *MoveIssuePinNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this move issue pin not found response a status code equal to that given
|
|
func (o *MoveIssuePinNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the move issue pin not found response
|
|
func (o *MoveIssuePinNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *MoveIssuePinNotFound) Error() string {
|
|
return fmt.Sprintf("[PATCH /repos/{owner}/{repo}/issues/{index}/pin/{position}][%d] moveIssuePinNotFound", 404)
|
|
}
|
|
|
|
func (o *MoveIssuePinNotFound) String() string {
|
|
return fmt.Sprintf("[PATCH /repos/{owner}/{repo}/issues/{index}/pin/{position}][%d] moveIssuePinNotFound", 404)
|
|
}
|
|
|
|
func (o *MoveIssuePinNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|