/**
 * 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.pheno;

import io.swagger.model.BrAPIResponse;
import io.swagger.model.Model202AcceptedSearchResponse;
import io.swagger.model.pheno.ObservationVariableListResponse;
import io.swagger.model.pheno.ObservationVariableNewRequest;
import io.swagger.model.pheno.ObservationVariableSearchRequest;
import io.swagger.model.pheno.ObservationVariableSingleResponse;
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:32:22.556Z[GMT]")
@Api(value = "variables", description = "the variables API")
public interface VariablesApi {

	@ApiOperation(value = "Get the Observation Variables", nickname = "variablesGet", notes = "Call to retrieve a list of observationVariables available in the system.", response = ObservationVariableListResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Observation Variables", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationVariableListResponse.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 = "/variables", produces = { "application/json" }, method = RequestMethod.GET)
	ResponseEntity<ObservationVariableListResponse> variablesGet(
			@ApiParam(value = "observationVariableDbId") @Valid @RequestParam(value = "observationVariableDbId", required = false) String observationVariableDbId,
			@ApiParam(value = "observationVariableName") @Valid @RequestParam(value = "observationVariableName", required = false) String observationVariableName,
			@ApiParam(value = "observationVariablePUI") @Valid @RequestParam(value = "observationVariablePUI", required = false) String observationVariablePUI,
			@ApiParam(value = "methodDbId") @Valid @RequestParam(value = "methodDbId", required = false) String methodDbId,
			@ApiParam(value = "methodName") @Valid @RequestParam(value = "methodName", required = false) String methodName,
			@ApiParam(value = "methodPUI") @Valid @RequestParam(value = "methodPUI", required = false) String methodPUI,
			@ApiParam(value = "scaleDbId") @Valid @RequestParam(value = "scaleDbId", required = false) String scaleDbId,
			@ApiParam(value = "scaleName") @Valid @RequestParam(value = "scaleName", required = false) String scaleName,
			@ApiParam(value = "scalePUI") @Valid @RequestParam(value = "scalePUI", required = false) String scalePUI,
			@ApiParam(value = "traitDbId") @Valid @RequestParam(value = "traitDbId", required = false) String traitDbId,
			@ApiParam(value = "traitName") @Valid @RequestParam(value = "traitName", required = false) String traitName,
			@ApiParam(value = "traitPUI") @Valid @RequestParam(value = "traitPUI", required = false) String traitPUI,
			@ApiParam(value = "traitClass") @Valid @RequestParam(value = "traitClass", required = false) String traitClass,
			@ApiParam(value = "ontologyDbId") @Valid @RequestParam(value = "ontologyDbId", required = false) String ontologyDbId,
			@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
			@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
			@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
			@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
			@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 = "Get the details for a specific Observation Variable", nickname = "variablesObservationVariableDbIdGet", notes = "Retrieve variable details", response = ObservationVariableSingleResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Observation Variables", })
	@ApiResponses(value = {
			@ApiResponse(code = 200, message = "OK", response = ObservationVariableSingleResponse.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 = "/variables/{observationVariableDbId}", produces = {
			"application/json" }, method = RequestMethod.GET)
	ResponseEntity<ObservationVariableSingleResponse> variablesObservationVariableDbIdGet(
			@ApiParam(value = "string id of the variable", required = true) @PathVariable("observationVariableDbId") String observationVariableDbId,
			@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 an existing Observation Variable", nickname = "variablesObservationVariableDbIdPut", notes = "Update an existing Observation Variable", response = ObservationVariableSingleResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Observation Variables", })
	@ApiResponses(value = {
			@ApiResponse(code = 200, message = "OK", response = ObservationVariableSingleResponse.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 = "/variables/{observationVariableDbId}", produces = {
			"application/json" }, method = RequestMethod.PUT)
	ResponseEntity<ObservationVariableSingleResponse> variablesObservationVariableDbIdPut(
			@Valid @RequestBody ObservationVariableNewRequest body,
			@ApiParam(value = "string id of the variable", required = true) @PathVariable("observationVariableDbId") String observationVariableDbId,
			@ApiParam(value = "HTTP HEADER - Token used for Authorization   <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;

	@ApiOperation(value = "Add new Observation Variables", nickname = "variablesPost", notes = "Add new Observation Variables to the system.", response = ObservationVariableListResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Observation Variables", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationVariableListResponse.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 = "/variables", produces = { "application/json" }, consumes = {
			"application/json" }, method = RequestMethod.POST)
	ResponseEntity<ObservationVariableListResponse> variablesPost(
			@ApiParam(value = "") @Valid @RequestBody List<ObservationVariableNewRequest> 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 Observation Variables", nickname = "searchVariablesPost", notes = "Search observation variables.  See Search Services for additional implementation details.", response = ObservationVariableListResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Observation Variables", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationVariableListResponse.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/variables", produces = { "application/json" }, consumes = {
			"application/json" }, method = RequestMethod.POST)
	ResponseEntity<? extends BrAPIResponse> searchVariablesPost(
			@ApiParam(value = "") @Valid @RequestBody ObservationVariableSearchRequest 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 Observation Variable search request", nickname = "searchVariablesSearchResultsDbIdGet", notes = "Search observation variables.  See Search Services for additional implementation details.", response = ObservationVariableListResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Observation Variables", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationVariableListResponse.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/variables/{searchResultsDbId}", produces = {
			"application/json" }, method = RequestMethod.GET)
	ResponseEntity<? extends BrAPIResponse> searchVariablesSearchResultsDbIdGet(
			@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;

}
