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 user
// 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
)
// GetUserRolesReader is a Reader for the GetUserRoles structure.
type GetUserRolesReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * GetUserRolesReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewGetUserRolesOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewGetUserRolesUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewGetUserRolesForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewGetUserRolesNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewGetUserRolesInternalServerError ( )
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
}
}
// NewGetUserRolesOK creates a GetUserRolesOK with default headers values
func NewGetUserRolesOK ( ) * GetUserRolesOK {
return & GetUserRolesOK { }
}
2021-02-09 16:56:57 +00:00
/ * GetUserRolesOK describes a response with status code 200 , with default header values .
2021-01-08 17:40:28 +00:00
Taxnexus Response with User objects
* /
type GetUserRolesOK struct {
Payload * auth0_models . RoleResponse
}
func ( o * GetUserRolesOK ) Error ( ) string {
return fmt . Sprintf ( "[GET /api/v2/users/{userId}/roles][%d] getUserRolesOK %+v" , 200 , o . Payload )
}
func ( o * GetUserRolesOK ) GetPayload ( ) * auth0_models . RoleResponse {
return o . Payload
}
func ( o * GetUserRolesOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( auth0_models . RoleResponse )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetUserRolesUnauthorized creates a GetUserRolesUnauthorized with default headers values
func NewGetUserRolesUnauthorized ( ) * GetUserRolesUnauthorized {
return & GetUserRolesUnauthorized { }
}
2021-02-09 16:56:57 +00:00
/ * GetUserRolesUnauthorized 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 GetUserRolesUnauthorized struct {
Payload * auth0_models . Error
}
func ( o * GetUserRolesUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[GET /api/v2/users/{userId}/roles][%d] getUserRolesUnauthorized %+v" , 401 , o . Payload )
}
func ( o * GetUserRolesUnauthorized ) GetPayload ( ) * auth0_models . Error {
return o . Payload
}
func ( o * GetUserRolesUnauthorized ) 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
}
// NewGetUserRolesForbidden creates a GetUserRolesForbidden with default headers values
func NewGetUserRolesForbidden ( ) * GetUserRolesForbidden {
return & GetUserRolesForbidden { }
}
2021-02-09 16:56:57 +00:00
/ * GetUserRolesForbidden 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 GetUserRolesForbidden struct {
Payload * auth0_models . Error
}
func ( o * GetUserRolesForbidden ) Error ( ) string {
return fmt . Sprintf ( "[GET /api/v2/users/{userId}/roles][%d] getUserRolesForbidden %+v" , 403 , o . Payload )
}
func ( o * GetUserRolesForbidden ) GetPayload ( ) * auth0_models . Error {
return o . Payload
}
func ( o * GetUserRolesForbidden ) 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
}
// NewGetUserRolesNotFound creates a GetUserRolesNotFound with default headers values
func NewGetUserRolesNotFound ( ) * GetUserRolesNotFound {
return & GetUserRolesNotFound { }
}
2021-02-09 16:56:57 +00:00
/ * GetUserRolesNotFound describes a response with status code 404 , with default header values .
2021-01-08 17:40:28 +00:00
Resource was not found
* /
type GetUserRolesNotFound struct {
Payload * auth0_models . Error
}
func ( o * GetUserRolesNotFound ) Error ( ) string {
return fmt . Sprintf ( "[GET /api/v2/users/{userId}/roles][%d] getUserRolesNotFound %+v" , 404 , o . Payload )
}
func ( o * GetUserRolesNotFound ) GetPayload ( ) * auth0_models . Error {
return o . Payload
}
func ( o * GetUserRolesNotFound ) 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
}
// NewGetUserRolesInternalServerError creates a GetUserRolesInternalServerError with default headers values
func NewGetUserRolesInternalServerError ( ) * GetUserRolesInternalServerError {
return & GetUserRolesInternalServerError { }
}
2021-02-09 16:56:57 +00:00
/ * GetUserRolesInternalServerError describes a response with status code 500 , with default header values .
2021-01-08 17:40:28 +00:00
Server Internal Error
* /
type GetUserRolesInternalServerError struct {
Payload * auth0_models . Error
}
func ( o * GetUserRolesInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[GET /api/v2/users/{userId}/roles][%d] getUserRolesInternalServerError %+v" , 500 , o . Payload )
}
func ( o * GetUserRolesInternalServerError ) GetPayload ( ) * auth0_models . Error {
return o . Payload
}
func ( o * GetUserRolesInternalServerError ) 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
}