291 lines
9.4 KiB
Go
291 lines
9.4 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"
|
|
)
|
|
|
|
// UpdateRepoVariableReader is a Reader for the UpdateRepoVariable structure.
|
|
type UpdateRepoVariableReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *UpdateRepoVariableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 201:
|
|
result := NewUpdateRepoVariableCreated()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 204:
|
|
result := NewUpdateRepoVariableNoContent()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewUpdateRepoVariableBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewUpdateRepoVariableNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[PUT /repos/{owner}/{repo}/actions/variables/{variablename}] updateRepoVariable", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewUpdateRepoVariableCreated creates a UpdateRepoVariableCreated with default headers values
|
|
func NewUpdateRepoVariableCreated() *UpdateRepoVariableCreated {
|
|
return &UpdateRepoVariableCreated{}
|
|
}
|
|
|
|
/*
|
|
UpdateRepoVariableCreated describes a response with status code 201, with default header values.
|
|
|
|
response when updating a repo-level variable
|
|
*/
|
|
type UpdateRepoVariableCreated struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this update repo variable created response has a 2xx status code
|
|
func (o *UpdateRepoVariableCreated) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this update repo variable created response has a 3xx status code
|
|
func (o *UpdateRepoVariableCreated) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this update repo variable created response has a 4xx status code
|
|
func (o *UpdateRepoVariableCreated) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this update repo variable created response has a 5xx status code
|
|
func (o *UpdateRepoVariableCreated) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this update repo variable created response a status code equal to that given
|
|
func (o *UpdateRepoVariableCreated) IsCode(code int) bool {
|
|
return code == 201
|
|
}
|
|
|
|
// Code gets the status code for the update repo variable created response
|
|
func (o *UpdateRepoVariableCreated) Code() int {
|
|
return 201
|
|
}
|
|
|
|
func (o *UpdateRepoVariableCreated) Error() string {
|
|
return fmt.Sprintf("[PUT /repos/{owner}/{repo}/actions/variables/{variablename}][%d] updateRepoVariableCreated", 201)
|
|
}
|
|
|
|
func (o *UpdateRepoVariableCreated) String() string {
|
|
return fmt.Sprintf("[PUT /repos/{owner}/{repo}/actions/variables/{variablename}][%d] updateRepoVariableCreated", 201)
|
|
}
|
|
|
|
func (o *UpdateRepoVariableCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewUpdateRepoVariableNoContent creates a UpdateRepoVariableNoContent with default headers values
|
|
func NewUpdateRepoVariableNoContent() *UpdateRepoVariableNoContent {
|
|
return &UpdateRepoVariableNoContent{}
|
|
}
|
|
|
|
/*
|
|
UpdateRepoVariableNoContent describes a response with status code 204, with default header values.
|
|
|
|
response when updating a repo-level variable
|
|
*/
|
|
type UpdateRepoVariableNoContent struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this update repo variable no content response has a 2xx status code
|
|
func (o *UpdateRepoVariableNoContent) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this update repo variable no content response has a 3xx status code
|
|
func (o *UpdateRepoVariableNoContent) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this update repo variable no content response has a 4xx status code
|
|
func (o *UpdateRepoVariableNoContent) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this update repo variable no content response has a 5xx status code
|
|
func (o *UpdateRepoVariableNoContent) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this update repo variable no content response a status code equal to that given
|
|
func (o *UpdateRepoVariableNoContent) IsCode(code int) bool {
|
|
return code == 204
|
|
}
|
|
|
|
// Code gets the status code for the update repo variable no content response
|
|
func (o *UpdateRepoVariableNoContent) Code() int {
|
|
return 204
|
|
}
|
|
|
|
func (o *UpdateRepoVariableNoContent) Error() string {
|
|
return fmt.Sprintf("[PUT /repos/{owner}/{repo}/actions/variables/{variablename}][%d] updateRepoVariableNoContent", 204)
|
|
}
|
|
|
|
func (o *UpdateRepoVariableNoContent) String() string {
|
|
return fmt.Sprintf("[PUT /repos/{owner}/{repo}/actions/variables/{variablename}][%d] updateRepoVariableNoContent", 204)
|
|
}
|
|
|
|
func (o *UpdateRepoVariableNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewUpdateRepoVariableBadRequest creates a UpdateRepoVariableBadRequest with default headers values
|
|
func NewUpdateRepoVariableBadRequest() *UpdateRepoVariableBadRequest {
|
|
return &UpdateRepoVariableBadRequest{}
|
|
}
|
|
|
|
/*
|
|
UpdateRepoVariableBadRequest describes a response with status code 400, with default header values.
|
|
|
|
APIError is error format response
|
|
*/
|
|
type UpdateRepoVariableBadRequest struct {
|
|
Message string
|
|
URL string
|
|
}
|
|
|
|
// IsSuccess returns true when this update repo variable bad request response has a 2xx status code
|
|
func (o *UpdateRepoVariableBadRequest) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this update repo variable bad request response has a 3xx status code
|
|
func (o *UpdateRepoVariableBadRequest) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this update repo variable bad request response has a 4xx status code
|
|
func (o *UpdateRepoVariableBadRequest) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this update repo variable bad request response has a 5xx status code
|
|
func (o *UpdateRepoVariableBadRequest) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this update repo variable bad request response a status code equal to that given
|
|
func (o *UpdateRepoVariableBadRequest) IsCode(code int) bool {
|
|
return code == 400
|
|
}
|
|
|
|
// Code gets the status code for the update repo variable bad request response
|
|
func (o *UpdateRepoVariableBadRequest) Code() int {
|
|
return 400
|
|
}
|
|
|
|
func (o *UpdateRepoVariableBadRequest) Error() string {
|
|
return fmt.Sprintf("[PUT /repos/{owner}/{repo}/actions/variables/{variablename}][%d] updateRepoVariableBadRequest", 400)
|
|
}
|
|
|
|
func (o *UpdateRepoVariableBadRequest) String() string {
|
|
return fmt.Sprintf("[PUT /repos/{owner}/{repo}/actions/variables/{variablename}][%d] updateRepoVariableBadRequest", 400)
|
|
}
|
|
|
|
func (o *UpdateRepoVariableBadRequest) 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
|
|
}
|
|
|
|
// NewUpdateRepoVariableNotFound creates a UpdateRepoVariableNotFound with default headers values
|
|
func NewUpdateRepoVariableNotFound() *UpdateRepoVariableNotFound {
|
|
return &UpdateRepoVariableNotFound{}
|
|
}
|
|
|
|
/*
|
|
UpdateRepoVariableNotFound describes a response with status code 404, with default header values.
|
|
|
|
APINotFound is a not found empty response
|
|
*/
|
|
type UpdateRepoVariableNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this update repo variable not found response has a 2xx status code
|
|
func (o *UpdateRepoVariableNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this update repo variable not found response has a 3xx status code
|
|
func (o *UpdateRepoVariableNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this update repo variable not found response has a 4xx status code
|
|
func (o *UpdateRepoVariableNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this update repo variable not found response has a 5xx status code
|
|
func (o *UpdateRepoVariableNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this update repo variable not found response a status code equal to that given
|
|
func (o *UpdateRepoVariableNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the update repo variable not found response
|
|
func (o *UpdateRepoVariableNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *UpdateRepoVariableNotFound) Error() string {
|
|
return fmt.Sprintf("[PUT /repos/{owner}/{repo}/actions/variables/{variablename}][%d] updateRepoVariableNotFound", 404)
|
|
}
|
|
|
|
func (o *UpdateRepoVariableNotFound) String() string {
|
|
return fmt.Sprintf("[PUT /repos/{owner}/{repo}/actions/variables/{variablename}][%d] updateRepoVariableNotFound", 404)
|
|
}
|
|
|
|
func (o *UpdateRepoVariableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|