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

import java.util.Map;
import java.util.Optional;

import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

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.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.context.request.NativeWebRequest;

import com.chtrembl.petstore.order.model.Order;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.Authorization;

@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-12-21T10:17:19.885-05:00")

@Api(value = "store", description = "the store API")
public interface StoreApi {

	// wired in for the scenario the interface declarations need access to scoped
	// beans, all implementation should occur in Controller tho
	default Optional<NativeWebRequest> getRequest() {
		return Optional.empty();
	}

	// wired in for the scenario the interface declarations need access to scoped
	// beans, all implementation should occur in Controller tho
	public StoreApiCache getBeanToBeAutowired();

	// wired in for the scenario the interface declarations need access to scoped
	// beans, all implementation should occur in Controller tho
	default Order getStoreApiCache(String id) {
		return getBeanToBeAutowired().getOrder(id);
	}

	@ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors", tags = {
			"store", })
	@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"),
			@ApiResponse(code = 404, message = "Order not found") })
	@RequestMapping(value = "/store/order/{orderId}", produces = { "application/json",
			"application/xml" }, method = RequestMethod.DELETE)
	ResponseEntity<Void> deleteOrder(
			@Min(1L) @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId);

	@ApiOperation(value = "Returns pet product inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
			@Authorization(value = "api_key") }, tags = { "store", })
	@ApiResponses(value = {
			@ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
	@RequestMapping(value = "/store/inventory", produces = { "application/json" }, method = RequestMethod.GET)
	ResponseEntity<Map<String, Integer>> getInventory();

	@ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions", response = Order.class, tags = {
			"store", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class),
			@ApiResponse(code = 400, message = "Invalid ID supplied"),
			@ApiResponse(code = 404, message = "Order not found") })
	@RequestMapping(value = "/store/order/{orderId}", produces = { "application/json",
			"application/xml" }, method = RequestMethod.GET)
	ResponseEntity<Order> getOrderById(
			@Min(1L) @Max(10L) @ApiParam(value = "ID of pet product that needs to be fetched", required = true) @PathVariable("orderId") String orderId);

	@ApiOperation(value = "Place an order for a pet product", nickname = "placeOrder", notes = "", response = Order.class, tags = {
			"store", })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class),
			@ApiResponse(code = 400, message = "Invalid Order") })
	@RequestMapping(value = "/store/order", produces = { "application/json", "application/xml" }, consumes = {
			"application/json" }, method = RequestMethod.POST)
	ResponseEntity<Order> placeOrder(
			@ApiParam(value = "order placed for purchasing the pet product", required = true) @Valid @RequestBody Order body);
}
