/**
 * 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.pheno.TraitBaseClass;
import io.swagger.model.pheno.TraitListResponse;
import io.swagger.model.pheno.TraitSingleResponse;
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 = "traits", description = "the traits API")
public interface TraitsApi {

	@ApiOperation(value = "Get the Traits", nickname = "traitsGet", notes = "Call to retrieve a list of traits available in the system and their associated variables.  An Observation Variable has 3 critical parts; A Trait being observed, a Method for making the observation, and a Scale on which the observation can be measured and compared with other observations.'", response = TraitListResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Traits", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TraitListResponse.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 = "/traits", produces = { "application/json" }, method = RequestMethod.GET)
	ResponseEntity<TraitListResponse> traitsGet(
			@ApiParam(value = "traitDbId") @Valid @RequestParam(value = "traitDbId", required = false) String traitDbId,
			@ApiParam(value = "observationVariableDbId") @Valid @RequestParam(value = "observationVariableDbId", required = false) String observationVariableDbId,
			@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 = "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 = "Add a new Trait", nickname = "traitsPost", notes = "Create a new trait object in the database", response = TraitListResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Traits", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TraitListResponse.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 = "/traits", produces = { "application/json" }, consumes = {
			"application/json" }, method = RequestMethod.POST)
	ResponseEntity<TraitListResponse> traitsPost(@ApiParam(value = "") @Valid @RequestBody List<TraitBaseClass> 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 Trait", nickname = "traitsTraitDbIdGet", notes = "Retrieve the details of a single trait  An Observation Variable has 3 critical parts: A Trait being observed, a Method for making the observation, and a Scale on which the observation can be measured and compared with other observations.", response = TraitSingleResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Traits", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TraitSingleResponse.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 = "/traits/{traitDbId}", produces = { "application/json" }, method = RequestMethod.GET)
	ResponseEntity<TraitSingleResponse> traitsTraitDbIdGet(
			@ApiParam(value = "Id of the trait to retrieve details of.", required = true) @PathVariable("traitDbId") String traitDbId,
			@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 Trait", nickname = "traitsTraitDbIdPut", notes = "Update an existing trait", response = TraitSingleResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Traits", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TraitSingleResponse.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 = "/traits/{traitDbId}", produces = { "application/json" }, consumes = {
			"application/json" }, method = RequestMethod.PUT)
	ResponseEntity<TraitSingleResponse> traitsTraitDbIdPut(
			@ApiParam(value = "Id of the trait to retrieve details of.", required = true) @PathVariable("traitDbId") String traitDbId,
			@ApiParam(value = "") @Valid @RequestBody TraitBaseClass body,
			@ApiParam(value = "HTTP HEADER - Token used for Authorization   <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
			throws BrAPIServerException;

}
