// 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("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } // NewPostRoleUsersOK creates a PostRoleUsersOK with default headers values func NewPostRoleUsersOK() *PostRoleUsersOK { return &PostRoleUsersOK{} } /* PostRoleUsersOK describes a response with status code 200, with default header values. Role users successfully updated */ type PostRoleUsersOK struct { } // IsSuccess returns true when this post role users o k response has a 2xx status code func (o *PostRoleUsersOK) IsSuccess() bool { return true } // IsRedirect returns true when this post role users o k response has a 3xx status code func (o *PostRoleUsersOK) IsRedirect() bool { return false } // IsClientError returns true when this post role users o k response has a 4xx status code func (o *PostRoleUsersOK) IsClientError() bool { return false } // IsServerError returns true when this post role users o k response has a 5xx status code func (o *PostRoleUsersOK) IsServerError() bool { return false } // IsCode returns true when this post role users o k response a status code equal to that given func (o *PostRoleUsersOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the post role users o k response func (o *PostRoleUsersOK) Code() int { return 200 } func (o *PostRoleUsersOK) Error() string { return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersOK ", 200) } func (o *PostRoleUsersOK) String() 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 describes a response with status code 401, with default header values. Access Unauthorized, invalid API-KEY was used */ type PostRoleUsersUnauthorized struct { Payload *auth0_models.Error } // IsSuccess returns true when this post role users unauthorized response has a 2xx status code func (o *PostRoleUsersUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this post role users unauthorized response has a 3xx status code func (o *PostRoleUsersUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this post role users unauthorized response has a 4xx status code func (o *PostRoleUsersUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this post role users unauthorized response has a 5xx status code func (o *PostRoleUsersUnauthorized) IsServerError() bool { return false } // IsCode returns true when this post role users unauthorized response a status code equal to that given func (o *PostRoleUsersUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the post role users unauthorized response func (o *PostRoleUsersUnauthorized) Code() int { return 401 } func (o *PostRoleUsersUnauthorized) Error() string { return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersUnauthorized %+v", 401, o.Payload) } func (o *PostRoleUsersUnauthorized) String() 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 describes a response with status code 403, with default header values. Access forbidden, account lacks access */ type PostRoleUsersForbidden struct { Payload *auth0_models.Error } // IsSuccess returns true when this post role users forbidden response has a 2xx status code func (o *PostRoleUsersForbidden) IsSuccess() bool { return false } // IsRedirect returns true when this post role users forbidden response has a 3xx status code func (o *PostRoleUsersForbidden) IsRedirect() bool { return false } // IsClientError returns true when this post role users forbidden response has a 4xx status code func (o *PostRoleUsersForbidden) IsClientError() bool { return true } // IsServerError returns true when this post role users forbidden response has a 5xx status code func (o *PostRoleUsersForbidden) IsServerError() bool { return false } // IsCode returns true when this post role users forbidden response a status code equal to that given func (o *PostRoleUsersForbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the post role users forbidden response func (o *PostRoleUsersForbidden) Code() int { return 403 } func (o *PostRoleUsersForbidden) Error() string { return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersForbidden %+v", 403, o.Payload) } func (o *PostRoleUsersForbidden) String() 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 describes a response with status code 404, with default header values. Resource was not found */ type PostRoleUsersNotFound struct { Payload *auth0_models.Error } // IsSuccess returns true when this post role users not found response has a 2xx status code func (o *PostRoleUsersNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this post role users not found response has a 3xx status code func (o *PostRoleUsersNotFound) IsRedirect() bool { return false } // IsClientError returns true when this post role users not found response has a 4xx status code func (o *PostRoleUsersNotFound) IsClientError() bool { return true } // IsServerError returns true when this post role users not found response has a 5xx status code func (o *PostRoleUsersNotFound) IsServerError() bool { return false } // IsCode returns true when this post role users not found response a status code equal to that given func (o *PostRoleUsersNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the post role users not found response func (o *PostRoleUsersNotFound) Code() int { return 404 } func (o *PostRoleUsersNotFound) Error() string { return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersNotFound %+v", 404, o.Payload) } func (o *PostRoleUsersNotFound) String() 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 describes a response with status code 500, with default header values. Server Internal Error */ type PostRoleUsersInternalServerError struct { Payload *auth0_models.Error } // IsSuccess returns true when this post role users internal server error response has a 2xx status code func (o *PostRoleUsersInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this post role users internal server error response has a 3xx status code func (o *PostRoleUsersInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this post role users internal server error response has a 4xx status code func (o *PostRoleUsersInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this post role users internal server error response has a 5xx status code func (o *PostRoleUsersInternalServerError) IsServerError() bool { return true } // IsCode returns true when this post role users internal server error response a status code equal to that given func (o *PostRoleUsersInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the post role users internal server error response func (o *PostRoleUsersInternalServerError) Code() int { return 500 } func (o *PostRoleUsersInternalServerError) Error() string { return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersInternalServerError %+v", 500, o.Payload) } func (o *PostRoleUsersInternalServerError) String() 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 }