151 lines
4.6 KiB
Go
151 lines
4.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"
|
|
)
|
|
|
|
// RepoDeleteHookReader is a Reader for the RepoDeleteHook structure.
|
|
type RepoDeleteHookReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *RepoDeleteHookReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 204:
|
|
result := NewRepoDeleteHookNoContent()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 404:
|
|
result := NewRepoDeleteHookNotFound()
|
|
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}/hooks/{id}] repoDeleteHook", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewRepoDeleteHookNoContent creates a RepoDeleteHookNoContent with default headers values
|
|
func NewRepoDeleteHookNoContent() *RepoDeleteHookNoContent {
|
|
return &RepoDeleteHookNoContent{}
|
|
}
|
|
|
|
/*
|
|
RepoDeleteHookNoContent describes a response with status code 204, with default header values.
|
|
|
|
APIEmpty is an empty response
|
|
*/
|
|
type RepoDeleteHookNoContent struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this repo delete hook no content response has a 2xx status code
|
|
func (o *RepoDeleteHookNoContent) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this repo delete hook no content response has a 3xx status code
|
|
func (o *RepoDeleteHookNoContent) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this repo delete hook no content response has a 4xx status code
|
|
func (o *RepoDeleteHookNoContent) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this repo delete hook no content response has a 5xx status code
|
|
func (o *RepoDeleteHookNoContent) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this repo delete hook no content response a status code equal to that given
|
|
func (o *RepoDeleteHookNoContent) IsCode(code int) bool {
|
|
return code == 204
|
|
}
|
|
|
|
// Code gets the status code for the repo delete hook no content response
|
|
func (o *RepoDeleteHookNoContent) Code() int {
|
|
return 204
|
|
}
|
|
|
|
func (o *RepoDeleteHookNoContent) Error() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/hooks/{id}][%d] repoDeleteHookNoContent", 204)
|
|
}
|
|
|
|
func (o *RepoDeleteHookNoContent) String() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/hooks/{id}][%d] repoDeleteHookNoContent", 204)
|
|
}
|
|
|
|
func (o *RepoDeleteHookNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewRepoDeleteHookNotFound creates a RepoDeleteHookNotFound with default headers values
|
|
func NewRepoDeleteHookNotFound() *RepoDeleteHookNotFound {
|
|
return &RepoDeleteHookNotFound{}
|
|
}
|
|
|
|
/*
|
|
RepoDeleteHookNotFound describes a response with status code 404, with default header values.
|
|
|
|
APINotFound is a not found empty response
|
|
*/
|
|
type RepoDeleteHookNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this repo delete hook not found response has a 2xx status code
|
|
func (o *RepoDeleteHookNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this repo delete hook not found response has a 3xx status code
|
|
func (o *RepoDeleteHookNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this repo delete hook not found response has a 4xx status code
|
|
func (o *RepoDeleteHookNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this repo delete hook not found response has a 5xx status code
|
|
func (o *RepoDeleteHookNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this repo delete hook not found response a status code equal to that given
|
|
func (o *RepoDeleteHookNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the repo delete hook not found response
|
|
func (o *RepoDeleteHookNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *RepoDeleteHookNotFound) Error() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/hooks/{id}][%d] repoDeleteHookNotFound", 404)
|
|
}
|
|
|
|
func (o *RepoDeleteHookNotFound) String() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/hooks/{id}][%d] repoDeleteHookNotFound", 404)
|
|
}
|
|
|
|
func (o *RepoDeleteHookNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|