zrok/rest_client_zrok/service/update_share_responses.go
2022-12-02 13:21:05 -05:00

255 lines
7.6 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package service
// 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"
)
// UpdateShareReader is a Reader for the UpdateShare structure.
type UpdateShareReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *UpdateShareReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewUpdateShareOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewUpdateShareUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewUpdateShareNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewUpdateShareInternalServerError()
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())
}
}
// NewUpdateShareOK creates a UpdateShareOK with default headers values
func NewUpdateShareOK() *UpdateShareOK {
return &UpdateShareOK{}
}
/*
UpdateShareOK describes a response with status code 200, with default header values.
service updated
*/
type UpdateShareOK struct {
}
// IsSuccess returns true when this update share o k response has a 2xx status code
func (o *UpdateShareOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this update share o k response has a 3xx status code
func (o *UpdateShareOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this update share o k response has a 4xx status code
func (o *UpdateShareOK) IsClientError() bool {
return false
}
// IsServerError returns true when this update share o k response has a 5xx status code
func (o *UpdateShareOK) IsServerError() bool {
return false
}
// IsCode returns true when this update share o k response a status code equal to that given
func (o *UpdateShareOK) IsCode(code int) bool {
return code == 200
}
func (o *UpdateShareOK) Error() string {
return fmt.Sprintf("[PATCH /share][%d] updateShareOK ", 200)
}
func (o *UpdateShareOK) String() string {
return fmt.Sprintf("[PATCH /share][%d] updateShareOK ", 200)
}
func (o *UpdateShareOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewUpdateShareUnauthorized creates a UpdateShareUnauthorized with default headers values
func NewUpdateShareUnauthorized() *UpdateShareUnauthorized {
return &UpdateShareUnauthorized{}
}
/*
UpdateShareUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type UpdateShareUnauthorized struct {
}
// IsSuccess returns true when this update share unauthorized response has a 2xx status code
func (o *UpdateShareUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update share unauthorized response has a 3xx status code
func (o *UpdateShareUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this update share unauthorized response has a 4xx status code
func (o *UpdateShareUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this update share unauthorized response has a 5xx status code
func (o *UpdateShareUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this update share unauthorized response a status code equal to that given
func (o *UpdateShareUnauthorized) IsCode(code int) bool {
return code == 401
}
func (o *UpdateShareUnauthorized) Error() string {
return fmt.Sprintf("[PATCH /share][%d] updateShareUnauthorized ", 401)
}
func (o *UpdateShareUnauthorized) String() string {
return fmt.Sprintf("[PATCH /share][%d] updateShareUnauthorized ", 401)
}
func (o *UpdateShareUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewUpdateShareNotFound creates a UpdateShareNotFound with default headers values
func NewUpdateShareNotFound() *UpdateShareNotFound {
return &UpdateShareNotFound{}
}
/*
UpdateShareNotFound describes a response with status code 404, with default header values.
not found
*/
type UpdateShareNotFound struct {
}
// IsSuccess returns true when this update share not found response has a 2xx status code
func (o *UpdateShareNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update share not found response has a 3xx status code
func (o *UpdateShareNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this update share not found response has a 4xx status code
func (o *UpdateShareNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this update share not found response has a 5xx status code
func (o *UpdateShareNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this update share not found response a status code equal to that given
func (o *UpdateShareNotFound) IsCode(code int) bool {
return code == 404
}
func (o *UpdateShareNotFound) Error() string {
return fmt.Sprintf("[PATCH /share][%d] updateShareNotFound ", 404)
}
func (o *UpdateShareNotFound) String() string {
return fmt.Sprintf("[PATCH /share][%d] updateShareNotFound ", 404)
}
func (o *UpdateShareNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewUpdateShareInternalServerError creates a UpdateShareInternalServerError with default headers values
func NewUpdateShareInternalServerError() *UpdateShareInternalServerError {
return &UpdateShareInternalServerError{}
}
/*
UpdateShareInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type UpdateShareInternalServerError struct {
}
// IsSuccess returns true when this update share internal server error response has a 2xx status code
func (o *UpdateShareInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update share internal server error response has a 3xx status code
func (o *UpdateShareInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this update share internal server error response has a 4xx status code
func (o *UpdateShareInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this update share internal server error response has a 5xx status code
func (o *UpdateShareInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this update share internal server error response a status code equal to that given
func (o *UpdateShareInternalServerError) IsCode(code int) bool {
return code == 500
}
func (o *UpdateShareInternalServerError) Error() string {
return fmt.Sprintf("[PATCH /share][%d] updateShareInternalServerError ", 500)
}
func (o *UpdateShareInternalServerError) String() string {
return fmt.Sprintf("[PATCH /share][%d] updateShareInternalServerError ", 500)
}
func (o *UpdateShareInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}