229 lines
7.8 KiB
Go
229 lines
7.8 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package repository
|
|
|
|
// 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"
|
|
)
|
|
|
|
// RepoCheckCollaboratorReader is a Reader for the RepoCheckCollaborator structure.
|
|
type RepoCheckCollaboratorReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *RepoCheckCollaboratorReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 204:
|
|
result := NewRepoCheckCollaboratorNoContent()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 404:
|
|
result := NewRepoCheckCollaboratorNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewRepoCheckCollaboratorUnprocessableEntity()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewRepoCheckCollaboratorNoContent creates a RepoCheckCollaboratorNoContent with default headers values
|
|
func NewRepoCheckCollaboratorNoContent() *RepoCheckCollaboratorNoContent {
|
|
return &RepoCheckCollaboratorNoContent{}
|
|
}
|
|
|
|
/*
|
|
RepoCheckCollaboratorNoContent describes a response with status code 204, with default header values.
|
|
|
|
APIEmpty is an empty response
|
|
*/
|
|
type RepoCheckCollaboratorNoContent struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this repo check collaborator no content response has a 2xx status code
|
|
func (o *RepoCheckCollaboratorNoContent) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this repo check collaborator no content response has a 3xx status code
|
|
func (o *RepoCheckCollaboratorNoContent) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this repo check collaborator no content response has a 4xx status code
|
|
func (o *RepoCheckCollaboratorNoContent) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this repo check collaborator no content response has a 5xx status code
|
|
func (o *RepoCheckCollaboratorNoContent) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this repo check collaborator no content response a status code equal to that given
|
|
func (o *RepoCheckCollaboratorNoContent) IsCode(code int) bool {
|
|
return code == 204
|
|
}
|
|
|
|
// Code gets the status code for the repo check collaborator no content response
|
|
func (o *RepoCheckCollaboratorNoContent) Code() int {
|
|
return 204
|
|
}
|
|
|
|
func (o *RepoCheckCollaboratorNoContent) Error() string {
|
|
return fmt.Sprintf("[GET /repos/{owner}/{repo}/collaborators/{collaborator}][%d] repoCheckCollaboratorNoContent ", 204)
|
|
}
|
|
|
|
func (o *RepoCheckCollaboratorNoContent) String() string {
|
|
return fmt.Sprintf("[GET /repos/{owner}/{repo}/collaborators/{collaborator}][%d] repoCheckCollaboratorNoContent ", 204)
|
|
}
|
|
|
|
func (o *RepoCheckCollaboratorNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewRepoCheckCollaboratorNotFound creates a RepoCheckCollaboratorNotFound with default headers values
|
|
func NewRepoCheckCollaboratorNotFound() *RepoCheckCollaboratorNotFound {
|
|
return &RepoCheckCollaboratorNotFound{}
|
|
}
|
|
|
|
/*
|
|
RepoCheckCollaboratorNotFound describes a response with status code 404, with default header values.
|
|
|
|
APINotFound is a not found empty response
|
|
*/
|
|
type RepoCheckCollaboratorNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this repo check collaborator not found response has a 2xx status code
|
|
func (o *RepoCheckCollaboratorNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this repo check collaborator not found response has a 3xx status code
|
|
func (o *RepoCheckCollaboratorNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this repo check collaborator not found response has a 4xx status code
|
|
func (o *RepoCheckCollaboratorNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this repo check collaborator not found response has a 5xx status code
|
|
func (o *RepoCheckCollaboratorNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this repo check collaborator not found response a status code equal to that given
|
|
func (o *RepoCheckCollaboratorNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the repo check collaborator not found response
|
|
func (o *RepoCheckCollaboratorNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *RepoCheckCollaboratorNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /repos/{owner}/{repo}/collaborators/{collaborator}][%d] repoCheckCollaboratorNotFound ", 404)
|
|
}
|
|
|
|
func (o *RepoCheckCollaboratorNotFound) String() string {
|
|
return fmt.Sprintf("[GET /repos/{owner}/{repo}/collaborators/{collaborator}][%d] repoCheckCollaboratorNotFound ", 404)
|
|
}
|
|
|
|
func (o *RepoCheckCollaboratorNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewRepoCheckCollaboratorUnprocessableEntity creates a RepoCheckCollaboratorUnprocessableEntity with default headers values
|
|
func NewRepoCheckCollaboratorUnprocessableEntity() *RepoCheckCollaboratorUnprocessableEntity {
|
|
return &RepoCheckCollaboratorUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
RepoCheckCollaboratorUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
APIValidationError is error format response related to input validation
|
|
*/
|
|
type RepoCheckCollaboratorUnprocessableEntity struct {
|
|
Message string
|
|
URL string
|
|
}
|
|
|
|
// IsSuccess returns true when this repo check collaborator unprocessable entity response has a 2xx status code
|
|
func (o *RepoCheckCollaboratorUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this repo check collaborator unprocessable entity response has a 3xx status code
|
|
func (o *RepoCheckCollaboratorUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this repo check collaborator unprocessable entity response has a 4xx status code
|
|
func (o *RepoCheckCollaboratorUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this repo check collaborator unprocessable entity response has a 5xx status code
|
|
func (o *RepoCheckCollaboratorUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this repo check collaborator unprocessable entity response a status code equal to that given
|
|
func (o *RepoCheckCollaboratorUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the repo check collaborator unprocessable entity response
|
|
func (o *RepoCheckCollaboratorUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *RepoCheckCollaboratorUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[GET /repos/{owner}/{repo}/collaborators/{collaborator}][%d] repoCheckCollaboratorUnprocessableEntity ", 422)
|
|
}
|
|
|
|
func (o *RepoCheckCollaboratorUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[GET /repos/{owner}/{repo}/collaborators/{collaborator}][%d] repoCheckCollaboratorUnprocessableEntity ", 422)
|
|
}
|
|
|
|
func (o *RepoCheckCollaboratorUnprocessableEntity) 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
|
|
}
|