// Code generated by go-swagger; DO NOT EDIT. // (c) 2012-2023 by Vernon Keenan // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed package research_projects // 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" "code.tnxs.net/work/lib/api/members/members_models" ) // PutResearchProjectDocumentsReader is a Reader for the PutResearchProjectDocuments structure. type PutResearchProjectDocumentsReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *PutResearchProjectDocumentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewPutResearchProjectDocumentsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 401: result := NewPutResearchProjectDocumentsUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewPutResearchProjectDocumentsForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewPutResearchProjectDocumentsNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 422: result := NewPutResearchProjectDocumentsUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewPutResearchProjectDocumentsInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result 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()) } } // NewPutResearchProjectDocumentsOK creates a PutResearchProjectDocumentsOK with default headers values func NewPutResearchProjectDocumentsOK() *PutResearchProjectDocumentsOK { return &PutResearchProjectDocumentsOK{} } /* PutResearchProjectDocumentsOK describes a response with status code 200, with default header values. ResearchProjectDocument Response Object */ type PutResearchProjectDocumentsOK struct { Payload *members_models.ResearchProjectDocumentResponse } // IsSuccess returns true when this put research project documents o k response has a 2xx status code func (o *PutResearchProjectDocumentsOK) IsSuccess() bool { return true } // IsRedirect returns true when this put research project documents o k response has a 3xx status code func (o *PutResearchProjectDocumentsOK) IsRedirect() bool { return false } // IsClientError returns true when this put research project documents o k response has a 4xx status code func (o *PutResearchProjectDocumentsOK) IsClientError() bool { return false } // IsServerError returns true when this put research project documents o k response has a 5xx status code func (o *PutResearchProjectDocumentsOK) IsServerError() bool { return false } // IsCode returns true when this put research project documents o k response a status code equal to that given func (o *PutResearchProjectDocumentsOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the put research project documents o k response func (o *PutResearchProjectDocumentsOK) Code() int { return 200 } func (o *PutResearchProjectDocumentsOK) Error() string { return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsOK %+v", 200, o.Payload) } func (o *PutResearchProjectDocumentsOK) String() string { return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsOK %+v", 200, o.Payload) } func (o *PutResearchProjectDocumentsOK) GetPayload() *members_models.ResearchProjectDocumentResponse { return o.Payload } func (o *PutResearchProjectDocumentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(members_models.ResearchProjectDocumentResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewPutResearchProjectDocumentsUnauthorized creates a PutResearchProjectDocumentsUnauthorized with default headers values func NewPutResearchProjectDocumentsUnauthorized() *PutResearchProjectDocumentsUnauthorized { return &PutResearchProjectDocumentsUnauthorized{} } /* PutResearchProjectDocumentsUnauthorized describes a response with status code 401, with default header values. Access Unauthorized, invalid API-KEY was used */ type PutResearchProjectDocumentsUnauthorized struct { Payload *members_models.Error } // IsSuccess returns true when this put research project documents unauthorized response has a 2xx status code func (o *PutResearchProjectDocumentsUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this put research project documents unauthorized response has a 3xx status code func (o *PutResearchProjectDocumentsUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this put research project documents unauthorized response has a 4xx status code func (o *PutResearchProjectDocumentsUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this put research project documents unauthorized response has a 5xx status code func (o *PutResearchProjectDocumentsUnauthorized) IsServerError() bool { return false } // IsCode returns true when this put research project documents unauthorized response a status code equal to that given func (o *PutResearchProjectDocumentsUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the put research project documents unauthorized response func (o *PutResearchProjectDocumentsUnauthorized) Code() int { return 401 } func (o *PutResearchProjectDocumentsUnauthorized) Error() string { return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsUnauthorized %+v", 401, o.Payload) } func (o *PutResearchProjectDocumentsUnauthorized) String() string { return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsUnauthorized %+v", 401, o.Payload) } func (o *PutResearchProjectDocumentsUnauthorized) GetPayload() *members_models.Error { return o.Payload } func (o *PutResearchProjectDocumentsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(members_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewPutResearchProjectDocumentsForbidden creates a PutResearchProjectDocumentsForbidden with default headers values func NewPutResearchProjectDocumentsForbidden() *PutResearchProjectDocumentsForbidden { return &PutResearchProjectDocumentsForbidden{} } /* PutResearchProjectDocumentsForbidden describes a response with status code 403, with default header values. Access forbidden, account lacks access */ type PutResearchProjectDocumentsForbidden struct { AccessControlAllowOrigin string Payload *members_models.Error } // IsSuccess returns true when this put research project documents forbidden response has a 2xx status code func (o *PutResearchProjectDocumentsForbidden) IsSuccess() bool { return false } // IsRedirect returns true when this put research project documents forbidden response has a 3xx status code func (o *PutResearchProjectDocumentsForbidden) IsRedirect() bool { return false } // IsClientError returns true when this put research project documents forbidden response has a 4xx status code func (o *PutResearchProjectDocumentsForbidden) IsClientError() bool { return true } // IsServerError returns true when this put research project documents forbidden response has a 5xx status code func (o *PutResearchProjectDocumentsForbidden) IsServerError() bool { return false } // IsCode returns true when this put research project documents forbidden response a status code equal to that given func (o *PutResearchProjectDocumentsForbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the put research project documents forbidden response func (o *PutResearchProjectDocumentsForbidden) Code() int { return 403 } func (o *PutResearchProjectDocumentsForbidden) Error() string { return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsForbidden %+v", 403, o.Payload) } func (o *PutResearchProjectDocumentsForbidden) String() string { return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsForbidden %+v", 403, o.Payload) } func (o *PutResearchProjectDocumentsForbidden) GetPayload() *members_models.Error { return o.Payload } func (o *PutResearchProjectDocumentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Access-Control-Allow-Origin hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") if hdrAccessControlAllowOrigin != "" { o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin } o.Payload = new(members_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewPutResearchProjectDocumentsNotFound creates a PutResearchProjectDocumentsNotFound with default headers values func NewPutResearchProjectDocumentsNotFound() *PutResearchProjectDocumentsNotFound { return &PutResearchProjectDocumentsNotFound{} } /* PutResearchProjectDocumentsNotFound describes a response with status code 404, with default header values. Resource was not found */ type PutResearchProjectDocumentsNotFound struct { Payload *members_models.Error } // IsSuccess returns true when this put research project documents not found response has a 2xx status code func (o *PutResearchProjectDocumentsNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this put research project documents not found response has a 3xx status code func (o *PutResearchProjectDocumentsNotFound) IsRedirect() bool { return false } // IsClientError returns true when this put research project documents not found response has a 4xx status code func (o *PutResearchProjectDocumentsNotFound) IsClientError() bool { return true } // IsServerError returns true when this put research project documents not found response has a 5xx status code func (o *PutResearchProjectDocumentsNotFound) IsServerError() bool { return false } // IsCode returns true when this put research project documents not found response a status code equal to that given func (o *PutResearchProjectDocumentsNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the put research project documents not found response func (o *PutResearchProjectDocumentsNotFound) Code() int { return 404 } func (o *PutResearchProjectDocumentsNotFound) Error() string { return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsNotFound %+v", 404, o.Payload) } func (o *PutResearchProjectDocumentsNotFound) String() string { return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsNotFound %+v", 404, o.Payload) } func (o *PutResearchProjectDocumentsNotFound) GetPayload() *members_models.Error { return o.Payload } func (o *PutResearchProjectDocumentsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(members_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewPutResearchProjectDocumentsUnprocessableEntity creates a PutResearchProjectDocumentsUnprocessableEntity with default headers values func NewPutResearchProjectDocumentsUnprocessableEntity() *PutResearchProjectDocumentsUnprocessableEntity { return &PutResearchProjectDocumentsUnprocessableEntity{} } /* PutResearchProjectDocumentsUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity, likely a bad parameter */ type PutResearchProjectDocumentsUnprocessableEntity struct { Payload *members_models.Error } // IsSuccess returns true when this put research project documents unprocessable entity response has a 2xx status code func (o *PutResearchProjectDocumentsUnprocessableEntity) IsSuccess() bool { return false } // IsRedirect returns true when this put research project documents unprocessable entity response has a 3xx status code func (o *PutResearchProjectDocumentsUnprocessableEntity) IsRedirect() bool { return false } // IsClientError returns true when this put research project documents unprocessable entity response has a 4xx status code func (o *PutResearchProjectDocumentsUnprocessableEntity) IsClientError() bool { return true } // IsServerError returns true when this put research project documents unprocessable entity response has a 5xx status code func (o *PutResearchProjectDocumentsUnprocessableEntity) IsServerError() bool { return false } // IsCode returns true when this put research project documents unprocessable entity response a status code equal to that given func (o *PutResearchProjectDocumentsUnprocessableEntity) IsCode(code int) bool { return code == 422 } // Code gets the status code for the put research project documents unprocessable entity response func (o *PutResearchProjectDocumentsUnprocessableEntity) Code() int { return 422 } func (o *PutResearchProjectDocumentsUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsUnprocessableEntity %+v", 422, o.Payload) } func (o *PutResearchProjectDocumentsUnprocessableEntity) String() string { return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsUnprocessableEntity %+v", 422, o.Payload) } func (o *PutResearchProjectDocumentsUnprocessableEntity) GetPayload() *members_models.Error { return o.Payload } func (o *PutResearchProjectDocumentsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(members_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewPutResearchProjectDocumentsInternalServerError creates a PutResearchProjectDocumentsInternalServerError with default headers values func NewPutResearchProjectDocumentsInternalServerError() *PutResearchProjectDocumentsInternalServerError { return &PutResearchProjectDocumentsInternalServerError{} } /* PutResearchProjectDocumentsInternalServerError describes a response with status code 500, with default header values. Server Internal Error */ type PutResearchProjectDocumentsInternalServerError struct { Payload *members_models.Error } // IsSuccess returns true when this put research project documents internal server error response has a 2xx status code func (o *PutResearchProjectDocumentsInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this put research project documents internal server error response has a 3xx status code func (o *PutResearchProjectDocumentsInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this put research project documents internal server error response has a 4xx status code func (o *PutResearchProjectDocumentsInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this put research project documents internal server error response has a 5xx status code func (o *PutResearchProjectDocumentsInternalServerError) IsServerError() bool { return true } // IsCode returns true when this put research project documents internal server error response a status code equal to that given func (o *PutResearchProjectDocumentsInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the put research project documents internal server error response func (o *PutResearchProjectDocumentsInternalServerError) Code() int { return 500 } func (o *PutResearchProjectDocumentsInternalServerError) Error() string { return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsInternalServerError %+v", 500, o.Payload) } func (o *PutResearchProjectDocumentsInternalServerError) String() string { return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsInternalServerError %+v", 500, o.Payload) } func (o *PutResearchProjectDocumentsInternalServerError) GetPayload() *members_models.Error { return o.Payload } func (o *PutResearchProjectDocumentsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(members_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil }