// Code generated by go-swagger; DO NOT EDIT. package team // 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" "github.com/decentral1se/go-kimai/models" ) // PostAPITeamsIDCustomersCustomerIDReader is a Reader for the PostAPITeamsIDCustomersCustomerID structure. type PostAPITeamsIDCustomersCustomerIDReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *PostAPITeamsIDCustomersCustomerIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewPostAPITeamsIDCustomersCustomerIDOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil 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()) } } // NewPostAPITeamsIDCustomersCustomerIDOK creates a PostAPITeamsIDCustomersCustomerIDOK with default headers values func NewPostAPITeamsIDCustomersCustomerIDOK() *PostAPITeamsIDCustomersCustomerIDOK { return &PostAPITeamsIDCustomersCustomerIDOK{} } /* PostAPITeamsIDCustomersCustomerIDOK describes a response with status code 200, with default header values. Adds a new customer to a team. */ type PostAPITeamsIDCustomersCustomerIDOK struct { Payload *models.Team } // IsSuccess returns true when this post Api teams Id customers customer Id o k response has a 2xx status code func (o *PostAPITeamsIDCustomersCustomerIDOK) IsSuccess() bool { return true } // IsRedirect returns true when this post Api teams Id customers customer Id o k response has a 3xx status code func (o *PostAPITeamsIDCustomersCustomerIDOK) IsRedirect() bool { return false } // IsClientError returns true when this post Api teams Id customers customer Id o k response has a 4xx status code func (o *PostAPITeamsIDCustomersCustomerIDOK) IsClientError() bool { return false } // IsServerError returns true when this post Api teams Id customers customer Id o k response has a 5xx status code func (o *PostAPITeamsIDCustomersCustomerIDOK) IsServerError() bool { return false } // IsCode returns true when this post Api teams Id customers customer Id o k response a status code equal to that given func (o *PostAPITeamsIDCustomersCustomerIDOK) IsCode(code int) bool { return code == 200 } func (o *PostAPITeamsIDCustomersCustomerIDOK) Error() string { return fmt.Sprintf("[POST /api/teams/{id}/customers/{customerId}][%d] postApiTeamsIdCustomersCustomerIdOK %+v", 200, o.Payload) } func (o *PostAPITeamsIDCustomersCustomerIDOK) String() string { return fmt.Sprintf("[POST /api/teams/{id}/customers/{customerId}][%d] postApiTeamsIdCustomersCustomerIdOK %+v", 200, o.Payload) } func (o *PostAPITeamsIDCustomersCustomerIDOK) GetPayload() *models.Team { return o.Payload } func (o *PostAPITeamsIDCustomersCustomerIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Team) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil }