class Request {

    static CaptureRequest create(CaptureRequestBuilder builder) throws CameraAccessException {
        return new Request(
                builder.cameraDevice,
                builder.requestTemplate,
                builder.surfaces,
                builder.shouldTriggerAutoFocus,
                builder.triggerPrecaptureExposure,
                builder.cancelPrecaptureExposure,
                builder.flash,
                builder.shouldSetExposureMode,
                builder.focus,
                builder.previewFpsRange,
                builder.sensorSensitivity,
                builder.jpegQuality
        )
                .build();
    }

    private  Request(CameraDevice cameraDevice,
                    int requestTemplate,
                    List<Surface> surfaces,
                    boolean shouldTriggerAutoFocus,
                    boolean triggerPrecaptureExposure,
                    boolean cancelPrecaptureExposure,
                    Flash flash, boolean shouldSetExposureMode,
                    FocusMode focus,
                    Range<Integer> previewFpsRange,
                    Integer sensorSensitivity,
                    Integer jpegQuality);

}