307 lines
9.6 KiB
Go
307 lines
9.6 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"
|
|
)
|
|
|
|
// RepoDeleteTeamReader is a Reader for the RepoDeleteTeam structure.
|
|
type RepoDeleteTeamReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *RepoDeleteTeamReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 204:
|
|
result := NewRepoDeleteTeamNoContent()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 404:
|
|
result := NewRepoDeleteTeamNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 405:
|
|
result := NewRepoDeleteTeamMethodNotAllowed()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewRepoDeleteTeamUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[DELETE /repos/{owner}/{repo}/teams/{team}] repoDeleteTeam", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewRepoDeleteTeamNoContent creates a RepoDeleteTeamNoContent with default headers values
|
|
func NewRepoDeleteTeamNoContent() *RepoDeleteTeamNoContent {
|
|
return &RepoDeleteTeamNoContent{}
|
|
}
|
|
|
|
/*
|
|
RepoDeleteTeamNoContent describes a response with status code 204, with default header values.
|
|
|
|
APIEmpty is an empty response
|
|
*/
|
|
type RepoDeleteTeamNoContent struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this repo delete team no content response has a 2xx status code
|
|
func (o *RepoDeleteTeamNoContent) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this repo delete team no content response has a 3xx status code
|
|
func (o *RepoDeleteTeamNoContent) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this repo delete team no content response has a 4xx status code
|
|
func (o *RepoDeleteTeamNoContent) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this repo delete team no content response has a 5xx status code
|
|
func (o *RepoDeleteTeamNoContent) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this repo delete team no content response a status code equal to that given
|
|
func (o *RepoDeleteTeamNoContent) IsCode(code int) bool {
|
|
return code == 204
|
|
}
|
|
|
|
// Code gets the status code for the repo delete team no content response
|
|
func (o *RepoDeleteTeamNoContent) Code() int {
|
|
return 204
|
|
}
|
|
|
|
func (o *RepoDeleteTeamNoContent) Error() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/teams/{team}][%d] repoDeleteTeamNoContent", 204)
|
|
}
|
|
|
|
func (o *RepoDeleteTeamNoContent) String() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/teams/{team}][%d] repoDeleteTeamNoContent", 204)
|
|
}
|
|
|
|
func (o *RepoDeleteTeamNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewRepoDeleteTeamNotFound creates a RepoDeleteTeamNotFound with default headers values
|
|
func NewRepoDeleteTeamNotFound() *RepoDeleteTeamNotFound {
|
|
return &RepoDeleteTeamNotFound{}
|
|
}
|
|
|
|
/*
|
|
RepoDeleteTeamNotFound describes a response with status code 404, with default header values.
|
|
|
|
APINotFound is a not found empty response
|
|
*/
|
|
type RepoDeleteTeamNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this repo delete team not found response has a 2xx status code
|
|
func (o *RepoDeleteTeamNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this repo delete team not found response has a 3xx status code
|
|
func (o *RepoDeleteTeamNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this repo delete team not found response has a 4xx status code
|
|
func (o *RepoDeleteTeamNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this repo delete team not found response has a 5xx status code
|
|
func (o *RepoDeleteTeamNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this repo delete team not found response a status code equal to that given
|
|
func (o *RepoDeleteTeamNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the repo delete team not found response
|
|
func (o *RepoDeleteTeamNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *RepoDeleteTeamNotFound) Error() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/teams/{team}][%d] repoDeleteTeamNotFound", 404)
|
|
}
|
|
|
|
func (o *RepoDeleteTeamNotFound) String() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/teams/{team}][%d] repoDeleteTeamNotFound", 404)
|
|
}
|
|
|
|
func (o *RepoDeleteTeamNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewRepoDeleteTeamMethodNotAllowed creates a RepoDeleteTeamMethodNotAllowed with default headers values
|
|
func NewRepoDeleteTeamMethodNotAllowed() *RepoDeleteTeamMethodNotAllowed {
|
|
return &RepoDeleteTeamMethodNotAllowed{}
|
|
}
|
|
|
|
/*
|
|
RepoDeleteTeamMethodNotAllowed describes a response with status code 405, with default header values.
|
|
|
|
APIError is error format response
|
|
*/
|
|
type RepoDeleteTeamMethodNotAllowed struct {
|
|
Message string
|
|
URL string
|
|
}
|
|
|
|
// IsSuccess returns true when this repo delete team method not allowed response has a 2xx status code
|
|
func (o *RepoDeleteTeamMethodNotAllowed) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this repo delete team method not allowed response has a 3xx status code
|
|
func (o *RepoDeleteTeamMethodNotAllowed) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this repo delete team method not allowed response has a 4xx status code
|
|
func (o *RepoDeleteTeamMethodNotAllowed) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this repo delete team method not allowed response has a 5xx status code
|
|
func (o *RepoDeleteTeamMethodNotAllowed) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this repo delete team method not allowed response a status code equal to that given
|
|
func (o *RepoDeleteTeamMethodNotAllowed) IsCode(code int) bool {
|
|
return code == 405
|
|
}
|
|
|
|
// Code gets the status code for the repo delete team method not allowed response
|
|
func (o *RepoDeleteTeamMethodNotAllowed) Code() int {
|
|
return 405
|
|
}
|
|
|
|
func (o *RepoDeleteTeamMethodNotAllowed) Error() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/teams/{team}][%d] repoDeleteTeamMethodNotAllowed", 405)
|
|
}
|
|
|
|
func (o *RepoDeleteTeamMethodNotAllowed) String() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/teams/{team}][%d] repoDeleteTeamMethodNotAllowed", 405)
|
|
}
|
|
|
|
func (o *RepoDeleteTeamMethodNotAllowed) 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
|
|
}
|
|
|
|
// NewRepoDeleteTeamUnprocessableEntity creates a RepoDeleteTeamUnprocessableEntity with default headers values
|
|
func NewRepoDeleteTeamUnprocessableEntity() *RepoDeleteTeamUnprocessableEntity {
|
|
return &RepoDeleteTeamUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
RepoDeleteTeamUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
APIValidationError is error format response related to input validation
|
|
*/
|
|
type RepoDeleteTeamUnprocessableEntity struct {
|
|
Message string
|
|
URL string
|
|
}
|
|
|
|
// IsSuccess returns true when this repo delete team unprocessable entity response has a 2xx status code
|
|
func (o *RepoDeleteTeamUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this repo delete team unprocessable entity response has a 3xx status code
|
|
func (o *RepoDeleteTeamUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this repo delete team unprocessable entity response has a 4xx status code
|
|
func (o *RepoDeleteTeamUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this repo delete team unprocessable entity response has a 5xx status code
|
|
func (o *RepoDeleteTeamUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this repo delete team unprocessable entity response a status code equal to that given
|
|
func (o *RepoDeleteTeamUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the repo delete team unprocessable entity response
|
|
func (o *RepoDeleteTeamUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *RepoDeleteTeamUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/teams/{team}][%d] repoDeleteTeamUnprocessableEntity", 422)
|
|
}
|
|
|
|
func (o *RepoDeleteTeamUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/teams/{team}][%d] repoDeleteTeamUnprocessableEntity", 422)
|
|
}
|
|
|
|
func (o *RepoDeleteTeamUnprocessableEntity) 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
|
|
}
|