/**
 * NOTE: This class is auto generated by the swagger code generator program (3.0.18).
 * https://github.com/swagger-api/swagger-codegen
 * Do not edit the class manually.
 */
package io.swagger.api.core;

import io.swagger.model.BrAPIResponse;
import io.swagger.model.Model202AcceptedSearchResponse;
import io.swagger.model.core.TrialListResponse;
import io.swagger.model.core.TrialNewRequest;
import io.swagger.model.core.TrialSearchRequest;
import io.swagger.model.core.TrialSingleResponse;
import io.swagger.annotations.*;

import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import jakarta.validation.Valid;
import java.util.List;

@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
@Api(value = "trials", description = "the trials API")
public interface TrialsApi {

	@ApiOperation(value = "Get a filtered list of Trials", nickname = "trialsGet", notes = "Retrieve a filtered list of breeding Trials. A Trial is a collection of Studies", response = TrialListResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Trials", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TrialListResponse.class),
			@ApiResponse(code = 400, message = "Bad Request", response = String.class),
			@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
			@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
	@RequestMapping(value = "/trials", produces = { "application/json" }, method = RequestMethod.GET)
	ResponseEntity<TrialListResponse> trialsGet(
			@ApiParam(value = "active") @Valid @RequestParam(value = "active", required = false) Boolean active,
			@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
			@ApiParam(value = "contactDbId") @Valid @RequestParam(value = "contactDbId", required = false) String contactDbId,
			@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
			@ApiParam(value = "locationDbId") @Valid @RequestParam(value = "locationDbId", required = false) String locationDbId,
			@ApiParam(value = "searchDateRangeStart") @Valid @RequestParam(value = "searchDateRangeStart", required = false) String searchDateRangeStart,
			@ApiParam(value = "searchDateRangeEnd") @Valid @RequestParam(value = "searchDateRangeEnd", required = false) String searchDateRangeEnd,
			@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
			@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
			@ApiParam(value = "trialName") @Valid @RequestParam(value = "trialName", required = false) String trialName,
			@ApiParam(value = "trialPUI") @Valid @RequestParam(value = "trialPUI", required = false) String trialPUI,
			@ApiParam(value = "sortBy") @Valid @RequestParam(value = "sortBy", required = false) String sortBy,
			@ApiParam(value = "sortOrder") @Valid @RequestParam(value = "sortOrder", required = false) String sortOrder,
			@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
			@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
			@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
			@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
			@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
			@ApiParam(value = "HTTP HEADER - Token used for Authorization   <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
			throws BrAPIServerException;

	@ApiOperation(value = "Create new trials", nickname = "trialsPost", notes = "Create new breeding Trials. A Trial represents a collection of related Studies. `trialDbId` is generated by the server.", response = TrialListResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Trials", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TrialListResponse.class),
			@ApiResponse(code = 400, message = "Bad Request", response = String.class),
			@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
			@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
	@RequestMapping(value = "/trials", produces = { "application/json" }, consumes = {
			"application/json" }, method = RequestMethod.POST)
	ResponseEntity<TrialListResponse> trialsPost(@ApiParam(value = "") @Valid @RequestBody List<TrialNewRequest> body,
			@ApiParam(value = "HTTP HEADER - Token used for Authorization   <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
			throws BrAPIServerException;

	@ApiOperation(value = "Get the details of a specific Trial", nickname = "trialsTrialDbIdGet", notes = "Get the details of a specific Trial", response = TrialSingleResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Trials", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TrialSingleResponse.class),
			@ApiResponse(code = 400, message = "Bad Request", response = String.class),
			@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
			@ApiResponse(code = 403, message = "Forbidden", response = String.class),
			@ApiResponse(code = 404, message = "Not Found", response = String.class) })
	@RequestMapping(value = "/trials/{trialDbId}", produces = { "application/json" }, method = RequestMethod.GET)
	ResponseEntity<TrialSingleResponse> trialsTrialDbIdGet(
			@ApiParam(value = "The internal trialDbId", required = true) @PathVariable("trialDbId") String trialDbId,
			@ApiParam(value = "HTTP HEADER - Token used for Authorization   <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
			throws BrAPIServerException;

	@ApiOperation(value = "Update the details of an existing Trial", nickname = "trialsTrialDbIdPut", notes = "Update the details of an existing Trial", response = TrialSingleResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Trials", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TrialSingleResponse.class),
			@ApiResponse(code = 400, message = "Bad Request", response = String.class),
			@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
			@ApiResponse(code = 403, message = "Forbidden", response = String.class),
			@ApiResponse(code = 404, message = "Not Found", response = String.class) })
	@RequestMapping(value = "/trials/{trialDbId}", produces = { "application/json" }, consumes = {
			"application/json" }, method = RequestMethod.PUT)
	ResponseEntity<TrialSingleResponse> trialsTrialDbIdPut(
			@ApiParam(value = "The internal trialDbId", required = true) @PathVariable("trialDbId") String trialDbId,
			@ApiParam(value = "") @Valid @RequestBody TrialNewRequest body,
			@ApiParam(value = "HTTP HEADER - Token used for Authorization   <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
			throws BrAPIServerException;

	@ApiOperation(value = "Submit a search request for Trials", nickname = "searchTrialsPost", notes = "Advanced searching for the programs resource. See Search Services for additional implementation details.", response = TrialListResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Trials", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TrialListResponse.class),
			@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
			@ApiResponse(code = 400, message = "Bad Request", response = String.class),
			@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
			@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
	@RequestMapping(value = "/search/trials", produces = { "application/json" }, consumes = {
			"application/json" }, method = RequestMethod.POST)
	ResponseEntity<? extends BrAPIResponse> searchTrialsPost(
			@ApiParam(value = "") @Valid @RequestBody TrialSearchRequest body,
			@ApiParam(value = "HTTP HEADER - Token used for Authorization   <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
			throws BrAPIServerException;

	@ApiOperation(value = "Get the results of a Trials search request", nickname = "searchTrialsSearchResultsDbIdGet", notes = "Advanced searching for the trials resource. See Search Services for additional implementation details.", response = TrialListResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Trials", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TrialListResponse.class),
			@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
			@ApiResponse(code = 400, message = "Bad Request", response = String.class),
			@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
			@ApiResponse(code = 403, message = "Forbidden", response = String.class),
			@ApiResponse(code = 404, message = "Not Found", response = String.class) })
	@RequestMapping(value = "/search/trials/{searchResultsDbId}", produces = {
			"application/json" }, method = RequestMethod.GET)
	ResponseEntity<? extends BrAPIResponse> searchTrialsSearchResultsDbIdGet(
			@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
			@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
			@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
			@ApiParam(value = "HTTP HEADER - Token used for Authorization   <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
			throws BrAPIServerException;

}
