package incheon.ags.mrb.analysis.vo.request;

import com.all4land.sa.option.AttributeJoinMode;
import com.all4land.sa.option.OutputGeometryType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Getter
@Setter
@Schema(description = "교차 요청")
public class IntersectRequestDTO extends AbstractBoundaryAnalysisRequestDTO {

    @Schema(description = "속성 병합 방식")
    AttributeJoinMode attributeJoinMode = AttributeJoinMode.ALL;

    @Schema(description = "결과 지오메트리 타입")
    OutputGeometryType outputType = OutputGeometryType.AUTO;

    @Min(0)
    Double tolerance = 0.0;

    @Override
    protected Object jsonPart() {
        return new Object() {
            public final AttributeJoinMode attributeJoinMode = IntersectRequestDTO.this.attributeJoinMode;
            public final OutputGeometryType outputType = IntersectRequestDTO.this.outputType;
            public final Double tolerance = IntersectRequestDTO.this.tolerance;
        };
    }
}
