/**
 * 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.ProgramListResponse;
import io.swagger.model.core.ProgramNewRequest;
import io.swagger.model.core.ProgramSearchRequest;
import io.swagger.model.core.ProgramSearchRequest.ProgramTypesEnum;
import io.swagger.model.core.ProgramSingleResponse;
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 = "programs", description = "the programs API")
public interface ProgramsApi {

	@ApiOperation(value = "Get a filtered list of breeding Programs", nickname = "programsGet", notes = "Get a filtered list of breeding Programs. This list can be filtered by common crop name to narrow results to a specific crop.", response = ProgramListResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Programs", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ProgramListResponse.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 = "/programs", produces = { "application/json" }, method = RequestMethod.GET)
	ResponseEntity<ProgramListResponse> programsGet(
			@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
			@ApiParam(value = "programName") @Valid @RequestParam(value = "programName", required = false) String programName,
			@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
			@ApiParam(value = "abbreviation") @Valid @RequestParam(value = "abbreviation", required = false) String abbreviation,
			@ApiParam(value = "programType") @Valid @RequestParam(value = "programType", required = false) ProgramTypesEnum programType,
			@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 new breeding Programs to the database", nickname = "programsPost", notes = "Add new breeding Programs to the database. The `programDbId` is set by the server, all other fields are take from the request body, or a default value is used.", response = ProgramListResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Programs", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ProgramListResponse.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 = "/programs", produces = { "application/json" }, consumes = {
			"application/json" }, method = RequestMethod.POST)
	ResponseEntity<ProgramListResponse> programsPost(
			@ApiParam(value = "") @Valid @RequestBody List<ProgramNewRequest> 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 a breeding Program by Id", nickname = "programsProgramDbIdGet", notes = "Get a single breeding Program by Id. This can be used to quickly get the details of a Program when you have the Id from another entity.", response = ProgramSingleResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Programs", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ProgramSingleResponse.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 = "/programs/{programDbId}", produces = { "application/json" }, method = RequestMethod.GET)
	ResponseEntity<ProgramSingleResponse> programsProgramDbIdGet(
			@ApiParam(value = "Filter by the common crop name. Exact match.", required = true) @PathVariable("programDbId") String programDbId,
			@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 Program", nickname = "programsProgramDbIdPut", notes = "Update the details of an existing breeding Program.", response = ProgramSingleResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Programs", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ProgramSingleResponse.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 = "/programs/{programDbId}", produces = { "application/json" }, consumes = {
			"application/json" }, method = RequestMethod.PUT)
	ResponseEntity<ProgramSingleResponse> programsProgramDbIdPut(
			@ApiParam(value = "Filter by the common crop name. Exact match.", required = true) @PathVariable("programDbId") String programDbId,
			@ApiParam(value = "") @Valid @RequestBody ProgramNewRequest 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 Programs", nickname = "searchProgramsPost", notes = "Advanced searching for the programs resource. See Search Services for additional implementation details.", response = ProgramListResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Programs", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ProgramListResponse.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/programs", produces = { "application/json" }, consumes = {
			"application/json" }, method = RequestMethod.POST)
	ResponseEntity<? extends BrAPIResponse> searchProgramsPost(
			@ApiParam(value = "") @Valid @RequestBody ProgramSearchRequest 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 Programs search request", nickname = "searchProgramsSearchResultsDbIdGet", notes = "Advanced searching for the programs resource. See Search Services for additional implementation details.", response = ProgramListResponse.class, authorizations = {
			@Authorization(value = "AuthorizationToken") }, tags = { "Programs", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ProgramListResponse.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/programs/{searchResultsDbId}", produces = {
			"application/json" }, method = RequestMethod.GET)
	ResponseEntity<? extends BrAPIResponse> searchProgramsSearchResultsDbIdGet(
			@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;

}
