tpalfy commented on code in PR #6762:
URL: https://github.com/apache/nifi/pull/6762#discussion_r1073600024


##########
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/vision/GetGcpVisionAnnotateImagesOperationStatus.java:
##########
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.nifi.processors.gcp.vision;
+
+import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse;
+import com.google.protobuf.ByteString;
+import com.google.protobuf.GeneratedMessageV3;
+import com.google.protobuf.InvalidProtocolBufferException;
+import org.apache.nifi.annotation.behavior.ReadsAttribute;
+import org.apache.nifi.annotation.behavior.ReadsAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.SeeAlso;
+import org.apache.nifi.annotation.documentation.Tags;
+
+@Tags({"Google", "Cloud", "Vision", "Machine Learning"})
+@CapabilityDescription("Retrieves the current status of an Google Vision 
operation.")
+@SeeAlso({StartGcpVisionAnnotateImagesOperation.class})
+@ReadsAttributes({
+        @ReadsAttribute(attribute = "operationKey", description = "Unique key 
of the operation.")

Review Comment:
   ```suggestion
           @ReadsAttribute(attribute = "operationKey", description = "A unique 
identifier of the operation designated by the Vision server.")
   ```



##########
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/resources/docs/org.apache.nifi.processors.gcp.vision.GetGcpVisionAnnotateImagesOperationStatus/additionalDetails.html:
##########
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html lang="en" xmlns="http://www.w3.org/1999/html";>
+<!--
+      Licensed to the Apache Software Foundation (ASF) under one or more
+      contributor license agreements.  See the NOTICE file distributed with
+      this work for additional information regarding copyright ownership.
+      The ASF licenses this file to You under the Apache License, Version 2.0
+      (the "License"); you may not use this file except in compliance with
+      the License.  You may obtain a copy of the License at
+          http://www.apache.org/licenses/LICENSE-2.0
+      Unless required by applicable law or agreed to in writing, software
+      distributed under the License is distributed on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      See the License for the specific language governing permissions and
+      limitations under the License.
+    -->
+
+<head>
+    <meta charset="utf-8"/>
+    <title>Amazon Textract</title>
+    <link rel="stylesheet" href="../../../../../css/component-usage.css" 
type="text/css"/>
+</head>
+<body>
+
+<h1>Google Cloud Vision - Get Annotate Images Status</h1>
+
+<h3>Usage</h3>
+<p>
+    GetGcpVisionAnnotateImagesOperationStatus is designed to periodically 
check image annotation status. This processor should be used in pair with 
StartGcpVisionAnnotateImagesOperation Processor.
+    FlowFile will contain the serialized response that contains google storage 
reference where the result is located and additional metadata as it is 
documented in <a 
href="https://cloud.google.com/vision/docs/reference/rest/v1/locations.operations#Operation";
 target="_blank">Google Vision API Reference</a>.

Review Comment:
   ```suggestion
       GetGcpVisionAnnotateImagesOperationStatus is designed to periodically 
check the statuses of image annotation operations. This processor should be 
used in pair with StartGcpVisionAnnotateImagesOperation Processor.
       An outgoing FlowFile contains the raw response returned by the Vision 
server. This response is in JSON json format and contains a google storage 
reference where the result is located, as well as additional metadata, as 
written in the <a 
href="https://cloud.google.com/vision/docs/reference/rest/v1/locations.operations#Operation";
 target="_blank">Google Vision API Reference document</a>.
   ```



##########
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/vision/StartGcpVisionAnnotateImagesOperation.java:
##########
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.nifi.processors.gcp.vision;
+
+import static 
org.apache.nifi.processors.gcp.util.GoogleUtils.GCP_CREDENTIALS_PROVIDER_SERVICE;
+
+import com.google.api.gax.longrunning.OperationFuture;
+import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.SeeAlso;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.processor.util.StandardValidators;
+
+@Tags({"Google", "Cloud", "Machine Learning", "Vision"})
+@CapabilityDescription("Trigger a Vision operation on image input. It should 
be followed by GetGcpVisionAnnotateImagesOperationStatus processor in order to 
monitor operation status.")
+@SeeAlso({GetGcpVisionAnnotateImagesOperationStatus.class})
+@WritesAttributes({
+        @WritesAttribute(attribute = "operationKey", description = "Unique key 
of the operation.")

Review Comment:
   ```suggestion
           @WritesAttribute(attribute = "operationKey", description = "A unique 
identifier of the operation returned by the Vision server.")
   ```



##########
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/vision/StartGcpVisionAnnotateFilesOperation.java:
##########
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.nifi.processors.gcp.vision;
+
+import static 
org.apache.nifi.processors.gcp.util.GoogleUtils.GCP_CREDENTIALS_PROVIDER_SERVICE;
+
+import com.google.api.gax.longrunning.OperationFuture;
+import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.SeeAlso;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.processor.util.StandardValidators;
+
+@Tags({"Google", "Cloud", "Machine Learning", "Vision"})
+@CapabilityDescription("Trigger a Vision operation on file input. It should be 
followed by GetGcpVisionAnnotateFilesOperationStatus processor in order to 
monitor operation status.")
+@SeeAlso({GetGcpVisionAnnotateFilesOperationStatus.class})
+@WritesAttributes({
+        @WritesAttribute(attribute = "operationKey", description = "Unique key 
of the operation.")

Review Comment:
   ```suggestion
           @WritesAttribute(attribute = "operationKey", description = "A unique 
identifier of the operation returned by the Vision server.")
   ```



##########
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/resources/docs/org.apache.nifi.processors.gcp.vision.StartGcpVisionAnnotateFilesOperation/additionalDetails.html:
##########
@@ -0,0 +1,105 @@
+<!DOCTYPE html>

Review Comment:
   There are multiple suggestions I'd like to make, here's how the document 
would look like based on those:
   ```html
   <!DOCTYPE html>
   <html lang="en" xmlns="http://www.w3.org/1999/html";>
   <!--
         Licensed to the Apache Software Foundation (ASF) under one or more
         contributor license agreements.  See the NOTICE file distributed with
         this work for additional information regarding copyright ownership.
         The ASF licenses this file to You under the Apache License, Version 2.0
         (the "License"); you may not use this file except in compliance with
         the License.  You may obtain a copy of the License at
             http://www.apache.org/licenses/LICENSE-2.0
         Unless required by applicable law or agreed to in writing, software
         distributed under the License is distributed on an "AS IS" BASIS,
         WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
         See the License for the specific language governing permissions and
         limitations under the License.
       -->
   
   <head>
       <meta charset="utf-8"/>
       <title>Amazon Textract</title>
       <link rel="stylesheet" href="../../../../../css/component-usage.css" 
type="text/css"/>
   </head>
   <body>
   
   <h1>Google Cloud Vision - Start Annotate Files Operation</h1>
   <p>
       Prerequisites
   <ul>
       <li>Make sure Vision API is enabled and the account you are using has 
the right to use it</li>
       <li>Make sure the input file(s) are available in a GCS bucket</li>
   </ul>
   </p>
   <h3>Usage</h3>
   <p>
       StartGcpVisionAnnotateFilesOperation is designed to trigger file 
annotation operations. This processor should be used in pair with the 
GetGcpVisionAnnotateFilesOperationStatus Processor.
       Outgoing FlowFiles contain the raw response to the request returned by 
the Vision server. The response is in JSON format and contains the result and 
additional metadata as written in the Google Vision API Reference documents.
   </p>
   
   <h3>Payload</h3>
   <p>
       The JSON Payload is a request in JSON format as documented in the <a 
href="https://cloud.google.com/vision/docs/reference/rest/v1/files/asyncBatchAnnotate";
 target="_blank">Google Vision REST API reference document</a>.
       Payload can be fed to the processor via the <code>JSON Payload</code> 
property or as a FlowFile content. The property has higher precedence over 
FlowFile content.
       Please make sure to delete the default value of the property if you want 
to use FlowFile content payload.
       A JSON payload template example:
   </p>
   <code>
       <pre>
   {
       "requests": [
           {
               "inputConfig": {
                   "gcsSource": {
                       "uri": "gs://${gcs.bucket}/${filename}"
                   },
                   "mimeType": "application/pdf"
               },
               "features": [{
                       "type": "DOCUMENT_TEXT_DETECTION",
                       "maxResults": 4
                   }],
               "outputConfig": {
                   "gcsDestination": {
                       "uri": "gs://${gcs.bucket}/${filename}/"
                   },
                   "batchSize": 2
               }
           }]
   }
       </pre>
   </code>
   <h3>Features types</h3>
   <ul>
       <li>TEXT_DETECTION: Optical character recognition (OCR) for an image; 
text recognition and conversion to machine-coded text. Identifies and extracts 
UTF-8 text in an image.</li>
       <li>DOCUMENT_TEXT_DETECTION: Optical character recognition (OCR) for a 
file (PDF/TIFF) or dense text image; dense text recognition and conversion to 
machine-coded text.</li>
   </ul>
   You can find more details at <a 
href="https://cloud.google.com/vision/docs/features-list"; 
target="_blank">Google Vision Feature List</a>
   
   <h3>Example: How to setup a simple Annotate Image Flow</h3>
   <p>
       Prerequisites
   </p>
   <p>
       <ul>
       <li>Input files should be available in a GCS bucket</li>
       <li>This bucket must not contain anything else but the input files</li>
       </ul>
   </p>
   <p>Create the following flow</p>
   <img src="vision-annotate-files.png" style="height: 50%; width: 50%"/>
   <p>
   Keep the default value of JSON PAYLOAD property in 
StartGcpVisionAnnotateImagesOperation
   </p>
   <p>
   Execution steps:
       <ul>
           <li>ListGCSBucket processor will return a list of files in the 
bucket at the first run.</li>
           <li>ListGCSBucket will return only new items at subsequent runs.</li>
           <li>StartGcpVisionAnnotateFilesOperation processor will trigger GCP 
Vision file annotation jobs based on the JSON payload.</li>
           <li>StartGcpVisionAnnotateFilesOperation processor will populate the 
<code>operationKey</code> flow file attribute.</li>
           <li>GetGcpVisionAnnotateFilesOperationStatus processor will 
periodically query status of the job.</li>
       </ul>
   </p>
   </body>
   </html>
   ```



##########
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/resources/docs/org.apache.nifi.processors.gcp.vision.GetGcpVisionAnnotateFilesOperationStatus/additionalDetails.html:
##########
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html lang="en" xmlns="http://www.w3.org/1999/html";>
+<!--
+      Licensed to the Apache Software Foundation (ASF) under one or more
+      contributor license agreements.  See the NOTICE file distributed with
+      this work for additional information regarding copyright ownership.
+      The ASF licenses this file to You under the Apache License, Version 2.0
+      (the "License"); you may not use this file except in compliance with
+      the License.  You may obtain a copy of the License at
+          http://www.apache.org/licenses/LICENSE-2.0
+      Unless required by applicable law or agreed to in writing, software
+      distributed under the License is distributed on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      See the License for the specific language governing permissions and
+      limitations under the License.
+    -->
+
+<head>
+    <meta charset="utf-8"/>
+    <title>Amazon Textract</title>
+    <link rel="stylesheet" href="../../../../../css/component-usage.css" 
type="text/css"/>
+</head>
+<body>
+
+<h1>Google Cloud Vision - Get Annotate Files Status</h1>
+
+<h3>Usage</h3>
+<p>
+    GetGcpVisionAnnotateFilesOperationStatus is designed to periodically check 
image annotation status. This processor should be used in pair with 
StartGcpVisionAnnotateFilesOperation Processor.
+    FlowFile will contain the serialized response that contains google storage 
reference where the result is located and additional metadata as it is 
documented in <a 
href="https://cloud.google.com/vision/docs/reference/rest/v1/locations.operations#Operation";
 target="_blank">Google Vision API Reference</a>.

Review Comment:
   ```suggestion
       GetGcpVisionAnnotateFilesOperationStatus is designed to periodically 
check the statuses of file annotation operations. This processor should be used 
in pair with StartGcpVisionAnnotateFilesOperation Processor.
       An outgoing FlowFile contains the raw response returned by the Vision 
server. This response is in JSON json format and contains a google storage 
reference where the result is located, as well as additional metadata, as 
written in the <a 
href="https://cloud.google.com/vision/docs/reference/rest/v1/locations.operations#Operation";
 target="_blank">Google Vision API Reference document</a>.
   ```



##########
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/resources/docs/org.apache.nifi.processors.gcp.vision.StartGcpVisionAnnotateImagesOperation/additionalDetails.html:
##########
@@ -0,0 +1,107 @@
+<!DOCTYPE html>

Review Comment:
   There are multiple suggestions I'd like to make, here's how the document 
would look like based on those:
   ```html
   <!DOCTYPE html>
   <html lang="en" xmlns="http://www.w3.org/1999/html";>
   <!--
         Licensed to the Apache Software Foundation (ASF) under one or more
         contributor license agreements.  See the NOTICE file distributed with
         this work for additional information regarding copyright ownership.
         The ASF licenses this file to You under the Apache License, Version 2.0
         (the "License"); you may not use this file except in compliance with
         the License.  You may obtain a copy of the License at
             http://www.apache.org/licenses/LICENSE-2.0
         Unless required by applicable law or agreed to in writing, software
         distributed under the License is distributed on an "AS IS" BASIS,
         WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
         See the License for the specific language governing permissions and
         limitations under the License.
       -->
   
   <head>
       <meta charset="utf-8"/>
       <title>Amazon Textract</title>
       <link rel="stylesheet" href="../../../../../css/component-usage.css" 
type="text/css"/>
   </head>
   <body>
   
   <h1>Google Cloud Vision - Start Annotate Images Operation</h1>
   <p>
       Prerequisites
   <ul>
        <li>Make sure Vision API is enabled and the account you are using has 
the right to use it</li>
        <li>Make sure thne input image(s) are available in a GCS bucket</li>
   </ul>
   </p>
   <h3>Usage</h3>
   <p>
   StartGcpVisionAnnotateImagesOperation is designed to trigger image 
annotation operations. This processor should be used in pair with the 
GetGcpVisionAnnotateImagesOperationStatus Processor.
   Outgoing FlowFiles contain the raw response to the request returned by the 
Vision server. The response is in JSON format and contains the result and 
additional metadata as written in the Google Vision API Reference documents.
   </p>
   <h3>Payload</h3>
   <p>
        The JSON Payload is a request in JSON format as documented in the <a 
href="https://cloud.google.com/vision/docs/reference/rest/v1/images/asyncBatchAnnotate";
 target="_blank">Google Vision REST API reference document</a>.
        Payload can be fed to the processor via the <code>JSON Payload</code> 
property or as a FlowFile content. The property has higher precedence over 
FlowFile content.
        Please make sure to delete the default value of the property if you 
want to use FlowFile content payload.
       A JSON payload template example:
   </p>
   
   <code>
       <pre>
   {
        "requests": [{
                "image": {
                        "source": {
                                "imageUri": "gs://${gcs.bucket}/${filename}"
                        }
                },
                "features": [{
                        "type": "DOCUMENT_TEXT_DETECTION",
                        "maxResults": 4
                }]
        }],
        "outputConfig": {
                "gcsDestination": {
                        "uri": "gs://${gcs.bucket}/${filename}/"
                },
                "batchSize": 2
        }
   }
       </pre>
   </code>
   <h3>Features types</h3>
   <ul>
        <li>TEXT_DETECTION: Optical character recognition (OCR) for an image; 
text recognition and conversion to machine-coded text. Identifies and extracts 
UTF-8 text in an image.</li>
        <li>DOCUMENT_TEXT_DETECTION: Optical character recognition (OCR) for a 
file (PDF/TIFF) or dense text image; dense text recognition and conversion to 
machine-coded text.</li>
        <li>LANDMARK_DETECTION: Provides the name of the landmark, a confidence 
score and a bounding box in the image for the landmark.</li>
        <li>LOGO_DETECTION: Provides a textual description of the entity 
identified, a confidence score, and a bounding polygon for the logo in the 
file.</li>
        <li>LABEL_DETECTION: Provides generalized labels for an image.</li>
        <li>etc.</li>
   </ul>
   You can find more details at <a 
href="https://cloud.google.com/vision/docs/features-list"; 
target="_blank">Google Vision Feature List</a>
   <h3>Example: How to setup a simple Annotate Image Flow</h3>
   <p>
        Prerequisites
   </p>
   <p>
   <ul>
        <li>Input image files should be available in a GCS bucket</li>
       <li>This bucket must not contain anything else but the input image 
files</li>
   </ul>
   </p>
   <p>Create the following flow</p>
   <img src="vision-annotate-images.png" style="height: 50%; width: 50%"/>
   <p>
        Keep the default value of JSON PAYLOAD property in 
StartGcpVisionAnnotateImagesOperation
   </p>
   <p>
        Execution steps:
   <ul>
        <li>ListGCSBucket processor will return a list of files in the bucket 
at the first run.</li>
        <li>ListGCSBucket will return only new items at subsequent runs.</li>
        <li>StartGcpVisionAnnotateImagesOperation processor will trigger GCP 
Vision image annotation jobs based on the JSON payload.</li>
        <li>StartGcpVisionAnnotateImagesOperation processor will populate the 
<code>operationKey</code> flow file attribute.</li>
        <li>GetGcpVisionAnnotateImagesOperationStatus processor will 
periodically query status of the job.</li>
   </ul>
   </p>
   </body>
   </html>
   ```



##########
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/vision/GetGcpVisionAnnotateFilesOperationStatus.java:
##########
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.nifi.processors.gcp.vision;
+
+import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse;
+import com.google.protobuf.ByteString;
+import com.google.protobuf.GeneratedMessageV3;
+import com.google.protobuf.InvalidProtocolBufferException;
+import org.apache.nifi.annotation.behavior.ReadsAttribute;
+import org.apache.nifi.annotation.behavior.ReadsAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.SeeAlso;
+import org.apache.nifi.annotation.documentation.Tags;
+
+@Tags({"Google", "Cloud", "Vision", "Machine Learning"})
+@CapabilityDescription("Retrieves the current status of an Google Vision 
operation.")
+@SeeAlso({StartGcpVisionAnnotateFilesOperation.class})
+@ReadsAttributes({
+        @ReadsAttribute(attribute = "operationKey", description = "Unique key 
of the operation.")

Review Comment:
   ```suggestion
           @ReadsAttribute(attribute = "operationKey", description = "A unique 
identifier of the operation designated by the Vision server.")
   ```



##########
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/vision/AbstractGetGcpVisionAnnotateOperationStatus.java:
##########
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.nifi.processors.gcp.vision;
+
+import static 
org.apache.nifi.expression.ExpressionLanguageScope.FLOWFILE_ATTRIBUTES;
+
+import com.google.longrunning.Operation;
+import com.google.protobuf.ByteString;
+import com.google.protobuf.GeneratedMessageV3;
+import com.google.protobuf.InvalidProtocolBufferException;
+import com.google.protobuf.util.JsonFormat;
+import com.google.rpc.Status;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.util.StandardValidators;
+
+abstract public class AbstractGetGcpVisionAnnotateOperationStatus extends 
AbstractGcpVisionProcessor {
+    public static final PropertyDescriptor OPERATION_KEY =
+            new PropertyDescriptor.Builder()
+                    .name("operationKey")
+                    .displayName("GCP Operation Key")
+                    .defaultValue("${operationKey}")
+                    .required(true)
+                    .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+                    .expressionLanguageSupported(FLOWFILE_ATTRIBUTES)
+                    .build();

Review Comment:
   Can we please consolidate indentation and add a description?
   ```suggestion
       public static final PropertyDescriptor OPERATION_KEY = new 
PropertyDescriptor.Builder()
               .name("operationKey")
               .displayName("GCP Operation Key")
               .description("The unique identifier of the Vision operation.")
               .defaultValue("${operationKey}")
               .required(true)
               .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
               .expressionLanguageSupported(FLOWFILE_ATTRIBUTES)
               .build();
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to