// 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 portal_clients

import (
	"encoding/json"
	stderrors "errors"
	"fmt"
	"io"

	"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
)

// GetAuthorizedClientScopesReader is a Reader for the GetAuthorizedClientScopes structure.
type GetAuthorizedClientScopesReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetAuthorizedClientScopesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) {
	switch response.Code() {
	case 200:
		result := NewGetAuthorizedClientScopesOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetAuthorizedClientScopesBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewGetAuthorizedClientScopesUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewGetAuthorizedClientScopesForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetAuthorizedClientScopesInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[GET /authorizedclientscopes] getAuthorizedClientScopes", response, response.Code())
	}
}

// NewGetAuthorizedClientScopesOK creates a GetAuthorizedClientScopesOK with default headers values
func NewGetAuthorizedClientScopesOK() *GetAuthorizedClientScopesOK {
	return &GetAuthorizedClientScopesOK{}
}

// GetAuthorizedClientScopesOK describes a response with status code 200, with default header values.
//
// Authorized-client scopes
type GetAuthorizedClientScopesOK struct {
	Payload *members_models.AuthorizedClientScopeResponse
}

// IsSuccess returns true when this get authorized client scopes o k response has a 2xx status code
func (o *GetAuthorizedClientScopesOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this get authorized client scopes o k response has a 3xx status code
func (o *GetAuthorizedClientScopesOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get authorized client scopes o k response has a 4xx status code
func (o *GetAuthorizedClientScopesOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this get authorized client scopes o k response has a 5xx status code
func (o *GetAuthorizedClientScopesOK) IsServerError() bool {
	return false
}

// IsCode returns true when this get authorized client scopes o k response a status code equal to that given
func (o *GetAuthorizedClientScopesOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the get authorized client scopes o k response
func (o *GetAuthorizedClientScopesOK) Code() int {
	return 200
}

func (o *GetAuthorizedClientScopesOK) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /authorizedclientscopes][%d] getAuthorizedClientScopesOK %s", 200, payload)
}

func (o *GetAuthorizedClientScopesOK) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /authorizedclientscopes][%d] getAuthorizedClientScopesOK %s", 200, payload)
}

func (o *GetAuthorizedClientScopesOK) GetPayload() *members_models.AuthorizedClientScopeResponse {
	return o.Payload
}

func (o *GetAuthorizedClientScopesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(members_models.AuthorizedClientScopeResponse)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
		return err
	}

	return nil
}

// NewGetAuthorizedClientScopesBadRequest creates a GetAuthorizedClientScopesBadRequest with default headers values
func NewGetAuthorizedClientScopesBadRequest() *GetAuthorizedClientScopesBadRequest {
	return &GetAuthorizedClientScopesBadRequest{}
}

// GetAuthorizedClientScopesBadRequest describes a response with status code 400, with default header values.
//
// Invalid authorized-client-scope filter
type GetAuthorizedClientScopesBadRequest struct {
}

// IsSuccess returns true when this get authorized client scopes bad request response has a 2xx status code
func (o *GetAuthorizedClientScopesBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get authorized client scopes bad request response has a 3xx status code
func (o *GetAuthorizedClientScopesBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get authorized client scopes bad request response has a 4xx status code
func (o *GetAuthorizedClientScopesBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this get authorized client scopes bad request response has a 5xx status code
func (o *GetAuthorizedClientScopesBadRequest) IsServerError() bool {
	return false
}

// IsCode returns true when this get authorized client scopes bad request response a status code equal to that given
func (o *GetAuthorizedClientScopesBadRequest) IsCode(code int) bool {
	return code == 400
}

// Code gets the status code for the get authorized client scopes bad request response
func (o *GetAuthorizedClientScopesBadRequest) Code() int {
	return 400
}

func (o *GetAuthorizedClientScopesBadRequest) Error() string {
	return fmt.Sprintf("[GET /authorizedclientscopes][%d] getAuthorizedClientScopesBadRequest", 400)
}

func (o *GetAuthorizedClientScopesBadRequest) String() string {
	return fmt.Sprintf("[GET /authorizedclientscopes][%d] getAuthorizedClientScopesBadRequest", 400)
}

func (o *GetAuthorizedClientScopesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	return nil
}

// NewGetAuthorizedClientScopesUnauthorized creates a GetAuthorizedClientScopesUnauthorized with default headers values
func NewGetAuthorizedClientScopesUnauthorized() *GetAuthorizedClientScopesUnauthorized {
	return &GetAuthorizedClientScopesUnauthorized{}
}

// GetAuthorizedClientScopesUnauthorized describes a response with status code 401, with default header values.
//
// Missing or invalid server or session credential
type GetAuthorizedClientScopesUnauthorized struct {
}

// IsSuccess returns true when this get authorized client scopes unauthorized response has a 2xx status code
func (o *GetAuthorizedClientScopesUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get authorized client scopes unauthorized response has a 3xx status code
func (o *GetAuthorizedClientScopesUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get authorized client scopes unauthorized response has a 4xx status code
func (o *GetAuthorizedClientScopesUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this get authorized client scopes unauthorized response has a 5xx status code
func (o *GetAuthorizedClientScopesUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this get authorized client scopes unauthorized response a status code equal to that given
func (o *GetAuthorizedClientScopesUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the get authorized client scopes unauthorized response
func (o *GetAuthorizedClientScopesUnauthorized) Code() int {
	return 401
}

func (o *GetAuthorizedClientScopesUnauthorized) Error() string {
	return fmt.Sprintf("[GET /authorizedclientscopes][%d] getAuthorizedClientScopesUnauthorized", 401)
}

func (o *GetAuthorizedClientScopesUnauthorized) String() string {
	return fmt.Sprintf("[GET /authorizedclientscopes][%d] getAuthorizedClientScopesUnauthorized", 401)
}

func (o *GetAuthorizedClientScopesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	return nil
}

// NewGetAuthorizedClientScopesForbidden creates a GetAuthorizedClientScopesForbidden with default headers values
func NewGetAuthorizedClientScopesForbidden() *GetAuthorizedClientScopesForbidden {
	return &GetAuthorizedClientScopesForbidden{}
}

// GetAuthorizedClientScopesForbidden describes a response with status code 403, with default header values.
//
// Actor is not authorized for the client tenant or user scope
type GetAuthorizedClientScopesForbidden struct {
}

// IsSuccess returns true when this get authorized client scopes forbidden response has a 2xx status code
func (o *GetAuthorizedClientScopesForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get authorized client scopes forbidden response has a 3xx status code
func (o *GetAuthorizedClientScopesForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get authorized client scopes forbidden response has a 4xx status code
func (o *GetAuthorizedClientScopesForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this get authorized client scopes forbidden response has a 5xx status code
func (o *GetAuthorizedClientScopesForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this get authorized client scopes forbidden response a status code equal to that given
func (o *GetAuthorizedClientScopesForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the get authorized client scopes forbidden response
func (o *GetAuthorizedClientScopesForbidden) Code() int {
	return 403
}

func (o *GetAuthorizedClientScopesForbidden) Error() string {
	return fmt.Sprintf("[GET /authorizedclientscopes][%d] getAuthorizedClientScopesForbidden", 403)
}

func (o *GetAuthorizedClientScopesForbidden) String() string {
	return fmt.Sprintf("[GET /authorizedclientscopes][%d] getAuthorizedClientScopesForbidden", 403)
}

func (o *GetAuthorizedClientScopesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	return nil
}

// NewGetAuthorizedClientScopesInternalServerError creates a GetAuthorizedClientScopesInternalServerError with default headers values
func NewGetAuthorizedClientScopesInternalServerError() *GetAuthorizedClientScopesInternalServerError {
	return &GetAuthorizedClientScopesInternalServerError{}
}

// GetAuthorizedClientScopesInternalServerError describes a response with status code 500, with default header values.
//
// Server error
type GetAuthorizedClientScopesInternalServerError struct {
}

// IsSuccess returns true when this get authorized client scopes internal server error response has a 2xx status code
func (o *GetAuthorizedClientScopesInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get authorized client scopes internal server error response has a 3xx status code
func (o *GetAuthorizedClientScopesInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get authorized client scopes internal server error response has a 4xx status code
func (o *GetAuthorizedClientScopesInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this get authorized client scopes internal server error response has a 5xx status code
func (o *GetAuthorizedClientScopesInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this get authorized client scopes internal server error response a status code equal to that given
func (o *GetAuthorizedClientScopesInternalServerError) IsCode(code int) bool {
	return code == 500
}

// Code gets the status code for the get authorized client scopes internal server error response
func (o *GetAuthorizedClientScopesInternalServerError) Code() int {
	return 500
}

func (o *GetAuthorizedClientScopesInternalServerError) Error() string {
	return fmt.Sprintf("[GET /authorizedclientscopes][%d] getAuthorizedClientScopesInternalServerError", 500)
}

func (o *GetAuthorizedClientScopesInternalServerError) String() string {
	return fmt.Sprintf("[GET /authorizedclientscopes][%d] getAuthorizedClientScopesInternalServerError", 500)
}

func (o *GetAuthorizedClientScopesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	return nil
}
