// 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"
)

// PutAuthorizedClientScopesReader is a Reader for the PutAuthorizedClientScopes structure.
type PutAuthorizedClientScopesReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PutAuthorizedClientScopesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) {
	switch response.Code() {
	case 200:
		result := NewPutAuthorizedClientScopesOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPutAuthorizedClientScopesBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPutAuthorizedClientScopesUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPutAuthorizedClientScopesForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPutAuthorizedClientScopesInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[PUT /authorizedclientscopes] putAuthorizedClientScopes", response, response.Code())
	}
}

// NewPutAuthorizedClientScopesOK creates a PutAuthorizedClientScopesOK with default headers values
func NewPutAuthorizedClientScopesOK() *PutAuthorizedClientScopesOK {
	return &PutAuthorizedClientScopesOK{}
}

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

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

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

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

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

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

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

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

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

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

func (o *PutAuthorizedClientScopesOK) 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
}

// NewPutAuthorizedClientScopesBadRequest creates a PutAuthorizedClientScopesBadRequest with default headers values
func NewPutAuthorizedClientScopesBadRequest() *PutAuthorizedClientScopesBadRequest {
	return &PutAuthorizedClientScopesBadRequest{}
}

// PutAuthorizedClientScopesBadRequest describes a response with status code 400, with default header values.
//
// Scope is not backed by an effective service entitlement
type PutAuthorizedClientScopesBadRequest struct {
}

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

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

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

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

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

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

func (o *PutAuthorizedClientScopesBadRequest) Error() string {
	return fmt.Sprintf("[PUT /authorizedclientscopes][%d] putAuthorizedClientScopesBadRequest", 400)
}

func (o *PutAuthorizedClientScopesBadRequest) String() string {
	return fmt.Sprintf("[PUT /authorizedclientscopes][%d] putAuthorizedClientScopesBadRequest", 400)
}

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

	return nil
}

// NewPutAuthorizedClientScopesUnauthorized creates a PutAuthorizedClientScopesUnauthorized with default headers values
func NewPutAuthorizedClientScopesUnauthorized() *PutAuthorizedClientScopesUnauthorized {
	return &PutAuthorizedClientScopesUnauthorized{}
}

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

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

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

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

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

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

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

func (o *PutAuthorizedClientScopesUnauthorized) Error() string {
	return fmt.Sprintf("[PUT /authorizedclientscopes][%d] putAuthorizedClientScopesUnauthorized", 401)
}

func (o *PutAuthorizedClientScopesUnauthorized) String() string {
	return fmt.Sprintf("[PUT /authorizedclientscopes][%d] putAuthorizedClientScopesUnauthorized", 401)
}

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

	return nil
}

// NewPutAuthorizedClientScopesForbidden creates a PutAuthorizedClientScopesForbidden with default headers values
func NewPutAuthorizedClientScopesForbidden() *PutAuthorizedClientScopesForbidden {
	return &PutAuthorizedClientScopesForbidden{}
}

// PutAuthorizedClientScopesForbidden describes a response with status code 403, with default header values.
//
// Actor cannot manage scopes for the client
type PutAuthorizedClientScopesForbidden struct {
}

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

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

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

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

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

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

func (o *PutAuthorizedClientScopesForbidden) Error() string {
	return fmt.Sprintf("[PUT /authorizedclientscopes][%d] putAuthorizedClientScopesForbidden", 403)
}

func (o *PutAuthorizedClientScopesForbidden) String() string {
	return fmt.Sprintf("[PUT /authorizedclientscopes][%d] putAuthorizedClientScopesForbidden", 403)
}

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

	return nil
}

// NewPutAuthorizedClientScopesInternalServerError creates a PutAuthorizedClientScopesInternalServerError with default headers values
func NewPutAuthorizedClientScopesInternalServerError() *PutAuthorizedClientScopesInternalServerError {
	return &PutAuthorizedClientScopesInternalServerError{}
}

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

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

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

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

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

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

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

func (o *PutAuthorizedClientScopesInternalServerError) Error() string {
	return fmt.Sprintf("[PUT /authorizedclientscopes][%d] putAuthorizedClientScopesInternalServerError", 500)
}

func (o *PutAuthorizedClientScopesInternalServerError) String() string {
	return fmt.Sprintf("[PUT /authorizedclientscopes][%d] putAuthorizedClientScopesInternalServerError", 500)
}

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

	return nil
}
