Class ProcessDocumentRequest

  • All Implemented Interfaces:
    ProcessDocumentRequestOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class ProcessDocumentRequest
    extends com.google.protobuf.GeneratedMessageV3
    implements ProcessDocumentRequestOrBuilder
     Request to process one document.
     
    Protobuf type google.cloud.documentai.v1beta2.ProcessDocumentRequest
    See Also:
    Serialized Form
    • Field Detail

      • INPUT_CONFIG_FIELD_NUMBER

        public static final int INPUT_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
      • OUTPUT_CONFIG_FIELD_NUMBER

        public static final int OUTPUT_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DOCUMENT_TYPE_FIELD_NUMBER

        public static final int DOCUMENT_TYPE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TABLE_EXTRACTION_PARAMS_FIELD_NUMBER

        public static final int TABLE_EXTRACTION_PARAMS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • FORM_EXTRACTION_PARAMS_FIELD_NUMBER

        public static final int FORM_EXTRACTION_PARAMS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ENTITY_EXTRACTION_PARAMS_FIELD_NUMBER

        public static final int ENTITY_EXTRACTION_PARAMS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • OCR_PARAMS_FIELD_NUMBER

        public static final int OCR_PARAMS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • AUTOML_PARAMS_FIELD_NUMBER

        public static final int AUTOML_PARAMS_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getParent

        public String getParent()
         Target project and location to make a call.
        
         Format: `projects/{project-id}/locations/{location-id}`.
        
         If no location is specified, a region will be chosen automatically.
         This field is only populated when used in ProcessDocument method.
         
        string parent = 9;
        Specified by:
        getParent in interface ProcessDocumentRequestOrBuilder
        Returns:
        The parent.
      • getParentBytes

        public com.google.protobuf.ByteString getParentBytes()
         Target project and location to make a call.
        
         Format: `projects/{project-id}/locations/{location-id}`.
        
         If no location is specified, a region will be chosen automatically.
         This field is only populated when used in ProcessDocument method.
         
        string parent = 9;
        Specified by:
        getParentBytes in interface ProcessDocumentRequestOrBuilder
        Returns:
        The bytes for parent.
      • hasInputConfig

        public boolean hasInputConfig()
         Required. Information about the input file.
         
        .google.cloud.documentai.v1beta2.InputConfig input_config = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasInputConfig in interface ProcessDocumentRequestOrBuilder
        Returns:
        Whether the inputConfig field is set.
      • getInputConfig

        public InputConfig getInputConfig()
         Required. Information about the input file.
         
        .google.cloud.documentai.v1beta2.InputConfig input_config = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getInputConfig in interface ProcessDocumentRequestOrBuilder
        Returns:
        The inputConfig.
      • hasOutputConfig

        public boolean hasOutputConfig()
         The desired output location. This field is only needed in
         BatchProcessDocumentsRequest.
         
        .google.cloud.documentai.v1beta2.OutputConfig output_config = 2;
        Specified by:
        hasOutputConfig in interface ProcessDocumentRequestOrBuilder
        Returns:
        Whether the outputConfig field is set.
      • getOutputConfig

        public OutputConfig getOutputConfig()
         The desired output location. This field is only needed in
         BatchProcessDocumentsRequest.
         
        .google.cloud.documentai.v1beta2.OutputConfig output_config = 2;
        Specified by:
        getOutputConfig in interface ProcessDocumentRequestOrBuilder
        Returns:
        The outputConfig.
      • getDocumentType

        public String getDocumentType()
         Specifies a known document type for deeper structure detection. Valid
         values are currently "general" and "invoice". If not provided, "general"\
         is used as default. If any other value is given, the request is rejected.
         
        string document_type = 3;
        Specified by:
        getDocumentType in interface ProcessDocumentRequestOrBuilder
        Returns:
        The documentType.
      • getDocumentTypeBytes

        public com.google.protobuf.ByteString getDocumentTypeBytes()
         Specifies a known document type for deeper structure detection. Valid
         values are currently "general" and "invoice". If not provided, "general"\
         is used as default. If any other value is given, the request is rejected.
         
        string document_type = 3;
        Specified by:
        getDocumentTypeBytes in interface ProcessDocumentRequestOrBuilder
        Returns:
        The bytes for documentType.
      • hasTableExtractionParams

        public boolean hasTableExtractionParams()
         Controls table extraction behavior. If not specified, the system will
         decide reasonable defaults.
         
        .google.cloud.documentai.v1beta2.TableExtractionParams table_extraction_params = 4;
        Specified by:
        hasTableExtractionParams in interface ProcessDocumentRequestOrBuilder
        Returns:
        Whether the tableExtractionParams field is set.
      • getTableExtractionParams

        public TableExtractionParams getTableExtractionParams()
         Controls table extraction behavior. If not specified, the system will
         decide reasonable defaults.
         
        .google.cloud.documentai.v1beta2.TableExtractionParams table_extraction_params = 4;
        Specified by:
        getTableExtractionParams in interface ProcessDocumentRequestOrBuilder
        Returns:
        The tableExtractionParams.
      • hasFormExtractionParams

        public boolean hasFormExtractionParams()
         Controls form extraction behavior. If not specified, the system will
         decide reasonable defaults.
         
        .google.cloud.documentai.v1beta2.FormExtractionParams form_extraction_params = 5;
        Specified by:
        hasFormExtractionParams in interface ProcessDocumentRequestOrBuilder
        Returns:
        Whether the formExtractionParams field is set.
      • getFormExtractionParams

        public FormExtractionParams getFormExtractionParams()
         Controls form extraction behavior. If not specified, the system will
         decide reasonable defaults.
         
        .google.cloud.documentai.v1beta2.FormExtractionParams form_extraction_params = 5;
        Specified by:
        getFormExtractionParams in interface ProcessDocumentRequestOrBuilder
        Returns:
        The formExtractionParams.
      • hasEntityExtractionParams

        public boolean hasEntityExtractionParams()
         Controls entity extraction behavior. If not specified, the system will
         decide reasonable defaults.
         
        .google.cloud.documentai.v1beta2.EntityExtractionParams entity_extraction_params = 6;
        Specified by:
        hasEntityExtractionParams in interface ProcessDocumentRequestOrBuilder
        Returns:
        Whether the entityExtractionParams field is set.
      • getEntityExtractionParams

        public EntityExtractionParams getEntityExtractionParams()
         Controls entity extraction behavior. If not specified, the system will
         decide reasonable defaults.
         
        .google.cloud.documentai.v1beta2.EntityExtractionParams entity_extraction_params = 6;
        Specified by:
        getEntityExtractionParams in interface ProcessDocumentRequestOrBuilder
        Returns:
        The entityExtractionParams.
      • hasOcrParams

        public boolean hasOcrParams()
         Controls OCR behavior. If not specified, the system will decide reasonable
         defaults.
         
        .google.cloud.documentai.v1beta2.OcrParams ocr_params = 7;
        Specified by:
        hasOcrParams in interface ProcessDocumentRequestOrBuilder
        Returns:
        Whether the ocrParams field is set.
      • getOcrParams

        public OcrParams getOcrParams()
         Controls OCR behavior. If not specified, the system will decide reasonable
         defaults.
         
        .google.cloud.documentai.v1beta2.OcrParams ocr_params = 7;
        Specified by:
        getOcrParams in interface ProcessDocumentRequestOrBuilder
        Returns:
        The ocrParams.
      • hasAutomlParams

        public boolean hasAutomlParams()
         Controls AutoML model prediction behavior. AutoMlParams cannot be used
         together with other Params.
         
        .google.cloud.documentai.v1beta2.AutoMlParams automl_params = 8;
        Specified by:
        hasAutomlParams in interface ProcessDocumentRequestOrBuilder
        Returns:
        Whether the automlParams field is set.
      • getAutomlParams

        public AutoMlParams getAutomlParams()
         Controls AutoML model prediction behavior. AutoMlParams cannot be used
         together with other Params.
         
        .google.cloud.documentai.v1beta2.AutoMlParams automl_params = 8;
        Specified by:
        getAutomlParams in interface ProcessDocumentRequestOrBuilder
        Returns:
        The automlParams.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static ProcessDocumentRequest parseFrom​(ByteBuffer data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ProcessDocumentRequest parseFrom​(ByteBuffer data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ProcessDocumentRequest parseFrom​(com.google.protobuf.ByteString data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ProcessDocumentRequest parseFrom​(com.google.protobuf.ByteString data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ProcessDocumentRequest parseFrom​(byte[] data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ProcessDocumentRequest parseFrom​(byte[] data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • newBuilderForType

        public ProcessDocumentRequest.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public ProcessDocumentRequest.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected ProcessDocumentRequest.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<ProcessDocumentRequest> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public ProcessDocumentRequest getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder