Source:
PollerFlux<TextAnalyticsOperationResult, PagedIterable<HealthcareTaskResult>> beginAnalyzeHealthcarePagedIterable( Iterable<TextDocumentInput> documents, RecognizeHealthcareEntityOptions options, Context context) { try { inputDocumentsValidation(documents); String modelVersion = null; Duration pollInterval = DEFAULT_POLL_INTERVAL; if (options != null) { modelVersion = options.getModelVersion(); pollInterval = options.getPollInterval(); } final Boolean finalIncludeStatistics = options == null ? null : options.isIncludeStatistics(); final Integer finalTop = options == null ? null : options.getTop(); final Integer finalSkip = options == null ? null : options.getSkip(); return new PollerFlux<>( pollInterval, activationOperation(service.healthWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), modelVersion, StringIndexType.UTF16CODE_UNIT, context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .map(healthResponse -> { final TextAnalyticsOperationResult textAnalyticsOperationResult = new TextAnalyticsOperationResult(); TextAnalyticsOperationResultPropertiesHelper.setResultId(textAnalyticsOperationResult, parseModelId(healthResponse.getDeserializedHeaders().getOperationLocation())); return textAnalyticsOperationResult; })), pollingOperation(jobId -> service.healthStatusWithResponseAsync(jobId, null, null, finalIncludeStatistics, context)), (activationResponse, pollingContext) -> monoError(logger, new RuntimeException("Use the `beginCancelHealthcareJob` to cancel the job")), fetchingOperationIterable(resultId -> Mono.just(new PagedIterable<>(getHealthcareFluxPage(resultId, finalTop, finalSkip, finalIncludeStatistics, context)))) ); } catch (RuntimeException ex) { return PollerFlux.error(ex); } }

Target:
PollerFlux<TextAnalyticsOperationResult, PagedIterable<HealthcareTaskResult>> beginAnalyzeHealthcarePagedIterable( Iterable<TextDocumentInput> documents, RecognizeHealthcareEntityOptions options, Context context) { try { inputDocumentsValidation(documents); if (options == null) { options = new RecognizeHealthcareEntityOptions(); } final boolean finalIncludeStatistics = options.isIncludeStatistics(); final Integer finalTop = options.getTop(); final Integer finalSkip = options.getSkip(); return new PollerFlux<>( options.getPollInterval(), activationOperation(service.healthWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), options.getModelVersion(), StringIndexType.UTF16CODE_UNIT, context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .map(healthResponse -> { final TextAnalyticsOperationResult textAnalyticsOperationResult = new TextAnalyticsOperationResult(); TextAnalyticsOperationResultPropertiesHelper.setResultId(textAnalyticsOperationResult, parseModelId(healthResponse.getDeserializedHeaders().getOperationLocation())); return textAnalyticsOperationResult; })), pollingOperation(healthcareTaskId -> service.healthStatusWithResponseAsync(healthcareTaskId, null, null, finalIncludeStatistics, context)), (activationResponse, pollingContext) -> monoError(logger, new RuntimeException("Use the `beginCancelHealthcareJob` to cancel the job")), fetchingOperationIterable(resultId -> Mono.just(new PagedIterable<>(getHealthcareFluxPage(resultId, finalTop, finalSkip, finalIncludeStatistics, context)))) ); } catch (RuntimeException ex) { return PollerFlux.error(ex); } }