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

// OrgAddTeamMemberReader is a Reader for the OrgAddTeamMember structure.
type OrgAddTeamMemberReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *OrgAddTeamMemberReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewOrgAddTeamMemberNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewOrgAddTeamMemberForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewOrgAddTeamMemberNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[PUT /teams/{id}/members/{username}] orgAddTeamMember", response, response.Code())
	}
}

// NewOrgAddTeamMemberNoContent creates a OrgAddTeamMemberNoContent with default headers values
func NewOrgAddTeamMemberNoContent() *OrgAddTeamMemberNoContent {
	return &OrgAddTeamMemberNoContent{}
}

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

APIEmpty is an empty response
*/
type OrgAddTeamMemberNoContent struct {
}

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

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

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

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

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

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

func (o *OrgAddTeamMemberNoContent) Error() string {
	return fmt.Sprintf("[PUT /teams/{id}/members/{username}][%d] orgAddTeamMemberNoContent", 204)
}

func (o *OrgAddTeamMemberNoContent) String() string {
	return fmt.Sprintf("[PUT /teams/{id}/members/{username}][%d] orgAddTeamMemberNoContent", 204)
}

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

	return nil
}

// NewOrgAddTeamMemberForbidden creates a OrgAddTeamMemberForbidden with default headers values
func NewOrgAddTeamMemberForbidden() *OrgAddTeamMemberForbidden {
	return &OrgAddTeamMemberForbidden{}
}

/*
OrgAddTeamMemberForbidden describes a response with status code 403, with default header values.

APIForbiddenError is a forbidden error response
*/
type OrgAddTeamMemberForbidden struct {
	Message string
	URL     string
}

// IsSuccess returns true when this org add team member forbidden response has a 2xx status code
func (o *OrgAddTeamMemberForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this org add team member forbidden response has a 3xx status code
func (o *OrgAddTeamMemberForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this org add team member forbidden response has a 4xx status code
func (o *OrgAddTeamMemberForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this org add team member forbidden response has a 5xx status code
func (o *OrgAddTeamMemberForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this org add team member forbidden response a status code equal to that given
func (o *OrgAddTeamMemberForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the org add team member forbidden response
func (o *OrgAddTeamMemberForbidden) Code() int {
	return 403
}

func (o *OrgAddTeamMemberForbidden) Error() string {
	return fmt.Sprintf("[PUT /teams/{id}/members/{username}][%d] orgAddTeamMemberForbidden", 403)
}

func (o *OrgAddTeamMemberForbidden) String() string {
	return fmt.Sprintf("[PUT /teams/{id}/members/{username}][%d] orgAddTeamMemberForbidden", 403)
}

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

	// hydrates response header message
	hdrMessage := response.GetHeader("message")

	if hdrMessage != "" {
		o.Message = hdrMessage
	}

	// hydrates response header url
	hdrURL := response.GetHeader("url")

	if hdrURL != "" {
		o.URL = hdrURL
	}

	return nil
}

// NewOrgAddTeamMemberNotFound creates a OrgAddTeamMemberNotFound with default headers values
func NewOrgAddTeamMemberNotFound() *OrgAddTeamMemberNotFound {
	return &OrgAddTeamMemberNotFound{}
}

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

APINotFound is a not found empty response
*/
type OrgAddTeamMemberNotFound struct {
}

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

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

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

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

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

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

func (o *OrgAddTeamMemberNotFound) Error() string {
	return fmt.Sprintf("[PUT /teams/{id}/members/{username}][%d] orgAddTeamMemberNotFound", 404)
}

func (o *OrgAddTeamMemberNotFound) String() string {
	return fmt.Sprintf("[PUT /teams/{id}/members/{username}][%d] orgAddTeamMemberNotFound", 404)
}

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

	return nil
}
