// Code generated by go-swagger; DO NOT EDIT.

package organization

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"fmt"

	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
)

// OrgIsMemberReader is a Reader for the OrgIsMember structure.
type OrgIsMemberReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *OrgIsMemberReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewOrgIsMemberNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 303:
		result := NewOrgIsMemberSeeOther()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewOrgIsMemberNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[GET /orgs/{org}/members/{username}] orgIsMember", response, response.Code())
	}
}

// NewOrgIsMemberNoContent creates a OrgIsMemberNoContent with default headers values
func NewOrgIsMemberNoContent() *OrgIsMemberNoContent {
	return &OrgIsMemberNoContent{}
}

/*
OrgIsMemberNoContent describes a response with status code 204, with default header values.

user is a member
*/
type OrgIsMemberNoContent struct {
}

// IsSuccess returns true when this org is member no content response has a 2xx status code
func (o *OrgIsMemberNoContent) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this org is member no content response has a 3xx status code
func (o *OrgIsMemberNoContent) IsRedirect() bool {
	return false
}

// IsClientError returns true when this org is member no content response has a 4xx status code
func (o *OrgIsMemberNoContent) IsClientError() bool {
	return false
}

// IsServerError returns true when this org is member no content response has a 5xx status code
func (o *OrgIsMemberNoContent) IsServerError() bool {
	return false
}

// IsCode returns true when this org is member no content response a status code equal to that given
func (o *OrgIsMemberNoContent) IsCode(code int) bool {
	return code == 204
}

// Code gets the status code for the org is member no content response
func (o *OrgIsMemberNoContent) Code() int {
	return 204
}

func (o *OrgIsMemberNoContent) Error() string {
	return fmt.Sprintf("[GET /orgs/{org}/members/{username}][%d] orgIsMemberNoContent", 204)
}

func (o *OrgIsMemberNoContent) String() string {
	return fmt.Sprintf("[GET /orgs/{org}/members/{username}][%d] orgIsMemberNoContent", 204)
}

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

	return nil
}

// NewOrgIsMemberSeeOther creates a OrgIsMemberSeeOther with default headers values
func NewOrgIsMemberSeeOther() *OrgIsMemberSeeOther {
	return &OrgIsMemberSeeOther{}
}

/*
OrgIsMemberSeeOther describes a response with status code 303, with default header values.

redirection to /orgs/{org}/public_members/{username}
*/
type OrgIsMemberSeeOther struct {
}

// IsSuccess returns true when this org is member see other response has a 2xx status code
func (o *OrgIsMemberSeeOther) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this org is member see other response has a 3xx status code
func (o *OrgIsMemberSeeOther) IsRedirect() bool {
	return true
}

// IsClientError returns true when this org is member see other response has a 4xx status code
func (o *OrgIsMemberSeeOther) IsClientError() bool {
	return false
}

// IsServerError returns true when this org is member see other response has a 5xx status code
func (o *OrgIsMemberSeeOther) IsServerError() bool {
	return false
}

// IsCode returns true when this org is member see other response a status code equal to that given
func (o *OrgIsMemberSeeOther) IsCode(code int) bool {
	return code == 303
}

// Code gets the status code for the org is member see other response
func (o *OrgIsMemberSeeOther) Code() int {
	return 303
}

func (o *OrgIsMemberSeeOther) Error() string {
	return fmt.Sprintf("[GET /orgs/{org}/members/{username}][%d] orgIsMemberSeeOther", 303)
}

func (o *OrgIsMemberSeeOther) String() string {
	return fmt.Sprintf("[GET /orgs/{org}/members/{username}][%d] orgIsMemberSeeOther", 303)
}

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

	return nil
}

// NewOrgIsMemberNotFound creates a OrgIsMemberNotFound with default headers values
func NewOrgIsMemberNotFound() *OrgIsMemberNotFound {
	return &OrgIsMemberNotFound{}
}

/*
OrgIsMemberNotFound describes a response with status code 404, with default header values.

user is not a member
*/
type OrgIsMemberNotFound struct {
}

// IsSuccess returns true when this org is member not found response has a 2xx status code
func (o *OrgIsMemberNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this org is member not found response has a 3xx status code
func (o *OrgIsMemberNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this org is member not found response has a 4xx status code
func (o *OrgIsMemberNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this org is member not found response has a 5xx status code
func (o *OrgIsMemberNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this org is member not found response a status code equal to that given
func (o *OrgIsMemberNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the org is member not found response
func (o *OrgIsMemberNotFound) Code() int {
	return 404
}

func (o *OrgIsMemberNotFound) Error() string {
	return fmt.Sprintf("[GET /orgs/{org}/members/{username}][%d] orgIsMemberNotFound", 404)
}

func (o *OrgIsMemberNotFound) String() string {
	return fmt.Sprintf("[GET /orgs/{org}/members/{username}][%d] orgIsMemberNotFound", 404)
}

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

	return nil
}
