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

213 lines
6.3 KiB
Go
Raw Normal View History

2021-01-08 17:40:28 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-01-19 16:58:40 +00:00
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
2021-01-08 17:40:28 +00:00
// 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"
2021-01-10 17:03:26 +00:00
"code.tnxs.net/taxnexus/lib/api/auth0/auth0_models"
2021-01-08 17:40:28 +00:00
)
// 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:
2021-02-09 16:56:57 +00:00
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
2021-01-08 17:40:28 +00:00
}
}
// NewPostRoleUsersOK creates a PostRoleUsersOK with default headers values
func NewPostRoleUsersOK() *PostRoleUsersOK {
return &PostRoleUsersOK{}
}
2021-02-09 16:56:57 +00:00
/* PostRoleUsersOK describes a response with status code 200, with default header values.
2021-01-08 17:40:28 +00:00
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{}
}
2021-02-09 16:56:57 +00:00
/* PostRoleUsersUnauthorized describes a response with status code 401, with default header values.
2021-01-08 17:40:28 +00:00
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{}
}
2021-02-09 16:56:57 +00:00
/* PostRoleUsersForbidden describes a response with status code 403, with default header values.
2021-01-08 17:40:28 +00:00
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{}
}
2021-02-09 16:56:57 +00:00
/* PostRoleUsersNotFound describes a response with status code 404, with default header values.
2021-01-08 17:40:28 +00:00
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{}
}
2021-02-09 16:56:57 +00:00
/* PostRoleUsersInternalServerError describes a response with status code 500, with default header values.
2021-01-08 17:40:28 +00:00
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
}