lib/api/auth0/auth0_client/role/post_role_users_responses.go

218 lines
6.0 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package role
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
)
// PostRoleUsersReader is a Reader for the PostRoleUsers structure.
type PostRoleUsersReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostRoleUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPostRoleUsersOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPostRoleUsersUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPostRoleUsersForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPostRoleUsersNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostRoleUsersInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
// NewPostRoleUsersOK creates a PostRoleUsersOK with default headers values
func NewPostRoleUsersOK() *PostRoleUsersOK {
return &PostRoleUsersOK{}
}
/*PostRoleUsersOK handles this case with default header values.
Role users successfully updated
*/
type PostRoleUsersOK struct {
}
func (o *PostRoleUsersOK) Error() string {
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersOK ", 200)
}
func (o *PostRoleUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewPostRoleUsersUnauthorized creates a PostRoleUsersUnauthorized with default headers values
func NewPostRoleUsersUnauthorized() *PostRoleUsersUnauthorized {
return &PostRoleUsersUnauthorized{}
}
/*PostRoleUsersUnauthorized handles this case with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type PostRoleUsersUnauthorized struct {
Payload *auth0_models.Error
}
func (o *PostRoleUsersUnauthorized) Error() string {
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersUnauthorized %+v", 401, o.Payload)
}
func (o *PostRoleUsersUnauthorized) GetPayload() *auth0_models.Error {
return o.Payload
}
func (o *PostRoleUsersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(auth0_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostRoleUsersForbidden creates a PostRoleUsersForbidden with default headers values
func NewPostRoleUsersForbidden() *PostRoleUsersForbidden {
return &PostRoleUsersForbidden{}
}
/*PostRoleUsersForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
type PostRoleUsersForbidden struct {
Payload *auth0_models.Error
}
func (o *PostRoleUsersForbidden) Error() string {
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersForbidden %+v", 403, o.Payload)
}
func (o *PostRoleUsersForbidden) GetPayload() *auth0_models.Error {
return o.Payload
}
func (o *PostRoleUsersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(auth0_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostRoleUsersNotFound creates a PostRoleUsersNotFound with default headers values
func NewPostRoleUsersNotFound() *PostRoleUsersNotFound {
return &PostRoleUsersNotFound{}
}
/*PostRoleUsersNotFound handles this case with default header values.
Resource was not found
*/
type PostRoleUsersNotFound struct {
Payload *auth0_models.Error
}
func (o *PostRoleUsersNotFound) Error() string {
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersNotFound %+v", 404, o.Payload)
}
func (o *PostRoleUsersNotFound) GetPayload() *auth0_models.Error {
return o.Payload
}
func (o *PostRoleUsersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(auth0_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostRoleUsersInternalServerError creates a PostRoleUsersInternalServerError with default headers values
func NewPostRoleUsersInternalServerError() *PostRoleUsersInternalServerError {
return &PostRoleUsersInternalServerError{}
}
/*PostRoleUsersInternalServerError handles this case with default header values.
Server Internal Error
*/
type PostRoleUsersInternalServerError struct {
Payload *auth0_models.Error
}
func (o *PostRoleUsersInternalServerError) Error() string {
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersInternalServerError %+v", 500, o.Payload)
}
func (o *PostRoleUsersInternalServerError) GetPayload() *auth0_models.Error {
return o.Payload
}
func (o *PostRoleUsersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(auth0_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}