Code review comment: Country asPhoneNumber? :)  edit: same with other sample snippets

Code under review:
public void beginRecognizeIDDocumentFromUrl() {
        
        String idDocumentUrl = "idDocumentUrl";
        
        formRecognizerAsyncClient.beginRecognizeIdDocumentsFromUrl(idDocumentUrl)
            .flatMap(AsyncPollResponse::getFinalResult)
            .subscribe(recognizedIDDocumentResult -> {
                for (int i = 0; i < recognizedIDDocumentResult.size(); i++) {
                    RecognizedForm recognizedForm = recognizedIDDocumentResult.get(i);
                    Map<String, FormField> recognizedFields = recognizedForm.getFields();
                    System.out.printf("----------- Recognized license info for page %d -----------%n", i);

                    FormField firstNameField = recognizedFields.get("FirstName");
                    if (firstNameField != null) {
                        if (FieldValueType.STRING == firstNameField.getValue().getValueType()) {
                            String firstName = firstNameField.getValue().asString();
                            System.out.printf("First Name: %s, confidence: %.2f%n",
                                firstName, firstNameField.getConfidence());
                        }
                    }

                    FormField lastNameField = recognizedFields.get("LastName");
                    if (lastNameField != null) {
                        if (FieldValueType.STRING == lastNameField.getValue().getValueType()) {
                            String lastName = lastNameField.getValue().asString();
                            System.out.printf("Last name: %s, confidence: %.2f%n",
                                lastName, lastNameField.getConfidence());
                        }
                    }

                    FormField countryFormField = recognizedFields.get("Country");
                    if (countryFormField != null) {
                        if (FieldValueType.STRING == countryFormField.getValue().getValueType()) {
                            String country = countryFormField.getValue().asPhoneNumber();
                            System.out.printf("Country: %s, confidence: %.2f%n",
                                country, countryFormField.getConfidence());
                        }
                    }

                    FormField dateOfExpirationField = recognizedFields.get("DateOfExpiration");
                    if (dateOfExpirationField != null) {
                        if (FieldValueType.DATE == dateOfExpirationField.getValue().getValueType()) {
                            LocalDate expirationDate = dateOfExpirationField.getValue().asDate();
                            System.out.printf("Document date of expiration: %s, confidence: %.2f%n",
                                expirationDate, dateOfExpirationField.getConfidence());
                        }
                    }

                    FormField documentNumberField = recognizedFields.get("DocumentNumber");
                    if (documentNumberField != null) {
                        if (FieldValueType.STRING == documentNumberField.getValue().getValueType()) {
                            String documentNumber = documentNumberField.getValue().asString();
                            System.out.printf("Document number: %s, confidence: %.2f%n",
                                documentNumber, documentNumberField.getConfidence());
                        }
                    }
                }
            });
        
    }

Line commented on: String country = countryFormField.getValue().asPhoneNumber();

Revised code:
public void beginRecognizeIDDocumentFromUrl() {
        
        String idDocumentUrl = "idDocumentUrl";
        
        formRecognizerAsyncClient.beginRecognizeIdDocumentsFromUrl(idDocumentUrl)
            .flatMap(AsyncPollResponse::getFinalResult)
            .subscribe(recognizedIDDocumentResult -> {
                for (int i = 0; i < recognizedIDDocumentResult.size(); i++) {
                    RecognizedForm recognizedForm = recognizedIDDocumentResult.get(i);
                    Map<String, FormField> recognizedFields = recognizedForm.getFields();
                    System.out.printf("----------- Recognized license info for page %d -----------%n", i);

                    FormField firstNameField = recognizedFields.get("FirstName");
                    if (firstNameField != null) {
                        if (FieldValueType.STRING == firstNameField.getValue().getValueType()) {
                            String firstName = firstNameField.getValue().asString();
                            System.out.printf("First Name: %s, confidence: %.2f%n",
                                firstName, firstNameField.getConfidence());
                        }
                    }

                    FormField lastNameField = recognizedFields.get("LastName");
                    if (lastNameField != null) {
                        if (FieldValueType.STRING == lastNameField.getValue().getValueType()) {
                            String lastName = lastNameField.getValue().asString();
                            System.out.printf("Last name: %s, confidence: %.2f%n",
                                lastName, lastNameField.getConfidence());
                        }
                    }

                    FormField countryFormField = recognizedFields.get("Country");
                    if (countryFormField != null) {
                        if (FieldValueType.STRING == countryFormField.getValue().getValueType()) {
                            String country = countryFormField.getValue().asCountry();
                            System.out.printf("Country: %s, confidence: %.2f%n",
                                country, countryFormField.getConfidence());
                        }
                    }

                    FormField dateOfExpirationField = recognizedFields.get("DateOfExpiration");
                    if (dateOfExpirationField != null) {
                        if (FieldValueType.DATE == dateOfExpirationField.getValue().getValueType()) {
                            LocalDate expirationDate = dateOfExpirationField.getValue().asDate();
                            System.out.printf("Document date of expiration: %s, confidence: %.2f%n",
                                expirationDate, dateOfExpirationField.getConfidence());
                        }
                    }

                    FormField documentNumberField = recognizedFields.get("DocumentNumber");
                    if (documentNumberField != null) {
                        if (FieldValueType.STRING == documentNumberField.getValue().getValueType()) {
                            String documentNumber = documentNumberField.getValue().asString();
                            System.out.printf("Document number: %s, confidence: %.2f%n",
                                documentNumber, documentNumberField.getConfidence());
                        }
                    }
                }
            });
        
    }