View Javadoc
1   package org.imageconverter.util.controllers.imageconverter;
2   
3   import javax.validation.constraints.Min;
4   import javax.validation.constraints.NotEmpty;
5   import javax.validation.constraints.NotNull;
6   
7   import org.imageconverter.domain.conversion.ExecutionType;
8   
9   import io.swagger.v3.oas.annotations.media.Schema;
10  
11  /**
12   * Structure with area (x, y, width and height) to execute the image conversion.
13   * 
14   * @author Fernando Romulo da Silva
15   */
16  @Schema(name = "ImageConverterRequestArea", description = "Resquest structure to convert Image with specific area")
17  public record ImageConverterRequestArea( //
18  		
19  		@Schema(name = "fileName", description = "The uploaded image file name", required = true, example = "image.bmp") //
20  		@NotEmpty(message = "{imageConversion.fileName}") //
21  		String fileName, //
22  		//
23  		@Schema(name = "fileContent", description = "The uploaded image file bytes", required = true, example = "image.bmp") //
24  		@NotNull(message = "{imageConversion.fileContent}") //
25  		byte[] fileContent, //
26  		//
27  		@Schema(name = "executionType", description = "Execution's type", required = true, implementation = ExecutionType.class) //
28  		@NotNull(message = "{imageConversion.executionType}") //
29  		ExecutionType executionType, //
30  		//
31  		@Schema(name = "xAxis", description = "The x axis image point", required = false, example = "145") //
32  		@Min(value = 0, message = "{imageConversion.xAxis}") //
33  		Integer xAxis, //
34  		//
35  		@Schema(name = "yAxis", description = "The y axis image point", required = false, example = "123") //
36  		@Min(value = 0, message = "{imageConversion.yAxis}") //
37  		Integer yAxis, //
38  		//
39  		@Schema(name = "width", description = "The width area", required = false, example = "123") //
40  		@Min(value = 0, message = "{imageConversion.width}") //
41  		Integer width, //
42  		//
43  		@Schema(name = "height", description = "The height area", required = false, example = "343") //
44  		@Min(value = 0, message = "{imageConversion.height}") //
45  		Integer height) implements ImageConverterRequestInterface {
46      
47  }